Live data from Hacker News

Modeless Vim

github.com

171–180 of 398 posts

Re: Modeless Vim

#171
post #147
post #73

Earlier quoted context omitted.

Related: why does the shortcut to delete back a word (^W), close my browser tab?

That's why I think MacOS is superior: it actually uses the "meta" key for useful stuff. So, Cmd-W would close the tab, and Ctrl-W would probably still delete a word (can't check right now, but it has a lot of 80s-era keyboard shortcuts for text still working)

macOS uses a lot of Emacs bindings. Ctrl-a for beginning of line, ctrl-e for end, etc etc.

And, agreed, macOS' use of shortcuts is fantastic and I wish I could replicate it on Linux.

Re: Modeless Vim

#172

Personal anecdote: I've used Vim for many years, but I never progressed much beyond the basics, because I almost never put much active effort into learning more advanced motions. About a year ago, I discovered the Helix editor, which has a (IMO) genius feature, where pressing a key to start a motion or other action pops up a little pop-up box that shows all the possible options. It just perfectly clicks with my brain…

There is a well known plugin for neovim to do this kind of behavior. You can even create your own hotkeys into that plugin and will help you navigate and memorize different hotkeys for the editor. The plugin is called whichkey, and this is their github https://github.com/folke/which-key.nvim

Re: Modeless Vim

#173

Earlier quoted context omitted.

You can learn the basics in under 15 minutes.

I agree with the aurhor of the library. > Q: Why don't you just learn the vim commands? > A: I did, but if you don't use vim regularly, you keep forgetting them. The basics are only useful in vim, and editors that you force into vim mode. Other places one types text into which use the same conventions absent in vim: browser input fields, the url bar, email, office software, random input fields in games (I've seen sin…

You’d be surprised how much software has VIM bindings built-in or a plugin to add them. This includes browsers, email and office software.

More importantly for me personally, is that VIM is a lot more ergonomic than the “standard” Windows-style text-editing ux you prefer. It played a crucial role in helping me (mostly) recover from severe repetitive stress injuries. Many, many others are in the same boat.

I wish I’d started using it in earnest years sooner. IMO, it’s worth learning even if you never have wrist problems. I write, and especially edit, blog posts faster now with it than I could prior to injury when I could type faster.

Re: Modeless Vim

#174

Personal anecdote: I've used Vim for many years, but I never progressed much beyond the basics, because I almost never put much active effort into learning more advanced motions. About a year ago, I discovered the Helix editor, which has a (IMO) genius feature, where pressing a key to start a motion or other action pops up a little pop-up box that shows all the possible options. It just perfectly clicks with my brain…

Emacs has something similar in which-key.

Of course GUI apps have had pop-downs from the File-Edit-View-... row [since forever?] so that things like Alt+F will show contextual actions. But at least in the Emacs community people get blown away when someone makes such a basic addition.

Re: Modeless Vim

#175
As an old vim graybeard, more power to you.

I'd recommend checking out `vim -y` as well. (And once you try _that_, you'll likely have a question, the answer to which is Ctrl-l.)

To others on this thread decrying this as heresy: leave 'em be. Let everyone use whatever editor flows works for them.

Programming is hard enough without having to conform to other people's beliefs of how _you_ ought to use your own editor!

Re: Modeless Vim

#176
post #54

Earlier quoted context omitted.

Back in my day, when we pressed Ctrl+S, the terminal froze, and that's just the way we liked it. https://unix.stackexchange.com/questions/12107/how-to-unfree...

> Back in my day, when we pressed Ctrl+S, the terminal froze, and that's just the way we liked it. I don't think anyone needs (or even wants) the terminal to freeze on such a common shortcut in 2024. Personally, I have reclaimed Ctrl S for word delete (usually done by Alt-d)

> I don't think anyone needs (or even wants) the terminal to freeze on such a common shortcut in 2024.

I find it rather useful to keep important output of programs on the screen when it is impossible (or I forget) to pipe them into a pager.

Re: Modeless Vim

#177

Earlier quoted context omitted.

To be fair - coffee cake in the US is cake to have with coffee and doesn’t normally contain any coffee. In the UK and EU, coffee cake is cake with coffee. Likewise tea cakes in the US are cakes made with tea and tea cakes in UK and EU are cakes to have with tea. So… Not a lie, just a Spider-Man meets Spider-Man moment when you learn you can actually make coffee cakes with coffee (or espresso) and you can make tea cak…

pie you have pumpkin with

You owe me a new keyboard and monitor tyvm

Re: Modeless Vim

#178
> Instead of remembering cryptic commands

I use vim and nothing about its commands are "cryptic" to me. You want to "go to definition"? You press "gd" as in "(g)o to (d)efinition". What's cryptic about this?

Re: Modeless Vim

#179
post #77

Earlier quoted context omitted.

I just don't believe that the average vim users edits significantly faster than non vim users. I mean, maybe 5% faster. Sure. Maybe. But at what price? _At what price, I ask you??_

Another claimed impact is on cognitive load: Vim runs on muscle memory on the keyboard; it consumes as much cognitive load as typing. Mouse / GUI is distracting.

I’m a Vim user, but I don’t agree with that argument about cognitive load. When typing in a normal editor, you just type letters and those same letters typed just show up on a screen (as in Vim’s insert mode). The mouse is pretty intuitive too in a normal editor: you have a device that controls a cursor on your screen and clicking performs an action.

With Vim, I don’t think the commands are quite as intuitive (this might be a skill issue of mine), but I do think I am faster without a mouse because of fewer movements required (having to grab my mouse, move it to where I want, click and then move it back to the keyboard vs. just typing a few letters).

Re: Modeless Vim

#180
post #130

Earlier quoted context omitted.

Yeah but it’s a small island. If you learn Vim you’ll have access to Vi and Vi-like interfaces in lots of other software including terminals, database clients and everything that uses readline.

Curious what kind of interfaces you're thinking about? (Aside from vi, vim, nvim) From my experience anything with "vi navigation" basically just means using the home row keys for navigation + modes. So I haven't come across many interfaces yet where the verb order differences between helix/vim come into play.

Then the question is readline. Not saying that vi or emacs deserve to win readline, but it’s up to you to describe how Helix mode would differ from vi mode.
Post reply on HN