Skip to content

Instantly share code, notes, and snippets.

@munyari
Last active August 18, 2016 21:22
Show Gist options
  • Save munyari/a19eba6c26732c5111a24a0664d99005 to your computer and use it in GitHub Desktop.
Save munyari/a19eba6c26732c5111a24a0664d99005 to your computer and use it in GitHub Desktop.

Wow, I just lost all of this 🙁 never typing a long comment in zulip again.

TL;DR at the bottom.

Spacemacs and neovim are somewhat different projects, with different goals. Spacemacs is a community-driven distribution of useful plugins bundled together with it's own customization framework, designed to show vim users just how awesome emacs can be. In that way, it's similar to Janus for vim (interestingly, just yesterday I saw spacevim).

Neovim is a full-fledged fork of vim. It started when some vim developers clashed with Bram, the creator and lead developer of vim, over adding features, and probably the overall direction of the project. A notable feature that they wanted but Bram didn't was asynchronous job control (this is finally landing in vim 8).

Here some of the goals of neovim:

  • Encourage new development This has been pretty successful. Vim development has picked up in the last couple of years, probably partly to due to with the competition of neovim. They definitely made more people pay attention to the vim ecosystem. Vim will have async features, which probably wouldn't happen without neovim's influence. Neovim itself also benefits from any development of vim, so that's a win-win.
  • Drop support for legacy platforms From here, vim supports "All Unix platforms. All Windows platforms. Amiga, Atari, BeOS, DOS, Macintosh, MachTen, OS/2, RiscOS, VMS, IBM z/OS." I've never even heard of some of these! That means major changes require considering all these platforms, a major annoyance.
  • Use lua as a configuration language Vimscript is very hacky and quite hairy. It's performance is also horrible. The neovim project has converged on lua as a suitable configuration language. There's work ongoing to build a VimL to lua transpiler. (Note: you can't write your config in lua yet, I think it's on the roadmap though).
  • Refactor and update the code Development on vim began in 1991, and it still uses C89 a ton of places. That can be pretty hairy, and hard to maintain. There's been a lot of work put into refactoring the code, with more modern C & best practices. Neovim also has less code than vim, which means less space for bugs.
  • Refactor vim into a library By decoupling the editing and it's display, neovim can be embedded in other applications. So instead of a possibly-crappy vi-emulation layer, projects can embed neovim. Imagine using IntelliJ/your browser and using literal vim inside that. With access to all your plugins. There aren't many projects doing this yet, but it sounds awesome. SolidOak is a Rust IDE that does that, but unfortunately, I've never been able to get it to build 🙁

Features of neovim:

  • Asynchronous job control
  • A built-in terminal emulator
  • Sensible defaults - basically Tim Pope's sensible defaults plugin, but since neovim doesn't have all this stuff it has to be backwards compatible with, things like syntax highlighting can be turned on by default

Which one should you use?

I do think that emacs is significantly more powerful than neovim due to its ridiculous extensibility. The plugins range from good to amazing.

Personally, I didn't want to throw away the investment that I've made in learning vim. Yes, almost all of the keybindings carry over, but it's a fundamentally different editor, and I'm very used to vim's particular quirkeyness. In contrast, from a user perspective is exactly like vim, with an embedded terminal, sensible defaults and async. It's almost completelty compatible, so all your plugins work. Your knowledge will carry over.

TL;DR: If you're not particularly tied to vim, I'd go the spacemacs route. Otherwise, neovim. (Sorry for writing so much).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment