21

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?

Andreas ZUERCHER
  • 862
  • 1
  • 7
  • 20
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
  • 5
    [**EVIL** is the successor to Viper and Vimpulse](http://www.emacswiki.org/emacs/Evil), and offers almost flawless Vim emulation. I've never used anything else, but I've never had a reason to. :) – Gordon Gustafson Jun 04 '13 at 20:14

8 Answers8

15

I'm a regular vim user but not an emacs user and haven't 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 aren't 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.

Yamaneko
  • 3,433
  • 2
  • 38
  • 57
  • 15
    The latest version of Vimpulse has added text object support. – Alexey Romanov Jul 31 '09 at 15:41
  • 3
    As @AlexeyRomanov mentioned, these are now supported: ;; Vimpulse supports text objects: "daw", "daW", "das", "dap", "dab", "daB", "da(", "da[", "da{", "da<", "da"", "da'", as well as "diw", "diW", "dis", etc. To change an object: "caw", "cas", etc. To yank it: "yaw", "yas", etc. To select it: "vaw", "vas", etc. – huyz May 26 '11 at 01:30
9

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

4

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
  • 11,667
  • 2
  • 26
  • 25
4

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. –  Dec 19 '08 at 19:48
1

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
  • 2,437
  • 3
  • 17
  • 16
0

Incremental search using / and ? is missing.

0

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
  • 14,557
  • 12
  • 70
  • 91
0

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

Vim macros don't work when using viper + vimpulse in Emacs

(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.)

Community
  • 1
  • 1
dreeves
  • 26,430
  • 45
  • 154
  • 229
  • 1
    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 Feb 08 '09 at 17:37
  • Yeah, a little different in that I want the two pieces in separate windows that could, for example, be on separate monitors. – dreeves Feb 08 '09 at 23:13
  • 1
    I'm pretty sure this is not supported. There is a facility provided to use a vim instance as a server, but it just seems to support sending commands to it (from Eclipse, for example) and doesn't actually provide an interactive display. The closest thing I've found is running `vim` under `screen`. – intuited Mar 30 '11 at 19:48
  • Err.. by "this" I meant connecting to an emacs server from a separate client instance — what you seem to be describing in your parenthetical final paragraph. – intuited Mar 31 '11 at 03:11