Slashdot Mirror


Neovim: Rebuilding Vim For the 21st Century

An anonymous reader writes "Neovim is a major overhaul of the vim editor to provide better scripting, cleaner support for plugins and integration with modern graphical interfaces. Modernising the large and complex codebase of Vim is a formidable task, but the developer has a clear plan, and has already begun work. There's a Bountysource fundraiser running to support the effort. If Vim is your editor of choice, check it out." (The crowd-funding effort has only one more day to go, but has well exceeded already the initial goal of $10,000.)

25 of 248 comments (clear)

  1. Obligatory xkcd, and rirst post by Anonymous Coward · · Score: 5, Funny

    http://xkcd.com/378/

    1. Re:Obligatory xkcd, and rirst post by tlhIngan · · Score: 2

      Vim has loads of states. They just aren't official "modes".

      You are in insert mode, nothing pressed. That's a state. You press shift-y. "Y" appears in the text.

      You are in command mode. That's a state. You press "y". It does something completely different.

      But wait... you're also now in a different "state"! If you press "y" again, it will do yet a third thing: copy a line of text. But if you hadn't pressed the first "y", it wouldn't do that. So pressing "y" the first time puts it in a special "state".

      Vim has a boatload of special states. And they are anything but obvious or visible. That's bad.

      The alternative is to have a bunch of modifier keys to do stuff. Like say, Control, Alt, Meta, Command, Option, AltGr keys that have to be held in various ways to do stuff.

      If you think Emacs goes nuts with it - well, that's what happens - because you need to be in an edit mode all the time, to do anything else requires pressing a whole combination of modifier keys to tell the computer you want to do something different and not just input text.

      Like to delete a line, you have to tell the computer to start highlighting text, to end highlighting text then what you want to do, i.e. delete it.

      These days, we use a device called a "mouse" to do it, and for a lot of Emacs usage, a mouse and menu seem to be the best way to use it.

      But that's an annoyance (Emacs was designed for the Space Cadet keyboard, which has, I believe, 7 modifier keys) once you start having to do stuff like Ctrl-Alt-Shift or Command-Option-Shift to do things. Which is why stateful editors like vim are popular. In fact, vim isn't fully stateful - it allows a lot of things to happen in insert mode - like backspacing, moving the cursor around to delete older text, etc.

      In fact, some Vims are such that commands like copy and paste are also able to do be done in insert mode - Windows for example (which is why Visual Block mode is not Ctrl-V, but Ctrl-Q) because you can hit Ctrl-V and paste (in command OR insert mode) what's in the Windows clipboard.

      Vim is stateful, and the reason why people do like stateful editors is well, they can navigate their document without having to go through special commands that require multiple modifiers - like using % to find matching braces/brackets/parens, etc. But Vim also highlights the match if it's visible. Or my personal favorite of navigating up and down with my fingers on home row - no moving my hand to the cursor keys, or to the mouse.

    2. Re:Obligatory xkcd, and rirst post by fisted · · Score: 2

      Vim has a boatload of special states. And they are anything but obvious or visible. That's bad in the first weeks, then suddenly it becomes very good.

      FTFY

  2. Trivially accomplished by smittyoneeach · · Score: 4, Funny
    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    1. Re:Trivially accomplished by iggymanz · · Score: 4, Funny

      for those who wonder how Stallman could flounder around for 35+ years and not produce a viable OS, look no further than his "editor"

  3. formidable task != $10k budget by Anonymous Coward · · Score: 5, Interesting

    if someone came to me to evaluate their budget reasonableness for something they described as a formidable task taking more than a week or two, and asked for $10k, I'd know they were egregiously underestimating or something is missing.
    (and as TFA says: "Over its more than 20 years of life, vim has accumulated about 300k lines of scary C89 code that very few people understand or have the guts to mess with."... that's pretty formidable)

    I suppose some ambitious person living in a low cost of living locale could survive for 6 months on 10k, and that would be a fair amount of work time; toiling in their barren garret or tower.

    TFA says "$10,000 will allow me to dedicate two months of full time work to this project, which will be enough to implement the following:"

    Is $5000/mo a reasonable sum in Recife, Brazil? Probably.

    Is 2 months sufficient time to do all he wants to do? I'm not so sure. That's a pretty long list of things he wants to do.

    1. Re: formidable task != $10k budget by loufoque · · Score: 2

      A consulting company would ask 1,000 to 2,000 per day, so 40,000 to 80,000.

    2. Re:formidable task != $10k budget by Anonymous Coward · · Score: 2, Interesting

      I'm a Brazilian, though I don't live in Recife.

      > Is $5000/mo a reasonable sum in Recife, Brazil? Probably.

      Agreed.

      USD $5,000 is a hefty sum in Brazil to be earned for a month's work, though it's not obscene. Some things are way expensive here (like cars and houses), some are somewhat more expensive (like computers) and some are cheap (like food). We're more or less like an inverted Japan, in economic terms.

      From his previous initiatives, the guy seems to belong to a category with few people who could deserve to be that well paid.

      He says he has a son; from experience, considering what is involved when one is not single, I'd say he made a good estimate about what he needs for survival while tackling with this project.

      > Is 2 months sufficient time to do all he wants to do? I'm not so sure.

      Again, agreed.

      But then that's the "stone soup" idea: you call people's help to do something which seems impossible and -- whether it's feasible or not -- something wonderful happens as people join in and make the miracle happen. It's one of the most powerful visions if one has ever witnessed such thing and makes one hope we will one day vanquish things like wars.

      By the way, others do that but not always with good intentions. At least, he has clear and valid objectives IMHO.

      My point here though is that he wants vim to be made more easy to develop, probably because he likes vim a lot. Even if things turn up up harder to do and it takes him one year to finish, maybe we get a richer development ecosystem and a more modular application.

      That would be indeed nice.

      We are lucky that he wants to do such things, but I'd advise him to pay greater attention to the incoming baby and get a stable position (e.g. in public service) and dedicate less time to free software.

      That said, I had to introduce vim at work because notepad is a piece of garbage and now the problem is lay people want to use it. I'm feeling a bit like Prometheus and scared of having to push big stones over mountains.

  4. Certainly as a fork... good luck by inflex · · Score: 4, Interesting

    I admit to being curious to see how this one goes as a fork off the existing vim codebase, but I'm not sure I'd be putting any bets on its long term viability. I suspect an overdose of optimism and insufficient compelling reasons for users to shift from vim will starve this project out.

    Good luck to the developer - it's going to be one hell of a learning experience.

  5. Vim's Bram Moolenaar on 'Neovim' by RDW · · Score: 5, Informative

    https://groups.google.com/foru...

    "It's going to be an awful lot of work, with the result that not all systems will be supported, new bugs introduced and what's the gain for the end user exactly?

    Total refactoring is not a solution. It's much better to improve what we have. Perhaps with some small refactorings specifically aimed at making Vim work better for users."

    1. Re:Vim's Bram Moolenaar on 'Neovim' by jjohnson · · Score: 4, Informative

      what's the gain for the end user exactly?

      The origin of the fork is that tarunna submitted two large patches to vim that would have fixed a lot of process management in vim, and was rejected because the current vim codebase is so large and crufty that it's impossible to make major architectural changes to it, like allowing for async process management, just because the risk is too high (especially when there's literally one person, Moolenaar, with a commit bit and thus accepting responsility for every change). And the risk really is very high, I'm not faulting Moolenaar for this.

      The gain is that (neo)vim will be able to keep up with current technologies in its plugins (like non-blocking operations), it'll allow plugin authors to write faster plugins by speeding up the plugin architecture, existing plugins will see a speed increase, and other programs will be able to embed vim as an editor rather than hacky "vim keybindings" plugins. Given time and asm.js, it'll run natively within a web browser. None of these were in reach with Moolenaar squatting on the code rejecting risky patches. Sounds like a lot of gains to me.

      --
      Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
    2. Re:Vim's Bram Moolenaar on 'Neovim' by jjohnson · · Score: 4, Insightful

      The root problem here that tarruda is addressing (and he's very explicit about this in the neovim newsgroup) is that the code needs to be refactored for maintainability and to open up the development process. There's one guy in the world who really understands the codebase, so we're all one sleepy bus driver or bursting blood vessel away from vim becoming a frozen pile of code. Tarruda's starting point is refactoring out huge swathes of platform specific code, to be replaced with a single dependency on libuv for cross-platform support, to get to full test coverage, to modernize the C, and to craft a multi-developer process that allows for modern ongoing development by a large number of people, like other OSS projects have.

      All the user focussed gains that will flow from that are real gains, but really what Tarruda is doing is freeing Moolenaar from the corner into which he's painted himself. I like to think that Moolenaar (like Stallman with JWZ's fork of emacs) will come around, see the real improvement in the fork, and arrange to cut over to it.

      --
      Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
  6. Re:There's a reason people argue about vim and ema by Antique+Geekmeister · · Score: 2

    It doesn't work as well as you might wish. X11 has, historically, not compressed well for remote graphical interactions. The problem is compounded when running X sessions over a VPN to a remote environment, and using the graphical environment hosted inside the GUI to the virtual machine manager.

    I've found vim very useful when memory or resource squeezed. Emacs's tendency to leave temporary scattered copies of large edited files is particularly dangerous when trying to salvage database backups on a cramped partition. But the tendency of vi users to confuse their personal display settings for indentation with the actual text in the files they edit has caused enormous problems. This especially happens they submit code following indentations standards that exist only in the .vimrc somebody has been mailing around for the last six years, and which no other group in the world uses, and then they complain when the authors of the original software regularize the whitespace on submitted patches.

  7. Re:There's a reason people argue about vim and ema by EvolutionInAction · · Score: 3, Informative

    It's pretty obvious that you've never had to debug deployed embedded systems. This isn't ancient history buddy, it's something I have to do regularly. Certain fields have requirements that just aren't going to go away.

  8. Full blown vim in a good IDE:one of my dreams by rabbin · · Score: 5, Interesting
    Vim has to be one of my favorite programs but I rarely use it for any "ambitious" coding project because it lacks critical features that an IDE provides (the plugins don't cover these gaps either). Right now I'm using Netbeans with the jVi plugin (provides a subset of common vim behavior) for c++ programming and it works well, but if an IDE plugin could simply embed instances of vim into the program itself and have it work seamlessly with the existing IDE features (e.g. advanced code understanding of inheritance hierarchies and type deduction) that would be the ideal. With this in mind, the following from the website sounds really promising:

    First class support for embedding

    Since Neovim will be provide the interface to interacting with text, any program will be able to tap into this potential and be able to include Neovim commands right in the application.

  9. Re:Never understood the modes by chispito · · Score: 3, Insightful
    If you don't care for the modes, why do you still use VIM? I'm sure there are better suited editors to your preferences.

    Vim is nice and I actually use it for programming, but jumping between the command mode, insert mode and visual mode still slows me down a lot. Why can't we just be in insert mode constantly and use Ctrl+something for all the commands? Also use Shift+arrows to select text?

    --
    The Daddy casts sleep on the Baby. The Baby resists!
  10. Re:Never understood the modes by zippthorne · · Score: 5, Interesting

    Vim isn't about typing. It's about manipulating text. Some of which involves typing and that's why it has insert mode, but a lot of it is about finding your place in a document or moving one block of text from one area to another area, or changing all of something into something else according to a pattern, and you can do all of this without taking your hands off of the keyboard.

    Why, oh WHY, do those #?@! nutheads use vi? makes a pretty reasonable argument.

    --
    Can you be Even More Awesome?!
  11. Re:Never understood the modes by RabidReindeer · · Score: 2

    Vim is nice and I actually use it for programming, but jumping between the command mode, insert mode and visual mode still slows me down a lot. Why can't we just be in insert mode constantly and use Ctrl+something for all the commands? Also use Shift+arrows to select text?

    Vi was originally designed to run over a very slow modem - say 300 baud over a device with minimal keyboard (no arrow/cursor keys).

    Once an editor gains a certain degree of power, you run out of Ctrl+ keys.

    My gripe with the vi approach is that it assumes that commands are the rule and text entry is the exception. Most other editors - including the ones I grew up with - are of the opposite point of view.

  12. Re:There's a reason people argue about vim and ema by Waffle+Iron · · Score: 5, Informative

    I tried your scenario.

    If play your boss and I exit with ':q', no problem. Your version is still there.
    If I exit with ':wq', vim says: "E45: 'readonly' option is set (add ! to override)"
    If I exit with ':wq!', vim says: "WARNING: The file has been changed since reading it!!!
    Do you really want to write to it (y/n)?"

    So I conclude that one of the following is likely the case:
    a) your boss is was an idiot who would ignore a message ending with three exclamation points
    b) you boss installed a bizarre custom vim config file that somehow allowed silent overwrites of modified files from readonly mode
    c) your story is a fabricated troll

  13. Viper-mode by tepples · · Score: 2

    The editor that comes with Emacs is called Viper. Have you tried it?

  14. Re:There's a reason people argue about vim and ema by Waffle+Iron · · Score: 2

    I bet his boss used ZZ to exit all the time. It's the vi lazy way to save and exit, no questions asked.

    I tried that, too. It still won't let you write in readonly mode without warning you.

  15. Re:Broken link by koinu · · Score: 2

    Well, there is no successor to vim without saying that it sucks.

  16. Re:There's a reason people argue about vim and ema by BitZtream · · Score: 5, Funny

    My previous employer did work in CICS for years, he's well out of the development game now and a 'serial startup guy' as he likes to call himself.

    He KNOWS how to code, or at least, once did, I've heard from enough people that knew what he did at some large companies and validate his skills.

    He will straight up ignore every fucking popup window that gets in front of him and just next -> next -> next -> finish through (windows user now) everything, or click whatever button seems most obvious on the popup ... never reads anything.

    We had a 'bug' in the installer I wrote. He and another 'old dude' who used to be on the xml standards committees (again, this guy has clout in technical circles of yester year). The bug was that it would reboot your machine, without asking you, during install if you had Outlook open and it would close ALL of your apps without prompting for saving or anything else ... (it was an outlook plugin, easier to not install with Outlook open than to tell people they need to restart outlook for reasons that will become clear shortly).

    So after explaining that I never could get that to happen to me in my environment (was working out of the country at the time, getting to stand next to them and watch them wasn't happening and for some reason I can't recall, vmc wasn't really an option either) I finally got back to the office where I could watch the process, where I was waiting to see how my NSIS installer was magically making things like Excel and Word close without saving files ...

    BOTH of them, got to the point where a popup came up and said 'Outlook is open, close outlook to continue ' and they'd just click next ... at which point the installer says, Outlook is still running ... a reboot is required to complete this installation, do you want to reboot now?' and they click next so fast I couldn't even stop them.

    Better still ... when Excel started asking them if they wanted to save ... ON THOSE DIALOGS they fucking clicked NO, so fast I couldn't even say 'whoa, wait a second' their machine was already rebooting ... after they clicked AT LEAST 4 boxes from different applications trying to slow them down and prevent the mistake.

    The bug, was a PEBKAC bug with a bit of ID10-T thrown on top. I had to physically remove the mouse from one of their hands and run the installer myself to get them to actually read the message that they claimed they weren't seeing.

    Another related story. I'm an IT guy, I have all those same IT shitty users stories most of slashdot has :) My pet peeve (like many of us) is people who don't read the message, and my wife, who has known how much that pisses me off since at least 2001 when it became a bigger issue for stupid reasons at one job calls me up the other day from her new job.

    They sent her an email that she needed to change her password, they rotate on 90 days intervals. Its a university with some sort of identity management system in place that syncs all their systems and password changes are done via a website, fairly common setup for a university it seems though I don't know the specifics of the software involved yet.

    So she clicks the link, changes her password and then tries to go visit some research paper website they have internally for internal releases of research papers for internal review and discussion before submitting to more formal publications, so she gets there and it says something wrong with her login/password. It never asks for a login password, just says no. So my eyes, recognizing that kerberos and/or ntlm is in play here said to her 'look sweetie, I don't know your setup, but since its not prompting you for a password, I bet if you just logout and log back in, it'll work. (Windows 'auto-corrects' a lot of silly issues for kerberos stuff on login and of course reinitializes your authentication ticket at login so your

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  17. Re:There's a reason people argue about vim and ema by rvw · · Score: 2

    Your scenarios are way too complicated. It's simple as this: the boss didn't open the files in readonly mode.

  18. Re:There's a reason people argue about vim and ema by gnupun · · Score: 2

    You're right, they both kinda suck UI wise and they carry over their 70s design decisions 40 years later. But in vim's defense, if you have a lot of commands to execute in command mode, there's very little finger effort (i.e. typing) required to execute a series of editing commands (dd, yy, p, etc). Doing the same in your typical IDE would require you to constantly hold down the ctrl, command, alt and/or shift keys while executing a command modelessly. This causes finger strain over time, not to mention it is slow. I don't think any other editor gives you cruise control like vim in command mode.