16

I've been using Slackware for a while now, which ships with Elvis as its default editor.

Most other Linux distributions seem to ship with Vim, instead of Elvis. Having gotten quite used to Elvis, will I face a learning curve when moving to a distro which uses vim?

What are the advantages and disadvantages of Elvis compared to Vim?

3
  • 11
    Why don't you just install elvis, then? Just because a distribution includes something doesn't mean you're forced to use it! Debian has it, for instance — aptitude install elvis will do it. By the way, ‘default editor’ is a variable, not a constant. Just set EDITOR=/usr/bin/elvis in your preferred shell's rc.
    – Alexios
    Mar 8, 2012 at 9:03
  • 4
    O'Reilly's Learning the vi Editor has a free chapter on vi clones which compares – among others – vim and elvis to plain old vi.
    – sr_
    Mar 8, 2012 at 9:57
  • Elvis is dead. Vim continues to make progress and is currently being completely refactored as neovim, which will greatly simplify the codebase and plugin architecture, and replace vimscript with Lua, amongst other improvements.
    – Zaz
    Oct 16, 2014 at 11:51

3 Answers 3

15

Elvis and Vim are both highly capable vi clones, so your finger memory will serve you well when switching between them.

They share many vi extensions:

  • Syntax highlighting

  • Multiple undo and redo

  • Visual mode, via v and V

  • Command history and completion

  • Tag stacks (e.g. :tags, :tn, etc.)

  • Multiwindow editing, via :split, Ctrl-W, etc.

  • Extended regexes: alternation, subexpression grouping, etc.

  • GUI version, in addition to the traditional full-screen terminal UI

  • Remote file editing: read/write via FTP, and read-only via HTTP

  • Removal of most classic vi limits, such as on line lengths and file sizes

  • Improved programming support: :make, auto-jump to compiler errors, etc.

As impressive as Elvis is compared to stock Unix vi, Vim is even more capable:

  • Vimscript is much more powerful than Elvis' ex-derived scripting language.

    (Elvis and Vim extended the ex language in incompatible directions. This means you cannot easily port your elvis.ini file to ~/.vimrc unless it's just a list of simple ex commands.)

  • In addition to Vimscript, Vim can be scripted via Lua, Perl, Python, Racket, Ruby, and Tcl.

    (Your local Vim probably doesn't have all of these enabled, however.)

  • The Vim script archive contains thousands of Vim scripts, adding highly useful features, helper applications, games, and more.

    Elvis ships with just a few dozen scripts. There don't seem to be any archives of third-party Elvis scripts. (I tried Googling and only found scripts for Elvis Presley movies. Sigh.)

  • Vim 7.4 ships with syntax highlighting support for about 10× as many file formats and programming languages as Elvis 2.2 does.

    Their syntax definition file formats are incompatible, so you can't easily port between them.

  • Vim 7.4 ships with 18 standard color schemes. If that's not enough choices for you, the Vim Color Sampler Pack is a curated collection of 177 top schemes, as of this writing. There are many more out there besides.

    Elvis 2.2 only ships with three color schemes, and that only if you count the GUI and TUI schemes separately. The Elvis themes archive holds another dozen color schemes, total.

  • Vim has a built-in diff facility with many improvements over command line diff(1) such as syntax coloring and merging.

  • In addition to FTP and HTTP, Vim can also edit remote files via SCP, SFTP, WebDAV, RCP, and RSYNC.

The best reason to use Elvis over Vim today is that it's a lot smaller. The Elvis 2.2 footprint is about ⅕ that of Vim 7.4 on my system. This makes it a good choice for resource-constrained embedded systems, for example.

Elvis is a perfectly capable editor, within its limitations. But, while Elvis has been sitting stagnant for nearly a decade, Vim has continued to improve.

7

As a VI clone, understandably, there don't appear to be many functional differences between elvis and vim. According to Learning the vi Editor, 6th Edition, the only difference in is that elvis doesn't have incremental searching.

There's unlikely to be much of a learning curve moving from elvis to vim - they are after all both based on vi and at the very least share the same basic commands such as navigation, modes, search.

Most likely if you were to install vim and treat it as your primary editor for a day - you'd already know which features (if any) elvis offers that you'd miss, and any inconveniences vim might give you (if any).

I'm not that familiar with elvis, but some of the advantages of vim are the abundance of plugins, and that it's maintained. The latest version of vim (7.3) was released in 2010, the latest version of elvis (2.2.0) was released in 2003.

Note: as commented by alexios - changing distro doesn't mean you can't simply continue to use elvis.

4

As a longstanding elvis user (since probably 1991), there is one elvis feature I'm missing with vim, the display modes.

It is very convenient with elvis to "wysiwyg" edit html and troff manual pages, and the split screen hex mode is also very useful.

Unfortunately, elvis is abandonware since 2004 and misses UTF-8 support which makes me most of the time using vim instead of it.

3
  • 1
    There's a way to lash up a hex editor with stock Vim. Or, as I do, use bvi. For HTML, an editor-independent option is to set up some kind of auto-reload with a real browser. Elvis' understanding of HTML was imperfect a decade ago when it stopped moving. It's gotta be horribly outdated now. Dec 18, 2013 at 10:17
  • 1
    @WarrenYoung No html text rendition can be perfect. elvis one is still convenient enough for most simple html documents.
    – jlliagre
    Dec 18, 2013 at 10:23
  • Elvis is no longer abandonware, as of this writing the last commit is 11 days old: github.com/mbert/elvis
    – user103648
    Feb 18, 2015 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .