In vim, I can find the matching if
statement and prepend the appropriate comment symbol. (e.g. %s/.alarm./#\0/g), but then I am left with dangling endif
s that I have to find manually. I could simplify the process by using macro, but I could I achieve this with sed
(more specifically one in vim)?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|||
|
The problem with a simple regular expression is dealing with nested conditionals; you cannot simply search for the next Combine that with a plugin like NERDCommenter, and you can easily build a mapping for it:
|
|||
|