Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts

Tuesday, August 27, 2013

How to edit multiple files automatically with vim

From time to time I may have a slew of files that I need to make bulk changes to but don't want to edit each one by hand.  A quick and easy way to do this is by using vim's -c option.  For those of you who are thinking "what about sed?" just hold on to your seat.  The sed command is also a favorite of mine, but the mood just struck me today to talk about vim.

Almost everyone who uses Unix or Linux agrees that vim (or vi for the super-hardcore folks) is the editor of choice.  Pico and nano are for sissies.  Emacs, you say?  I believe the old joke goes "Emacs is a great operating system but lacks a good editor."  I give you a +1 if you get the joke.  Kidding aside, let me get to the point of the post.