Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
9  
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 '12 at 9:03
3  
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 '12 at 9:57
add comment

3 Answers

up vote 9 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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. –  Warren Young Dec 18 '13 at 10:17
    
@WarrenYoung No html text rendition can be perfect. elvis one is still convenient enough for most simple html documents. –  jlliagre Dec 18 '13 at 10:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.