Live data from Hacker News

What Is Vim?

blog.jonas.foo

11–20 of 179 posts

Re: What Is Vim?

#11

Helix uses a selection-first action model: you select the word/paragraph/whatever you want to perform an action on, then you change/delete/whatever on that selection. I think this is more intuitive than the "verb object" model Vim uses: if you get your selection wrong in Vim, you then need to undo the action and try again. In Helix, I can see what I am about to manipulate before I make the action. I think at this poi…

To achieve something similar in vim one could use visual selection first and then run the verb on it. Helps with spotting mistakes or just tweaking selections in general. It is a tad bit tedious but a small bonus is `gv` which invokes the previous visual selection at a later point. That said selecting first isn't perfect because large selections often move the viewport around especially on small screens and that's really annoying but ahh that's life, always with the compromises.

Re: What Is Vim?

#12

Learning Vim early on had a high return on investment for this reason. Years later, I'm still able to benefit from the same muscle memory in modern tools, e.g. Obsidian. It should be said, though, that most implementations are simplified rewrites of Vim's core functionality. When you use a tool to achieve a sense of "flow", it can be grating for the editor to behave in subtly different ways from expectation, or disco…

Long ago, I learned video editing on a CMX tape based system. The key bindings on that system remain in place in pretty much every video application today. (Spacebar => play/pause, j/k/l => reverse/stop/forward, i/o => in/out) Sometimes, keybindings just make sense and for them to not do it definitely as you say feels disturbing. For new apps that don't, it's like did you live under a rock in a cave and never see any other preceding program that you are making, or do you honestly think yours is better. I can assure, they aren't.

Re: What Is Vim?

#13

Agree that Vim is a language to talk to your computer, but it's not necessarily efficient. Vim is famously an imperative editor: You have to tell Vim the sequence of steps to perform. Clicking your mouse on a position on the screen is declarative: You declare you want the cursor here. With Vim you have to imperatively walk the cursor to where you want to go, or god forbid use something like easymotion.

That's like telling some small child they are lesser because they can't walk because they're still learning to crawl. The systems that vim worked on didn't even know what a mouse was.

Re: What Is Vim?

#14
I love this take. I was a die-hard Vim/Neovim zealot... but these days I absolutely love the ecosystem of tools that support normal mode. For so long hand-cramping emacs keybindings were sort-of-standard-in-a-few-places.

If you're not convinced vimming is the best way to interact with your editor, you probably haven't seen a really proficient vimmer.

Re: What Is Vim?

#16

> 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…

That'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.

Re: What Is Vim?

#17

Helix uses a selection-first action model: you select the word/paragraph/whatever you want to perform an action on, then you change/delete/whatever on that selection. I think this is more intuitive than the "verb object" model Vim uses: if you get your selection wrong in Vim, you then need to undo the action and try again. In Helix, I can see what I am about to manipulate before I make the action. I think at this poi…

The lead of NeoVim indicated that it would be possible to make this "grammar" an option for users. He didn't seem like it was something that's high priority, but he definitely was open to PRs to implement it.

Re: What Is Vim?

#18

Agree that Vim is a language to talk to your computer, but it's not necessarily efficient. Vim is famously an imperative editor: You have to tell Vim the sequence of steps to perform. Clicking your mouse on a position on the screen is declarative: You declare you want the cursor here. With Vim you have to imperatively walk the cursor to where you want to go, or god forbid use something like easymotion.

You can, in fact, click to set the cursor position and even click and drag to select.

Re: What Is Vim?

#19
>"Wha Is Vim"

Something I've never learned. Not proud of it but I do not think I am missing anything either. I write native software for Linux for living at the moment.

Re: What Is Vim?

#20

Agree that Vim is a language to talk to your computer, but it's not necessarily efficient. Vim is famously an imperative editor: You have to tell Vim the sequence of steps to perform. Clicking your mouse on a position on the screen is declarative: You declare you want the cursor here. With Vim you have to imperatively walk the cursor to where you want to go, or god forbid use something like easymotion.

Setting aside that you can enable mouse mode in vim and use the mouse to your heart's desire --

and setting aside the "declarative" vs "imperative" nomenclature debate --

vim is pretty dang efficient. Typing `gg` to go to the beginning of a file, or `G` to go the end. Or all the other variety of motions. There are a lot.

Also, there is not necessarily any need to move the cursor anywhere. For example, if I'm in the middle of writing some string and I've decided to change the whole thing, `ci"` does that, with no cursor movement required.

Post reply on HN