[tpm] reflowing comments in vim
fernandocorrea at gmail.com
Thu Dec 8 11:28:07 PST 2011
Maybe something like this would be better:
: let l = line(".") + 1
: let content = getline(l)
: if(content =~ "^\\s*#")
: execute "normal Jdf#"
: call CCC()
:map ccc :call CCC()<CR>
Just another Perl Hacker,
2011/12/8 Olaf Alders <olaf at vilerichard.com>
> On 2011-12-08, at 1:25 PM, Fernando Oliveira wrote:
> > :map ccc J:s/ #//g<CR>I# <ESC>
> > then, <shift>+v select all comments, than press ccc
> This came the closest of all, but it wasn't quite perfect. It turns out
> that selecting the lines and and then "gq" solves it. I had stupidly had
> ":set paste" in my .vimrc which was messing with the formatting.
> Thanks to everyone for your help!
> Olaf Alders
> olaf at vilerichard.com
> http://vilerichard.com -- folk rock
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm