On 28/09/12 20:39, Ben Fritz wrote:
<snip>
> If this is too complicated (regular expressions are a powerful tool but can be hard to use; "now you have two problems" and all that) then you can try out a commenting plugin. I've heard good things about "NERD Commenter", which appears to have a "switch comment style" command:
>
>    http://www.vim.org/scripts/script.php?script_id=1218
>
> For some reason I cannot currently find any others which seem regularly maintained. I thought I remembered seeing a wide variety of them at some point.
>
Ben,
your regex works like a charm.
It replaces all occurrences in the file, not just 1 line, as you thought 
and it leaves 1 space at the end of each converted comment (not a 
problem to globally remove).
Now I need to align them. The NERD Commenter didn't work well for me. 
Pity, it looked as though it could solve my aligning problem.
Now I need a K&R style to "braces horizontally aligned" brace conversion :=)
Many thanks,
Bob
-- 
The Sun is out, the sky is blue, it's time to drive the MR2.
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Friday, September 28, 2012
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment