views:

2838

answers:

9

There are important features of Emacs which are missing in Vim, such as the comint mode, and there are no scripts/plugins which can replace them.

There are also benefits of Vim over Emacs, such as modal editing and generally better default shortcuts. However, Viper mode gets me both. Vimpulse also enables visual mode. Unfortunately, no mode can make Emacs work as fast as Vim.

So I mostly learned Vim-in-Emacs. What Vim features am I missing?

+4  A: 

Unfortunately, no mode can make Emacs work as fast as Vim.

If you mean that the emacs startup time is poor, you can cut it down dramatically by having an emacs session permanently open, and use gnuclient/emacsclient whenever you need to edit a file.

http://www.emacswiki.org/emacs/GnuClient

That's true, but I still get some delay when using emacsclient (I am under Windows).
Alexey Romanov
+9  A: 

I'm a regular vim user but not an emacs user and havent used vimpulse to confirm this.

but browsing the vimpulse code below i see no mention of text objects.

http://www.emacswiki.org/cgi-bin/wiki/vimpulse.el

Vim introduced some very useful idioms for selection and movement that arent in regular vi

cat 'cut around tag' for xml/html tags

diw 'delete in word'

di( di" delete text within a "" () etc.

in the vim help see :he text-objects for more.

Thanks! Yes, this is very useful.
Alexey Romanov
Just checked and they do not work in Vimpulse.
Alexey Romanov
really helpfull!
Chris
The latest version of Vimpulse has added text object support.
Alexey Romanov
+3  A: 

One vi feature that I miss in emacs is the . (dot) command that repeats the last edit. There is dot-mode.el which implements C-. to simulate this but it didn't always work for me (I am not proficient in elisp to figure out why).

Even viper doesn't implement this command exactly like vi does (last time I checked), and even if it does, I don't think that is enough for me to start using viper.

While reading through other posts here I discovered `repeat-last-command` whose description says: *This command is like the `.' command in the vi editor.*That's not correct, as the `.` command in vi only repeats the last **edit**, while `repeat-last-command` repeats whatever the last command was.
A: 

Vim macros don't seem to work with viper/vimpulse:

http://stackoverflow.com/questions/98225/vim-macros-dont-work

(Btw, the killer emacs feature that makes me care about vim/vimpulse is that different frames can edit the same file. It's like having a split where the two pieces can be in different windows. If anyone knows how to accomplish that in vim, you'd be my hero.)

dreeves
Are you looking for something other than ':split'? Which is vi's command for creating a second view into the same file. ':help windows' gives the scoop. I imagine this is vim -only, not viper.
Leonard
Yeah, a little different in that I want the two pieces in separate windows that could, for example, be on separate monitors.
dreeves
+1  A: 

Incremental search using / and ? is missing.

nope, not missing
Tim Harper
A: 

Being a lover of emacs as an OS and vi as an input model, naturally I wanted to love viper. However within two seconds of using it I had to give it up: viper does not support C-[ as a substitute for the escape key–which is an essential shortcut for the most frequently used command in vi.

Michael Kropat
Can't you add it in .viper?(global-define-key "\C-[" 'the-command-viper-calls-on-escape)
Alexey Romanov
swapping *Esc* with *CapsLock* (globally, through .xmodmaprc or equivalent) seems to be quite popular among vim users.
just somebody
It works here. You can forward any keypress to another by using this little bit of elisp:http://pastie.org/1049554
Tim Harper
+3  A: 

To get a complete list of what vimpulse may be missing type

:helpgrep not in Vi

Every feature in the help that is not vi compatible will be listed.

Theres about 700 matches.

Of course there will be a lot of duplicated functionality

michael
+1  A: 

Vi motion everywhere - in Vi you can always navigate using the same shortcuts, whether you are inside a directory listing, a help file, a write only file or something you're allowed to edit.

Correct visual and delete behaviour - very similar to emacs marking but idiomatically different, so difficult for a Vi user to retrain. If you're already used to the emacs marking you're not really missing anything.

Correct escape behaviour - should cancel all other modal activity and return you to command mode. Again, if you're comfortable in emacs you're probably used to having modal inputs and such anyway.

The obvious chestnuts about Vi being deployed on every nix system in the world (Gentoo purists correct me?) - not a very strong argument in my eyes anyway.

Those are the ones that sprang out during my use of emacs+viper.

Chris Hagan
A: 

I am using Emacs 23.0.93.1 and Ctrl-[ is supported in Viper mode out-of-the-box.

Deech