[tpm] reflowing comments in vim
Fernando Oliveira
fernandocorrea at gmail.com
Thu Dec 8 11:28:07 PST 2011
Maybe something like this would be better:
:function CCC()
: let l = line(".") + 1
: let content = getline(l)
: if(content =~ "^\\s*#")
: execute "normal Jdf#"
: call CCC()
: endif
:endfunction
:map ccc :call CCC()<CR>
Just another Perl Hacker,
Fernando (SmokeMachine)
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
> --
> Olaf Alders
> olaf at vilerichard.com
>
> http://vilerichard.com -- folk rock
> http://twitter.com/vilerichard
> http://cdbaby.com/cd/vilerichard
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20111208/8b9857cb/attachment-0001.html>
More information about the toronto-pm
mailing list