vim is dead
After using vim for over 20 years, I've found a replacement, and its vim, sort of.
early days
I've used vim for a long time. I am not a superuser, but I have built up enough muscle memory that I find it difficult to learn a new way of interacting with text. Vim is also so prevalent that many other applications allow the use of vim bindings, which I regularly use.
alternatives
I spent a couple years, using Neovim, then vim started catching up on features and it was an odd toss up where one worked slightly better for language A but not B. And it was a mess maintaining two complicated config files.
something new
For the last year, I've been playing with helix which promises to be a modern, capable editor with sane defaults. I've never struggled with the performance of vim/neovim but the intensely complicated config files are a regular annoyance, not to mention that sinking feeling that I'm doing them, or the multitude of plugins wrong.
markdown / spelling
I do most of my writing in markdown files, and I really can't spell, having some sort of spellcheck is crucial. Helix has sane defaults but no built-in spellcheck. Harper fills this gap very well, although I couldn't get it to work on OpenBSD, it works fine on FreeBSD/OsX.
The following are the relevant part of my languages.toml file. Errors, are dynamically underlined when writing. 'Space d' brings up the "diagnostic picker", which shows harper issues, and 'Space a', gives alternative spellings/words when the cursor is on top of an underlined word.
[language-server.harper-ls]
command = "harper-ls"
args = ["--stdio"]
[language-server.harper-ls.config.harper-ls]
diagnosticSeverity = "hint"
dialect = "British"
[[language]]
name = "markdown"
language-servers = ["harper-ls"]
formatter = { command = 'prettier', args = ["--parser", "md"] }
go
[[language]] name = "go" auto-format = true language-servers = ["gopls", "golangci-lint-lsp"] [language-server.gopls.config] gofumpt = true [language-server.golangci-lint-lsp] command = "golangci-lint-langserver" [language-server.golangci-lint-lsp.config] command = [ "golangci-lint", "run", "--output.json.path", "stdout", "--show-stats=false", "--issues-exit-code=1", ]
elixir
[[language]]
name = "elixir"
auto-format = true
formatter = { command = "mix", args = ["format", "-"] }
html/css
[[language]]
name = "html"
formatter = { command = 'prettier', args = ["--parser", "html"] }
auto-format = true
[[language]]
name = "css"
formatter = { command = 'prettier', args = ["--parser", "css"] }
auto-format = true
vim mode?
I've gotten this far without mentioning that helix doesn't have a native vim mode. For my first year, I had found a rather complicated config file that remaps a bunch of keys to bring a vim mode experience to helix.
Today I found an even better solution, called evil-helix. This is a soft fork which adds a much more robust vim-mode to helix. I've only tried this so far on OsX but assume it should build from source on other platforms.
There is still no :%s/old/new find/replace type commands which I used to use a lot. Instead you need to select the relevant section in visual mode and use 's' for search then 'c' to change to something else. It's not quite as powerful as having full regex at your finger tips but for most jobs its ok and if I need more I can just open the vim! As I still often use vim on machines that don't have helix setup, but then I don't need vim to be setup as a full fledged IDE.