Friday, September 13, 2013

Editor:: gvim : some useful tips



I'm astound user of [x]emacs and prefer to work with it. For a period, I learned many great tricks which make the coder life a lot easier but then [x]emacs undoubtedly a bit heavy for quick tasks and opening a new window is quite annoying. I tried to use gnuserv which made the job easier but even then the ease of editing is much simplified in gvim.

Some of very useful tips which I would like to access many a times....and could be available for others too who wants help :-), I try to list here -

:%s/abc/123/ - the command will replace abc with 123 [the first instance of 'abc' only, in each line]

:%s/abc/123/g - the command will replace abc with 123 [all the instance of 'abc' in the line]

:%s/abc/123/gc, this will cause VIM to confirm the replacements

No comments: