Bob,
Perhaps something along the lines of http://astyle.sourceforge.net/
would be what you are looking for. Simple regexes might not be what
you're looking for here.
Marc
On 28/09/12 04:00 PM, Bob von Knobloch wrote:
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
--
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