Live data from Hacker News

What Is Vim?

blog.jonas.foo

61–70 of 179 posts

Re: What Is Vim?

#61
post #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.

I don’t think there’s any reason why you have to learn Vi/Vim. I think someone could go their whole career without that. That seems like a perfectly legitimate choice to me.

…but, I learned vi somewhere between less running on MSDOS and an embedded programming course at uni in the 90s.

I’ve used the those shortcuts in database clients, shells and web browsers, etc. ever since.

That’s a long time and a lot of value. It’s payed off so much that I don’t really remember if it was difficult to learn; I just use the keyboard and get the edits I want without much thought.

Being able to know something like that and bring it with you across operating systems has been useful.

I’m pretty sure it will still be useful in twenty years time.

Re: What Is Vim?

#62

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…

This strikes me as the difference between English and Esperanto.

You wouldn’t design English as the international language but that’s what it has evolved to be.

You can still learn Esperanto as a hobby but it’s not going to be as useful day to day as English.

Re: What Is Vim?

#63
post #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.

And meanwhile in every thread or article about vim, it is very rare to mention remapping Caps Lock to Escape (or the other lesser IMHO lesser options ) even though one third of user do it. The other two third are deluded tool fetishists that are ready to suffer that their most important key is the furthest away from the home of row because "you get used to it" even if that's just an unfortunate historical accident. I…

LOL this made me chuckle. :)

I always remap caps to ctrl because ctrl-[ is an acceptable escape key for me as I like to use other insert mode shortcuts. Eg ctrl-h, ctrl-m, ctrl-k etc.

I know some people map to escape/ctrl when held but that usually means installing something like Karabiner.

Re: What Is Vim?

#64
post #54

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

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

It’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, 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.

Re: What Is Vim?

#66
To me there was a distinct "aha" moment when the "vim language" suddenly made sense. Makes me think of when kids suddenly discover how to read.

Re: What Is Vim?

#67

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…

I've set up myself once to learn Helix. First there was Kakoune that sounded exciting with its new modal model, but what had me wanting to really give Helix a go, beyond being exciting, was that it advertised itself "batteries included". It promised to deliver all the cool things programmers' editors do recently.

But then I stopped abruptly when realized Helix misses a key feature of Vim: swap files. I can just start editing and have not have to worry about losing my work, may whichever of computer panic, computer running off charge, environment (desktop env or tmux) crash, etc. occur.

So edit semantics is cool, but fundamentals like recovery should be got right before being a serious contender.

(I did a quick search to see if there is any news on this front, but what I found is all about "recovery hooks for panic", which is far more less than what's needed - it's about an emergency saving of the work if something goes awry with the editor. I need to be protected from loss if something goes awry with the environment too...)

Re: What Is Vim?

#68

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

There'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

This yields a better experience than the old half baked VSCode vim emulation.

Re: What Is Vim?

#69
post #61
post #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.

I don’t think there’s any reason why you have to learn Vi/Vim. I think someone could go their whole career without that. That seems like a perfectly legitimate choice to me. …but, I learned vi somewhere between less running on MSDOS and an embedded programming course at uni in the 90s. I’ve used the those shortcuts in database clients, shells and web browsers, etc. ever since. That’s a long time and a lot of value. I…

>"Being able to know something like that and bring it with you across operating systems has been useful."

I did not say it is not useful for people who use it. I imagine for them it gets the job done perfectly. We do not have to be all the same.

Re: What Is Vim?

#70

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

vrapper (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.

Post reply on HN