by chrismorgan · 1y ago · 0 comments
And they’re always frustratingly incomplete and/or buggy. Some motions will be unimplemented, or will behave incorrectly, especially with regards to boundaries around whitespace inclusion or exclusion in a motion. Things you added to Vim and got used to are unavailable, and so your ysa") to put parentheses around the string your cursor is on just doesn’t work. (Lack of vim-surround definitely gets me frequently.)
In VS Code, it maintains its own undo stack, and the interactions between the two undo stacks are terrible and terribly frustrating—yet doing without might be even worse, because they behave very differently.
And too often in a browser context, ^W will close your tab, losing data, rather then being inhibited and erasing the last word, as it should. That one is practically unforgivable in a Vim mode, yet common. That, more than anything else, will make me avoid a Vim mode.
https://github.com/vscode-neovim/vscode-neovim
This yields a better experience than the old half baked VSCode vim emulation.
I am sure that with more configuration, the experience could be made more NeoVim like but I don't know whether I should spend time doing this or invest my time learning/adapting to a terminal based flow for the few tasks for which I am used to the VS Code GUI (browsing Git history, diffs for pull requests, git stash operations, debugging).
I started with a base config (kickstart.nvim) after trying out LazyVim sometime back, but kept going back to VS Code for some of the tasks. So what I have now is not significantly better but I like it.
1. https://marketplace.visualstudio.com/items?itemName=vscodevi...
My favorite is all the applications which have a vim mode and are clearly done by people who think that just means making hjkl act like arrow keys and adding in a few single key commands. I wish more people would take the time to understand what modal editing actually is.
In a project of mine which has an editor that is pretty much vim with a few modifications to suit my purposes and slimmed down to just the needed features, I added an optional emacs mode which can be enabled with C-M-e M-S-m, it enables emacs in evil mode.
This then allowed me to golf a one line vim macro that shells out a selection to nc which connects to a clojure socket repl
I don't think many "vim modes" would allow that. The most earnest of vim modes is probably evil mode. Of course, only your true mortal enemy could ever understand you...
I refer to this as the Vim Uncanny Valley
Sadly, because of the unchecked proliferation of apps added to the software enterprise, this is not really true. A "modern" software organization probably has something like: Notion, Gdocs, Paper, Slack, Figma, Jira, and Github. If they have vim mode at all, (most don't) they require learning entirely new UI patterns for each app - the sheer waste is astounding. I'd love to be able to say "I've got a professional editing environment set up that's highly efficient for me to write both code and prose. Can I, like, use my tools and edit text?". But the answer is always "No - we must scatter our thoughts as far and wide using as many tools as possible!" The lack of a workable vim mode makes the problem worse.
Confluence is especially stupid to me when everything happens on GitHub anyway, and most companies do GitOps in one form or another. We can literally colocate documentation next to the same code files it applies to, using a nice terminal friendly markup language. Most programming languages these days allow us to write Markdown documentation inline next to the declaration it applies to. But no, let’s use Atlassian’s bespoke proprietary Enterprise Offering of a rich text editor. Disgusting.
But hey, suits need to sell their enterprise software to somebody.
Have you tried evil-mode (Emacs VI Layer - E.V.I.L.), an implementation of the vim-bindings in Emacs? I've heard it works very well.
Or, at least, the Emacs subreddit seems to get a pretty steady flow of people who come from vim and get into Doom Emacs, which has evil-mode (and lots of other stuff) pre-configured and ready to go.
They seem very happy, from reading their reports, anyway.
I’ve heard someone say that Emacs with Evil is a better vim than vim. I’m inclined to agree.
"And they - vim implementations - are always frustratingly incomplete and/or buggy...
Except perhaps Emacs' evil-mode, with some users going so far as to claim that it's an even better implementation of vim-bindings than vim!"
:=D
P.S., off the back of your comment, I downloaded and started playing with Doom Emacs last night, as this thread reminded me of how great some people claim Doom and the vim bindings are. My Emacs has been stable for a while, with a basic enough configuration (only a thousand lines hah), so I'm in the mood for playing with some alternatives.
Being able to test very different configs now with "--init-directory" is really a nifty quality of life improvement which I had yet to fully appreciate!
I think Doom is a fantastic way to get started and know what's out there. I do suggest folks to eventually dive into building their own config. Having that much control over your work surface is where Emacs and its users can really shine, I think. It's a commitment though.
Setting up Emacs from scratch is quite the project though if you want all the bells and whistles
Using Emacs with no bells and whistles just for writing is very enjoyable too, though! That's how I started. Within an hour or two I'd removed any visual clutter from the screen, and put on some dark theme (just clicking around the menu bar).
M-x help-with-tutorial (which came up when I first ran it, and I said oh, what's that), and that was me gone!
For weeks and weeks all I did was pump out text files with no formatting, being amazed that I could jump forward and backwards over words, sentences, and lines. It was an absolute joy, with a warm feeling of clarity and clean-ness to it.
That’s because Vim has a more sophisticated undo stack than VS Code.
Vim keeps its history as a tree where you can jump between branches.
Look through https://github.com/VSCodeVim/Vim/issues?q=undo, there’s a lot. VSCodeVim tries to make it behave more like Vim, and because it’s independent of the native undo stack, it’s frequently a miserable experience. Pretty sure I disabled it, when I tried using VS Code for a short while and with Vim mode.
And quick integration with external tooling. Creating an extension for vscode is cumbersome.
In Vim I can have test and implementation side-by-side in tab0, and then two splits of the one file in tab1, a header file, impl and test in tab2, etc.
With another editor, I have to switch tabs in split 1, then switch tabs in split 2, rearranging or adding more splits as needed when moving between different groups of files.
Setting up custom hotkeys is an exercise in patience, and you are constantly fighting with native hotkeys that try to do the same thing.
I tried making vim mode work for years and I always go back to the original because it's where I'm at home
The only vim mode I've met that wasn't infuriatingly incomplete was emacs evil mode.
However, when I tried VS Code vim mode, I found far better than Vrapper or Kate vim mode.