:map ccc J:s/ #//g<CR>I# <ESC><br><br>then, <shift>+v select all comments, than press ccc<br clear="all"><br><br><br>Just another Perl Hacker,<br>Fernando (SmokeMachine)<br>
<br><br><div class="gmail_quote">2011/12/8 Doug Lalonde <span dir="ltr"><<a href="mailto:douglalonde@gmail.com">douglalonde@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Olaf,<br>
<br>
Try :%s/blah\n#/blah/g<br>
<span class="HOEnZb"><font color="#888888"><br>
Doug<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 8 December 2011 12:08, Olaf Alders <<a href="mailto:olaf@vilerichard.com">olaf@vilerichard.com</a>> wrote:<br>
> Hi Folks,<br>
><br>
> I'm a bit clueless when it comes to vim. Given comments in code which look like this:<br>
><br>
> # blah<br>
> # blah blah blah blah<br>
> # blah<br>
><br>
> I'd like to be able to reflow them to look like this:<br>
><br>
> # blah blah blah blah blah blah<br>
><br>
> 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".<br>
><br>
> <a href="http://stackoverflow.com/questions/7338214/nicely-formatting-long-comments-in-vim" target="_blank">http://stackoverflow.com/questions/7338214/nicely-formatting-long-comments-in-vim</a><br>
><br>
> Can anyone point me in the right direction?<br>
><br>
> Olaf<br>
> --<br>
> Olaf Alders<br>
> <a href="mailto:olaf@vilerichard.com">olaf@vilerichard.com</a><br>
><br>
> <a href="http://vilerichard.com" target="_blank">http://vilerichard.com</a> -- folk rock<br>
> <a href="http://twitter.com/vilerichard" target="_blank">http://twitter.com/vilerichard</a><br>
> <a href="http://cdbaby.com/cd/vilerichard" target="_blank">http://cdbaby.com/cd/vilerichard</a><br>
> _______________________________________________<br>
> toronto-pm mailing list<br>
> <a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
</div></div></blockquote></div><br>