[tpm] reflowing comments in vim

Doug Lalonde douglalonde at gmail.com
Thu Dec 8 10:11:19 PST 2011


Hi Olaf,

Try :%s/blah\n#/blah/g

Doug

On 8 December 2011 12:08, Olaf Alders <olaf at vilerichard.com> wrote:
> Hi Folks,
>
> I'm a bit clueless when it comes to vim.  Given comments in code which look like this:
>
> # blah
> # blah blah blah blah
> # blah
>
> I'd like to be able to reflow them to look like this:
>
> # blah blah blah blah blah blah
>
> I'd like to preserve indentation and respect the line wrap at X chars to that anything which spills over to the next line is correctly commented and indented. I had looked at this stack overflow question, but it's not working for me.  However, that may just be because I'm "doing it wrong".
>
> http://stackoverflow.com/questions/7338214/nicely-formatting-long-comments-in-vim
>
> Can anyone point me in the right direction?
>
> Olaf
> --
> Olaf Alders
> olaf at vilerichard.com
>
> http://vilerichard.com -- folk rock
> http://twitter.com/vilerichard
> http://cdbaby.com/cd/vilerichard
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm


More information about the toronto-pm mailing list