Slashdot Mirror


Evil, Almost Full Vim Implementation In Emacs, Reaches 1.0

New submitter karijes writes "Evil is a new Emacs major mode intended to implement full Vim emulation for Emacs editor, and it's reached its first stable release. Evil implements many Vim features and has support for plugins, so there is port for rails.vim, NERDCommenter and mapleader among others. You can find details about this release on the mailing list."

38 of 252 comments (clear)

  1. Finally by enec · · Score: 5, Funny

    So finally Emacs gets a text editor! I must say, it's a nice operating system but it's been missing a text editor for quite a while... ;)

    --
    I'm sorry, I only accept criticism in the form of sed expressions.
    1. Re:Finally by Anonymous Coward · · Score: 5, Funny

      The 1980's called and wants its joke back.

    2. Re:Finally by DarwinSurvivor · · Score: 5, Funny

      2013 called and emacs users still want a text editor.

    3. Re:Finally by Mr+Thinly+Sliced · · Score: 5, Funny

      VIM users would call, but a phone isn't in the orignal VI editor, so they don't have one.

    4. Re:Finally by tehlinux · · Score: 2

      When do the emacs phones launch?

      --
      Most linux users don't know this, but the man pages were named after Chuck Norris. Chuck Norris fsck'ing hates noobs!
    5. Re:Finally by kthreadd · · Score: 4, Funny
    6. Re:Finally by TheRaven64 · · Score: 3, Informative

      I think you're confusing vim with nvi. Vim is the one that has a load of features not present in the original vi (e.g. syntax highlighting and persistent undo).

      --
      I am TheRaven on Soylent News
    7. Re:Finally by BrokenHalo · · Score: 5, Insightful

      Some people don't have a Facebook account because they grew up in the 1970s and...

      ...well, some people don't have a facefook account because they grew up.

    8. Re:Finally by Anonymous Coward · · Score: 2, Insightful

      The undo feature in nvi is less compatible with vi than the one in vim. I still prefer nvi's way. It would be nice to have a .vim that emulated nvi editing behavior while keeping the features and better integration with tools like cscope.

    9. Re:Finally by tqk · · Score: 2

      It's hardline antifencists like you who guarantee the continuation of the bloody editor war.

      "Oh, we like both kinds of music; Country and Western." -- The Blues Brothers.

      --
      "Tongue tied and twisted, just an Earth bound misfit ..." -- Pink Floyd.
    10. Re:Finally by fuzzywig · · Score: 2

      I use nano, just to annoy people.

  2. What about viper mode? by dennisr · · Score: 3, Interesting

    Didn't emacs already have this: viper mode? Or was that just straight vi? I for one liked viper mode so I am going to try this new mode out.

    1. Re:What about viper mode? by Celarent+Darii · · Score: 4, Interesting

      Viper mode is good, but it is at times confusing, especially when you confuse it with too many Escapes. Evil has quite a few more features too. Both are good projects, though I think Evil has progressed more.

  3. Um, why? by Citizen+of+Earth · · Score: 5, Insightful

    If you want to use vim, why wouldn't you just use vim?

    1. Re:Um, why? by JWW · · Score: 5, Funny

      This vim is for emacs users who just know vi is better but don't want to fully admit it.....

    2. Re:Um, why? by MoonFog · · Score: 5, Informative

      This is the world of open source software, "because we can" is ALWAYS a perfectly acceptable reason :)

    3. Re:Um, why? by spintriae · · Score: 5, Insightful

      Because vim users would like to take advantage of nice emacs goodies like Slime without changing the way they edit text.

    4. Re:Um, why? by retchdog · · Score: 3, Informative

      someone who always has at least one emacs window open wanted to drop into vim for quick edits without having to save and reopen the file. a throng of under-employed people thought it was cool for various reasons and joined in. same as every other open source project. it is its weakness and strength.

      --
      "They were pure niggers." – Noam Chomsky
    5. Re:Um, why? by inglorion_on_the_net · · Score: 3, Insightful

      I like Emacs's features and find vim seriously lacking. But Emacs key bindings hurt my hands. I use viper, but it confuses me (or rather, I confuse it when I press escape). Maybe I'll give evil a shot.

      --
      Please correct me if I got my facts wrong.
    6. Re:Um, why? by guttentag · · Score: 2

      If you want to use vim, why wouldn't you just use vim?

      That's like asking "why would you install Linux on a toaster oven?" Because it might be possible, and it would be just awesome. Actually, it's probably more like asking "why would you install a toaster oven in my overly-versatile Linux box when the internal temperature already toasts slices of bread perfectly?" Because there are many shades of perfection and if you are to truly understand the zen of emacs you must experience them all.

    7. Re:Um, why? by chromas · · Score: 5, Funny

      and the vi-curious.

    8. Re:Um, why? by suy · · Score: 3, Informative

      If you want to use vim, why wouldn't you just use vim?

      There could be many reasons to that. One might be becase Vim has a limited interface to writing plugins. There are plugins that use the Python interface to create different processes, or one that uses Vim's libcall() to run a task asynchronously, but are just nice hacks that work acceptably, but not great.

      I've been quite impressed by Shougo's plugins, becase, for example, Unite.vim, loads files from the disk in a background task that doesn't make Vim unresponsive, but is still limited in that it seems Vim can not have some kind of timer that polls the background job to update the UI (even less a fully asynchronous interface). The solution is probably resort to using Vim with the client-server interface, but I don't think is the common case of most Vim users.

      On the other hand, lately I've been suffering frequent blocks and even full crashes of Vim when using the clang_complete plugin, because uses Python in some unsafe way.

      In short, a new Vim implementation that doesn't suffer from such limitations would be welcome. I doubt that making that implementation on top of Emacs is the right way, but who knows. Ideally it should be native, but Vim's development is a bit slow. I can't find the relevant links now, but I remember a conversation on IRC that pointed out to a patch that a YankAdded (or something like that) autocommand. The patch was simple, and it would make plugins like yankring and yankstack almost trivial, since instead of doing map tricks, they could plug into such autocommand and work comfortably. But the patch is about 18 months old, and still has not been applied. Bram Molenaar's response is that bug fixes have priority over features (which makes all the sense of the world), but gives a bad impression over the scalability of Vim's development. Last time I checked the version control, Bram was the only one committing.

    9. Re:Um, why? by TheRaven64 · · Score: 5, Insightful

      Emacs scripting is better than that in vim. Vim's scripting language is an abomination, and although it has some scripting bridges to other languages, they are not always installed and bring in big external dependencies. On the other hand, emacs' user interface works on the assumption that a 105-key keyboard means a 105-fingered user. Being able to use emacs' scripting facilities with vim's interface might be quite tempting.

      --
      I am TheRaven on Soylent News
    10. Re:Um, why? by BrokenHalo · · Score: 2

      Simple BOFH approach, assuming presence of the One True Editor(TM):

      ln -s /usr/bin/{vi,vim,emacs} /usr/bin/teco

    11. Re:Um, why? by fahrbot-bot · · Score: 2

      You.do know/you can change those 'bindings' to anything you want right?

      I've used Emacs since the mid 1980s and I've always discouraged changing the standard key bindings and only encourage people to extend using unbound keys sequences. The reason comes from trying to help a co-worker, a long time ago, who had extensively re-bound the standard keys. I couldn't function within his editing sessions and he couldn't function in any other.

      Leaving the standard key bindings in place allows one to be immediately productive anywhere, anytime. Unless you have a good reason, like a physical limitation or keyboard issue, I recommend leaving things standard as much as possible. I carry this philosophy to other areas of sysadmin and life as well. This way others can easily step in when needed - like if I get hit by a bus...

      --
      It must have been something you assimilated. . . .
  4. waiting for ed by Anonymous Coward · · Score: 5, Funny

    If vim and emacs merged into one application, would the resulting application donate Richard Stallman to Uganda?

  5. 'Sup Dog? by bill_mcgonigle · · Score: 5, Funny

    I heard you like to edit text, so I put a text editor in your text editor so you can edit text while you edit text.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  6. VI VI VI by 0WaitState · · Score: 5, Funny

    vi vi vi, the editor of the beast.

    --

    Remain calm! All is well!
  7. Re:vim should implement emacs by c0lo · · Score: 2

    vi? emacs? no normal English speaker knows what these words mean. Do you need to be a cunnilinguist to use these programs?

    FTFY.
    The answer of the question in the correct form above is "Highly probable": after an age, even if still interested in a sexual life, that's about all you can do (and you need to have a certain age to know how to use both vi and emacs).

    Now... get off my lawn, kids.

    --
    Questions raise, answers kill. Raise questions to stay alive.
  8. Funny Story... by Greyfox · · Score: 4, Interesting
    Back in the 90's one of the contracting gigs I took was security auditing code for Data General, for their B2 unix certification. Our team was mostly doing the C standard library but once we finished that we started working on the utilities. One of my co-workers got vi (I got awk and telnetd, but that's another funny story entirely.) He wasn't a fan of vi when he started but he turned into a vi guru and fanatic as he started going through the code. At one point I mentioned that Emacs had a vi emulation, and he started going over it to see how it differed from real vi. I seem to recall that he thought it was a pretty good emulation overall, but he lamented the lack of a couple of fairly esoteric features of vi. We also found a comment in there from the 70's about how the author didn't really like how he was handling something to do with the terminal handling, with a note to fix it one of these days.

    I never liked that newfangled vim. It's far too... colorful. I usually swap it out for nvi, which is much more vi-like. Distributions (like Redhat) that install pico as the default editor make me punch someone. Maybe the guy who thought pico should be considered in any way an acceptable UNIX editor. I always have to swear, abort back to the command line, and export VISUAL=vi.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    1. Re:Funny Story... by 93+Escort+Wagon · · Score: 4, Insightful

      I guess you had to be there, eh?

      --
      #DeleteChrome
  9. That's it!! by ArsonSmith · · Score: 3

    I'm going back to only supporting closed source software.

    --
    Paying taxes to buy civilization is like paying a hooker to buy love.
  10. Re:vim should implement emacs by maxwell+demon · · Score: 2

    Vim is a cleaning powder. It doesn't suck, it scrubs.

    --
    The Tao of math: The numbers you can count are not the real numbers.
  11. Re:Coming up next - Good by Celarent+Darii · · Score: 2

    Try this in Vim:

    (ESC) : !emacs %e

    Edit your file in emacs and then return to vim (just load file "L").

    Your welcome.

  12. Re:Time to recurse by Celarent+Darii · · Score: 2

    Try this for your amusement:

    Launch emacs.

    Step 1: M-x term ; screen vim
    Step 2: in vim type :!emacs
    Step 3: return to step 1

    You can stack as many sessions as you want. Why you would want to do that is of course completely your affair.

  13. Voicemail that doesn't support rotary dial by tepples · · Score: 3, Interesting

    Every time you post 875, someone's going to have to post 1072.

  14. Original vi by Anonymous Coward · · Score: 4, Funny

    For those of you old enough to remember the original vi, with a very limited set of commands and no support for the cursor keys:

    Once we were trying to explain to an MS-DOS Wordstar user how the VI editor works. Here's what we come up with:

    Vi is an editor with two distinguished modes:

    In Edit mode you have all the capabilities of grandma's typewriter right under your finger tips! You can make the very same mistakes as you did with granny's typewriter and your possibilities to correct them are about the same.

    That's why Vi was provided with a second mode, namely the Beep mode. On a vt100 terminal or compatible you can get into Beep mode by pressing an arrow or escape function key. In this powerful Beep mode even the more innocuous keystroke will promptly produce a Beep sound. As an example, arrows, return, blank spaces and most capital letters will produce beeps in the most arbitrary places of the screen. Just think about the whole world of possibilities that this mode gives to you:

    --Compose a monotonic symphony or rap while editing your thesis!

    --Send messages in Morse code to the secretary next door!

    --Keep yourself awake with the clear sound of the Beep tone!

    The variations are endless.

  15. Re:Well, that's cool and all, but.... by elijahu · · Score: 3, Interesting

    I started to agree with you, but then you went a bogus direction.

    "Intelligent people" do understand that it's meaningless (though occasionally amusing) to argue whether vi/m or emacs is better, but that's because they understand that if you've invested the effort to truly learn and use either, that your text editing capability will be far superior to what can be done in any other text editing tool.

    Yes, it's just text editing. While there are some new features that crop up from time to time as new tools or formats come along, the basic complexities of text manipulation have been pretty well figured out and solutions implemented for a long time. This is the reason why emacs and vi/m remain so successful, because they remain a collective memory of decades worth of solutions to text manipulation challenges (just as Linux is a collective memory of solutions to computing challenges). There's a whole world "in" there, it just takes a bit of devotion to explore it.

    There have not been "superior" alternatives to both. There have been attempts to try to because emacs and vi have steep learning curves. The alternatives have invariably fallen short, however, because while you can dumb down an interface, you lose that ability to effectively tap into that vast pool of solutions emacs and vi offer. You also loose the efficiency gain from their ui philosophy, which may have originated in the 70's low-bandwidth terminal mentality, but guess what, it's still just text on the screen and those old mentalities still have more relevance than you may understand.

    The alternatives also all tend to fail to capture the full scope of the capabilities that emacs and vi offer. Someone further up the thread called them 'esoteric'. If your job is to manipulate text all day long, those 'esoteric' factors can have a tremendous impact on your effectiveness.

    Muscle memory is, indeed part of it, but not the full story. Its about effective use of my time. It's not that people that use emacs or vi are "thinking to hard", its that people who aren't are working too hard and maybe haven't though enough. While you're scratching your head and waving your mouse pointer around trying to find the right menu to do open to reveal some set of options from which you have to choose which one might or might not fully do the text manipulation task you need it to do, I've already done exactly what I wanted to do with a few keystrokes. The next time it needs to be done, you'll still be wandering through your menus, and it will still just be a few keystroke for me (possibly fewer if I've made a macro). Its about investing the time to learn from the folks that already figured it out, and having a system that makes future repetition of that process as streamlined as possible.

    Oh, and universality... you may think Unix is niche, but there sure seems to be a lot of it around. It's pretty hard to find one that doesn't have vi, emacs, or both on it. Macs are also niche, I guess, but there again you'll find vi and emacs just a terminal prompt away. Maybe your world is Windows-centric. I'm sorry, but even there you can easily download either. The investment made in learning the capabilities of either are useable on any system you might encounter. There are few (if any) alternatives that can make the same claim and offer the same features.