Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
GNU is Not Unix Software

Evil, Almost Full Vim Implementation In Emacs, Reaches 1.0 252

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."
This discussion has been archived. No new comments can be posted.

Evil, Almost Full Vim Implementation In Emacs, Reaches 1.0

Comments Filter:
  • Finally (Score:5, Funny)

    by enec ( 1922548 ) * <jho@hajotus.net> on Saturday February 16, 2013 @12:34AM (#42919741) Homepage
    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... ;)
  • Mainly the Linux emulator for emacs.

  • Comment removed (Score:3, Interesting)

    by account_deleted ( 4530225 ) on Saturday February 16, 2013 @12:43AM (#42919777)
    Comment removed based on user account deletion
  • Um, why? (Score:5, Insightful)

    by Citizen of Earth ( 569446 ) on Saturday February 16, 2013 @12:50AM (#42919803)
    If you want to use vim, why wouldn't you just use vim?
    • Re:Um, why? (Score:5, Funny)

      by JWW ( 79176 ) on Saturday February 16, 2013 @12:52AM (#42919813)

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

    • 'Sup Dog? (Score:5, Funny)

      by bill_mcgonigle ( 4333 ) on Saturday February 16, 2013 @01:07AM (#42919869) Homepage Journal

      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.

    • I'm also trying to figure out the point to this.

      • Re:Um, why? (Score:5, Informative)

        by MoonFog ( 586818 ) on Saturday February 16, 2013 @01:40AM (#42920051)
        This is the world of open source software, "because we can" is ALWAYS a perfectly acceptable reason :)
      • I'm also trying to figure out the point to this.

        There are many nice application and interaction packages for Emacs, perhaps people might want to use them with a less contrived editing interface?

    • Re:Um, why? (Score:5, Insightful)

      by spintriae ( 958955 ) on Saturday February 16, 2013 @01:42AM (#42920059)
      Because vim users would like to take advantage of nice emacs goodies like Slime without changing the way they edit text.
      • Also Emacs has very good Prolog mode that communicates directly with the Prolog debugger so you can do line by line execution, watch variables, etc.

        • by 1s44c ( 552956 )

          Also Emacs has very good Prolog mode that communicates directly with the Prolog debugger so you can do line by line execution, watch variables, etc.

          That's great if you program prolog but I've not used prolog since university.
          Slime seems to be a lisp thing. I've never used lisp.

          What else have you got?

    • Re:Um, why? (Score:4, Informative)

      by retchdog ( 1319261 ) on Saturday February 16, 2013 @01:46AM (#42920079) Journal

      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.

      • Wouldn't it just be easier to use emacs if you already have it running? I thought the major argument (other than usability and ubiquity) for using vi/m over emacs was startup time...

        drop into vim for quick edits without having to save and reopen the file

        If you already have it open in emacs, just save it and leave it open...?

    • Re:Um, why? (Score:4, Insightful)

      by inglorion_on_the_net ( 1965514 ) on Saturday February 16, 2013 @02:08AM (#42920153) Homepage

      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.

      • by Jmc23 ( 2353706 )
        You.do know/you can change those 'bindings' to anything you want right?
        • 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 ph

    • 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.

    • Re:Um, why? (Score:4, Informative)

      by suy ( 1908306 ) on Saturday February 16, 2013 @04:49AM (#42920623) Homepage

      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 [github.com], or one that uses Vim's libcall() to run a task asynchronously [github.com], 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.

    • Re:Um, why? (Score:5, Insightful)

      by TheRaven64 ( 641858 ) on Saturday February 16, 2013 @06:49AM (#42920975) Journal
      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.
      • by phayes ( 202222 )

        thank you for the 105 fingered image, lol.

        I've always regretted not keeping the Lisp Machine keyboard I used 25 years ago: Shift-Control-Alt-Meta-Super-Hyper-X...

      • 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.

        Hmm, the Lua binding is hardly a "big external dependency". And, when combined with LuaJIT 2... :-)

    • because if I could have vim inside emacs and get to have emacs ORG Mode, all the better!
  • by Anonymous Coward on Saturday February 16, 2013 @01:03AM (#42919859)

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

  • I'm evil. And I've been evil for years...
  • VI VI VI (Score:5, Funny)

    by 0WaitState ( 231806 ) on Saturday February 16, 2013 @01:38AM (#42920039)
    vi vi vi, the editor of the beast.
  • Funny Story... (Score:5, Interesting)

    by Greyfox ( 87712 ) on Saturday February 16, 2013 @01:46AM (#42920083) Homepage Journal
    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.

    • Re:Funny Story... (Score:5, Insightful)

      by 93 Escort Wagon ( 326346 ) on Saturday February 16, 2013 @02:01AM (#42920129)

      I guess you had to be there, eh?

      • Eh, this is oldschool unix stuff. Go back to the front page for more worthless stories on things you're more comfortable with, like copyright, drones, and other day-to-day bullshit politics. We' re talking about vi here, kindly fuck off.
      • by Greyfox ( 87712 )
        The moral is, you're a total bitch! [youtube.com]
    • by CAIMLAS ( 41445 )

      I have to wonder how anyone would actually run into these editors, like pico? I've rarely 'accidentally' run an editor I didn't want to run. Emacs is not lurking in the background somewhere when I type 'vi(m)' to edit files.

      • by dissy ( 172727 )

        The command 'visudo' will launch whatever editor is defined in an environment variable, and if that is not set it will traverse the /etc/defaults/ tree.

        On certain distros a brand new install will have those set to pico or nano.
        After having configured the defaults on a previous system many years prior, one tends to forget about that "feature" even existing.

        Not coincidentally, using visudo is more likely immediately after a new installation as well, and where I most often first run into it.

      • Some systems have a symlink to editor and/or an environment variable for other programs to check if they feel the need to start a 'default' editor.
      • I have to wonder how anyone would actually run into these editors, like pico?

        Raspberry Pi.

        The default image contains pico but not vi. Installing vi requires installing quite a few dependencies and on that slow machine takes time. End result is that it's actually simply easier to run pico.

        Or simply use a linux image with a decent text editor :-)

      • by Greyfox ( 87712 )
        I don't know, really. I just always seem to somehow end up in pico (or nano I suppose) at some point in the system install or on a new account somewhere. Oh yeah, IIRC it's usually 'crontab -e'. A few years back I stole a bash_rc.d directory style approach to bashrc from cygwin. I should just sanitize my startup scripts and check the whole damn directory into github. That'd let me pull my user environment to any new machine I ever have to work on, and I'd have VISUAL set by default after that. Hmm. Probably
    • by c ( 8461 )

      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.

      My instructions for installing a new Debian(-like) build system at work include "apt-get purge nano" as the first thing you do once you're able to login. After (over? Yes. Fuuuuccckkkk....) 20 years, I just can't use an editor where "hjkl" aren't cursor

    • by CODiNE ( 27417 )

      Distributions (like Redhat) that install pico as the default editor make me punch someone.

      Is this anyone in particular or just whoever is closest?

    • by jgrahn ( 181062 )

      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.

      Debian does this too (installs nano by default as a newbie-friendly always-works editor). If you're the admin, the right way to solve it is to uninstall pico.

      I'm an Emacs user, but if you're serious about using Unix you need to be able to handle some simple editing using vi -- sooner or later you're stuck with a system which has nothing else.

    • Emacs and its Lisp extensions are great, unbelievable it was made more than 30 years ago with no successful "competitor" (not only editors, but almost everything else: something with that level of customization thanks to a clever "scripting" (lisp) integration). To realize how Emacs is good, just look at Gimp: they tried to implement a similar Lisp based architecture (script-fu) and is, unlike Emacs, all but practical and convenient (eg macros like "C-x (" in Emacs?). I use Vim to do quick changes, but long
      • > Emacs and its Lisp extensions are great, unbelievable it was made more than 30 years ago with no successful "competitor"

        There's a reason for that. When your user base is a tiny, although fanatic, fraction of the editing public, there isn't really room for a lot of different products.

        As an admin in the early days I had to support Emacs and Jove (because one version of Emacs was apparently not enough...) because three of our programmers used it. The rest of us used VI, not because VI was "the best", bu

  • The only Linux terminal-mode text editor I can stand using is Midnight Commander.

  • by ArsonSmith ( 13997 ) on Saturday February 16, 2013 @03:07AM (#42920313) Journal

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

  • ...or is it more like mixing Star Wars and Star Trek?

    • Emacs and Vi are different - actually everything that can be done in Vi can be done (or implemented via the creation of a lisp function) in Emacs. The thing is, Vi loads quickly, and its search/replace, line number based commands and (relatively new) syntax highlighting makes it the preferred choice while working in a terminal for rather quick and small changes. While Emacs is more of an application that remains opened from start to end of a user session, loaded with a number of files, directories, lisp fun
  • That was the feature i was waiting for since 1994, and due to which i switched away from emacs 5 years ago.

  • I heard you liked an editor in your editor, so we put and editor in your editor so you can edit while you edit!

    While funny for slashdot - it's basically like watching people arrange deckchairs on the Titanic. These are tools - tools to get your job done. Use the best tool and stop circle-j-ing about this over that/etc. I use both whenever it suits me; but don't do any serious development in either anymore. There's so, so, so much better tools out there than these tired old things.
  • By the way, not to belittle the project in any way, but you can already run vim inside of EMACS by the following:

    M - x (return) term (choose shell) ; vim

    You get the whole vim in an emacs term buffer. What you don't get is any real integration (you are stuck in vim, but your mouse can get you to another buffer if you need to). Evil is much better in that you are still in emacs while you use vim shortcuts and commands and you can get into emacs easier for slime and the rest.

    You can even launch screen inside a

    • by phayes ( 202222 )

      Access to emacs-lisp & emacs macros are the reasons why hardcore VIM users are interested in an emacs VIM mode. You get the latter by running vim inside emacs term, but not the former.

  • nothing is like a good holy war, and thats pretty much why i've been following the vi/emacs threads for years without actually trying any of them for more than 2 seconds. the doctors said i stabbed myself with my bare hands in both cases. so what is the difference between these editors anyway ? except for having weird key combos?
    • by ImdatS ( 958642 )

      You, Sir, are starting a new Holy War! It might be the War to End All Wars, but, nevertheless, it is a new Holy War...

  • Running VMS 3.7 or 3.8, IIIRC. He really liked the vt200 keypad integration of EDT. Was a bit envious of the multiple buffers we had though, and then I wrote an elisp program to convert assembly language listing back to source so we could produce product-specific documentation for the regulators; that was too much. He switched to emacs+edt mode.

    My favorite emacs story though is still the guy I worked with who used it as his login shell on BSD.

  • Original vi (Score:4, Funny)

    by Anonymous Coward on Saturday February 16, 2013 @08:19AM (#42921303)

    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.

  • by gbr ( 31010 )

    Everyone knows that Wordstar was the 'one true editor'.

  • Clearly, the thing lacking here is for both vim-in-emacs and emacs-in-vim to be so feature complete that you can nest them until you exhaust available memory. I propose that we codename the project to create this "straightline" , as it shall generate infinite jokes on /.

  • Geeze, I remember back in the... probably eighties... an VI emulator in Emacs. The Emacs squids (all two of them) were selling it hard as superior to native VI in every way. So I tried it... and it was pants. In order to use it effectively, you had to be skilled in both Emacs *and* VI, which kind-of negates the purpose. I didn't use VI because I thought it was superior, I used it because it was ubiquitous. Having to learn Emacs so that I can use a VI emulator is insanity.

Like punning, programming is a play on words.

Working...