VIM makes my life easier
2009-03-05 4:34 pm ∴ Programming,Thoughts ∴ Tags: , , ∴ by matt -

So today, I had to comment out a bunch of links on a static website. It was only linked from 10 or so pages, so I thought writing a regex to comment out just that link would be too bothersome. I decided to just use VIM. Here’s how easy it was:

<Enter>  -- Open the file in WinSCP
:41 -- go to the line number of the tag to comment out
vat -- select all of the tag
<Alt-X> -- Comment out the selection with the EnhancedCommentify plugin
ZZ -- save and close
<Down-Arrow> -- go to the next file in WinSCP

That’s all. If I had more commands to do, I could record a macro and get everything down to around 6 keystrokes. Can’t beat that.

Comments are closed.