6 ms·
> There's a Vim mode in every single mainstream code editor out there. And they’re always frustratingly incomplete and/or buggy. Some motions will be unimpleme
by chrismorgan 2y ago
> There's a Vim mode in every single mainstream code editor out there.
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.
- 8f2ab37a-ed6c 2y agoThat's been my experience as well. I tried a few times to make my regular vim bindings + plugins to work in Rider and there's always that last 5% that seems to not work quite the way you'd expect, even for supported plugins. Bummer.
- __MatrixMan__ 2y agoYep, it's apparently easier to move your IDE into vim than it is to move vim into your IDE. The only vim mode I've met that wasn't infuriatingly incomplete was emacs evil mode.
- teeray 2y ago> And they’re always frustratingly incomplete and/or buggy I refer to this as the Vim Uncanny Valley
- JadeNB 2y agoFeature request: `:vuv` causes vim to replace native operation by a broken, buggy half-implementation. Optional enhancement: LLM learns your favorite commands, and makes sure that they specifically are broken.
- ofalkaed 2y ago>And they’re always frustratingly incomplete and/or buggy. 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.
- djtango 2y agoOne day during my vim journey I discovered filters and realised I could turbo charge my editing by running selections through any and all of unix and now I don't need fancy spacing plugins - I have `column` and I can `sort` 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...
- dizhn 2y agoThis ctrl+w shortcut gets me all the time when using a web based Spice session to work on VMs and the experience is similar to getting wired earphones yanked out of your ear. There might be a way to inhibit this behavior but I never looked into it because I use it to close browser tabs too.
- hexomancer 2y agoCan you give example of vim features that you miss in the vscode plugin? Mainly because I likely don't know about them and I would like to add them to my toolkit (the surround thing is not a vim feature, it is a plugin, although the vscode plugin has that too)
- skydhash 2y agoThe "buffer" model. Half the speed of using vim in a project for me is the ability to manipulate the layout and having different "windows" on the same file. One of my most common workflow is to split the current window and navigate to a different part of the same file for reference purpose (can quickly switch to another file with fuzzy finding too). And quick integration with external tooling. Creating an extension for vscode is cumbersome.
- hexomancer 2y agoThis works the same in vscode as it does in vim as far as I am aware. e.g. `:vs` to split the window and moving between windows uses the same shortcuts as it does in vim.
- dkdbejwi383 2y agoThe fundamental difference is that in Vim, a tab/window contains splits, whereas in VSCode and every other editor AFAIK, a tab is a child of a split. 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.
- nunez 2y agoRegion select. Custom keybindings. Macros.
- hexomancer 2y ago
- Lio 2y ago> In VS Code, it maintains its own undo stack, and the interactions between the two undo stacks are terrible and terribly frustrating 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.
- chrismorgan 2y agoIt’s not about stack versus tree; it’s about the granularity of changes and what causes actions to be pushed to the undo stack (where there’s a pretty fundamental difference between modal and non-modal editors), and the fact that I suppose VS Code just doesn’t let extensions directly manipulate the undo stack in the way required. Look through https://github.com/VSCodeVim/Vim/issues?q=undo 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.
- drzaiusx11 2y agoThere's a vscode extension that embeds NeoVim and just uses VSCode UI as a front end to delegate key presses to: https://github.com/vscode-neovim/vscode-neovim https://github.com/vscode-neovim/vscode-neovim This yields a better experience than the old half baked VSCode vim emulation.
- faraazb 2y agoThis setup 'just' works for me. I have mapped certain functionality, for e.g. toggling the file explorer to a nvim keymap (the extension also enables h, j, k, l, y, p, etc. commands in the explorer) but I use the cmd/ctrl + P keymap for searching files in the current project, so it feels incomplete sometimes. When I am editing a set of files it works great, but as soon as I use a VS code feature, for e.g. project search, the experience is okay and may require a mouse, which is not surprising but I hope the integration gets even better. 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.
- wyclif 2y agoI tend to agree with this, but I went in the reverse direction. I started out with kickstart.nvim and moved to LazyVim when I saw what Folke was doing with it. It's an excellent config and rarely chokes on large files or breaks, even though the development is very rapid.
- alabhyajindal 2y agoI used this for a few months and went back to the vim emulator [1]. I can't recall what but some of the things kept breaking in Neovim. And the frequent, near daily extension updates were annoying. 1. https://marketplace.visualstudio.com/items?itemName=vscodevim.vim https://marketplace.visualstudio.com/items?itemName=vscodevi...
- Zardoz84 2y agovrapper (vi mode for eclipse IDE plugin), have a similar issue. Usually don't have problems, but sometimes, both undo stacks begin to do very weird things. However, when I tried VS Code vim mode, I found far better than Vrapper or Kate vim mode.
- sourcepluck 2y ago> And they’re always frustratingly incomplete and/or buggy. 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.
- sauercrowd 2y agoThis is my current setup, and I love it. To me it brings together the best of vim with the richness of Emacs. Setting up Emacs from scratch is quite the project though if you want all the bells and whistles
- sourcepluck 2y agoTo get all the bells and whistles done oneself, yes, it is time and learning. 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.
- hmeh 2y agoevil on Emacs has been great for me. I’ve been using vim for 20 years (vim, visual studio, vim again, now Emacs) and Emacs/evil for at least 5 years or so. I’ve heard someone say that Emacs with Evil is a better vim than vim. I’m inclined to agree.
- sourcepluck 2y agoOk, it's settled then! OP should have said: "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!
- chamomeal 2y agoYeah when you live in vscode vim mode you learn to completely avoid certain vim features
- perrygeo 2y ago> > There's a Vim mode in every single mainstream code editor out there. 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.
- marxisttemp 2y agoAnd then they hand-wring about silos. The level of slop at software companies is astounding. Let’s drop everything to make sure we’re writing the backend and frontend in the same language, and then half-document everything over Slack, Confluence, README.mds, and GitHub wikis. 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.
- setopt 2y agoI’m using GhostText/AtomicChrome to edit any browser test field using a real editor (in my case Emacs). I recommend trying it if you have this challenge.
- hagen_dogs 2y agovim in obsidian?
- SlackingOff123 2y agoBoth the VSCode vim extension and the IdeaVIM plugin for Intellij support surround. There's still some plugins that I miss in those implementations, but both projects are gradually adding support for more.
- linhns 2y agoFor me, they’re unusable. Many have tried to shoehorn Vim mode into other editors. It just doesn’t fit, degrade both developer experience and the editor itself