Vim notes

I’ve used Vi/Vim almost my entire career – starting in college when I would dial into in a mainframe at the university using a phone line modem on my Windows 3.11, i.386 computer. I can’t remember how I got started, but I think I had read about Bill Joy, and concluded that an editor written by him would be the way to go.

Recently, the Changlelog podcast had several episodes about Vim

Gary Bernhardt points out an interesting reason to use Vim:

For me – I don’t know how common this is, but for me it was motivated by fear of RSI, of injury. Programming long-term is dangerous for your hands. Fortunately not the rest of you, but for your hands and your wrists, totally dangerous. And I wanted to keep programming for many more decades… So I was using Emacs, a lot of chording in Emacs, a lot of Ctrl+Shift, Ctrl+Alt, Ctrl+Alt+Shift… And Vim has basically none of that. That for me is the most important difference between Vim and other editors - its input efficiency in terms of keystrokes. And a really easy way to sort of see a summary of that is - in Vim I almost never hit Ctrl, I never hit Alt. If there are keystrokes that require Alt, I don’t even know them… And I rarely hit Shift. So most of my editing is normal mode, which is the mode that Vim boots up in, and just hitting the letter keys to do things, and punctuation. And that is very different from any kind of remotely “mainstream” editor.

I’ve tried Emacs several times and it never resonated with me – not sure why but suspect the Vi modes just work with me. I’m also generally averse to things overly complex and perhaps Emacs is that.

With Neovim, there are several interesting new developments:

  • built in support for LSP (language server protocol)
  • integration with tree-sitter. Tree sitter is written in Rust, but it appears the interface to Neovim is written in Scheme. Still not sure how this all works together, but looks interesting.
  • Lua support – while Vim is revving vimscript to be better, Neovim is moving forward with Lua. Apparently the LSP implementation in Neovim is in Lua. You can also express your Neovim config in Lua if you want, and plugins can now be written in Lua. Telescope is an example.