From: Christian Neukirchen Date: 2005-08-31T22:20:46+09:00 Subject: Re: vim user switch to emacs? "Stefan Schmiedl" writes: > On Tue, 30 Aug 2005 23:37:54 +0900, Christian Neukirchen wrote: > >> Josef 'Jupp' SCHUGT writes: >> >>> When people hear me say "Emacs is great. It only lacks a good editor." >>> they first think that is meant to be a funny remark. It is not. Emacs >>> is a great program I use for many tasks but when it comes to quite >>> advanced editing tasks I usually save the file, do the complex editing >>> in vim, then switch back to Emacs. >> >> Hmm, I'm curious. Can you show me a sample task that made you switch >> to vim? > > The global command, for example: > > :%g/\[CRON\]/d deletes all (uninteresting) cron entries in my auth.log C-x h M-x flush-lines \[CRON\] RET > :%g/Customer$/s/\([^ ]*\) \([^ ]*\)/&2, &1/g > .... give and take a few \ in front of parentheses ... > exchanges the first and second space delimited word in lines ending with Customer M-% ... RET ... ! > Being able to record arbitrary command sequences like (not a real life example) > df.3j04 p (cut upto and including . and paste the deletion 3 lines down after column 4) C-x ( M-z . M-3 C-n C-a M-4 C-f C-y C-x ) Execute with C-x e as often as you want, or bind it to a key of your choice. (Untested, I just wrote down what I'd intuitively type.) > and of course my favourite vim application: vimoutliner (www.vimoutliner.org) Ok, outliners. There are lots of them for Emacs but I admit I don't really like any of them (I prefer org-mode). I know I tried vimoutliner once, but I can't recall how it was... I think I was not too impressed. I use OPML Editor for now when I need outlines. > all of this without breaking my fingers because of the unlucky > positioning of CTRL. Just curious: How do you leave vim's input mode? > s. -- Christian Neukirchen http://chneukirchen.org