Live data from Hacker News

What Is Vim?

blog.jonas.foo

41–50 of 179 posts

Re: What Is Vim?

#41
post #40

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…

Huh, you can do visual selections in vim as well, and manipulate what you selected.

yes it works the same but for example in vim you do 'delete-inner-word' rather than `inner-word-delete`. The selection first model allows you to see what you are going to affect before you perform some verb on it.

Re: What Is Vim?

#42

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.

It is imperative in certain editors that you fumble for the mouse whilst in vi one can simply declare 3ff to get to the third f on the line. Granted, I mostly do not use certain editors, and accidentally compiled mouse click support out of the terminal—brushing the trackpad risked spamming programs with mouse noise, and some programs would sometimes do silly things with it. The mouse is fine for focusing terminals, I guess. (No, not vim, vi.)

Re: What Is Vim?

#43

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

Can 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)

The "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.

Re: What Is Vim?

#44
post #40

Earlier quoted context omitted.

Huh, you can do visual selections in vim as well, and manipulate what you selected.

yes it works the same but for example in vim you do 'delete-inner-word' rather than `inner-word-delete`. The selection first model allows you to see what you are going to affect before you perform some verb on it.

I once wanted to try that, but I'm familiar with vim enough that these kind of manipulation is done without even thinking about it. Only visual line mode proves useful when I need to yank/delete whole sections.

Re: What Is Vim?

#45
post #40

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…

Huh, you can do visual selections in vim as well, and manipulate what you selected.

No, you can't, vim visual mode always extends the selection, so moving by two words would select two, not the last one, but to see how it's different the best way is to just use the visual-first editor a little bit

Re: What Is Vim?

#47

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

Can 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)

Region select. Custom keybindings. Macros.

Re: What Is Vim?

#48
How do you explain "w" and "wq" to save and quit the editor with "verb adjective object" model?

These two and "i" is all I remember about vi. Or is vi a different thing from vim and this model doesn't apply?

Re: What Is Vim?

#49

How do you explain "w" and "wq" to save and quit the editor with "verb adjective object" model? These two and "i" is all I remember about vi. Or is vi a different thing from vim and this model doesn't apply?

"w" and "wq" happen in command mode. "verb adjective object" happens in normal mode. Command mode is more like ed.

vim is vi "IMproved." Just a more featureful version.

Re: What Is Vim?

#50
post #47

Earlier quoted context omitted.

Can 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)

Region select. Custom keybindings. Macros.

All of those are available in the vscode plugin.
Post reply on HN