Live data from Hacker News

Modeless Vim

github.com

161–170 of 398 posts

Re: Modeless Vim

#161
post #71
post #64

I currently use vim every day. I have been trying to learn vim off and on for about 30 years. vi and vim have modes because they were created in an era where computing and terminal capabilities were very limited and even when the terminals could support interactive editing, it wasn't expected. They had very low expectations. They were used to things like 'ed'. The religious beliefs that programmers have about vim are…

> vi and vim have modes becaus they were created in an era where computing and terminal capabilities were very limited. that's the whole point. it was designed for limited terminals and high latency, very slow serial links. that means when you learn it and all of its shortcuts and you have a fast and modern terminal, you are able to edit at ludicrous speed. it's like training at altitude or running with weight belts…

> you are able to edit at ludicrous speed

I never ever got this argument for Vim.

I don't spend most of my time slinging around huge chunks of text or repeating commands like they do in YouTube videos where Vim pros flex their skills (to extend the fitness metaphor).

I spend most of my time thinking about code design, reading documentation, writing plans, discussing stuff with my colleagues—editing, writing code is maybe 30 – 40% of my time, at best. I also code fairly slowly anyway.

Funnily enough I think I'm decent enough with a good touch pad, so I can avoid the whole 'click-drag' dance when I have to use a mouse.

That being said, I do consider myself too stupid to use Vim beyond the simplest commands—I know how to change modes, save, and exit.

Re: Modeless Vim

#162

Earlier quoted context omitted.

That’s a butternut squash pie, not a pumpkin pie. ;) Try with pumpkin, nutmeg, cinnamon, and cloves… it’s that old timer pumpkin pie taste.

Apparently coffee cake has no coffee in it so we really can’t believe anything anymore.

American coffee cake doesn't have coffee, but English coffee cake does.

Re: Modeless Vim

#163
post #73
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. 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)

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

This still happens to me too often. Especially annoying in web-based editors.

Re: Modeless Vim

#164

I've always disliked that Bram calls Vim a "modal" editor. All this means is your keyboard and mouse actions do different things based on what "mode" of the editor you're in. All editors are "modal" editors. In VSCode for example, if you've focused the search box, pressing up loads the previous search, compared to if you've focused the code area, pressing up goes up a line. Vim purports to be more efficient than othe…

Modes are the core concept on which Vim's design is structured. They organize both the interface and the user's mental model of the text editing process. I did a quick case-insensitive search over Vim's help files, and they matched 'mode' 4470 times. The first thing you must learn (to use Vim) is that it is modal. And this detail really tends to stand out when first meeting Vim. I think "modal" is a nice word to conc…

There are 13875 matches for mode in the Emacs docs.

Modes are even more foundational to Emacs than to Vim. A new user will encounter a dozen modes by simply starting to use Emacs for a few minutes. Every buffer has a major mode, and there can be many minor modes enabled per buffer or globally. The entire editor is built on a tree of modes, all inheriting from the aptly named Fundamental Mode.

At a basic level, each mode affects what every key does. The idea of keys doing different things in different modes is not unique to Vim.

Which just goes to show that Vim's definition of "modal" is somewhat contrived, as Vim's definition of "modal" applies to a very specific implementation of two to four modes (which coincidentally Emacs also offers multiple versions of, both natively and as third party packages to varying degrees of faithfulness).

Re: Modeless Vim

#165

Earlier quoted context omitted.

You can learn the basics in under 15 minutes.

And you can forget them in the next 15 minutes. Been there, done that. As the article says, if you don't use it regularly you'll never learn it by heart, and Vi doesn't have any affordances that will remind you of what you learned by recognition instead of recall.

It's unforgiving, but that's also a bit refreshing. The feeling of accomplishment after a coding session in vim cannot be replicated in other editors.

Re: Modeless Vim

#166
post #130

Earlier quoted context omitted.

Helix is beginner friendly. It's keybindings make more sense than vim's.

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.

Re: Modeless Vim

#167
post #37

Conceptually the reasons the author give for this (syntax highlighting and other features of vim outclass other terminal-based editors) make total sense. That said there's something absolutely defiling about this. It's like installing a V8 in a Tesla, or replacing the pumpkin in pumpkin pie. I love that it will make VIM more accessible for more people, but I hate how they do it. Kudos to the author.

Emacs runs in a terminal. Vim isn't installed everywhere, Vi is. If you're going to install an editor and a config you might as well just install Emacs.

Re: Modeless Vim

#168
post #79
post #57

Earlier quoted context omitted.

> But since I was logging into different machines all the time We now have actually portable executables (multiplatform, multios) that contain their own config file: you can just scp 1 binary and be done with it.

Do you have a link to this? It is not always possible, arcane non x86 arches, low bandwidth connections, but time is the big thing. A binary upload just to change some lines in a machine on the other side of the world. I am lazy.

The superset is 243MB from https://justine.lol/cosmo3/ but it might be more convenient to be lazy and run sshfs rather than modify the far end.

Re: Modeless Vim

#169

I'm down for modeless TUI editors. This idea that because I like to work in the terminal I must prefer modes is accidental. I used micro for a while, which was quite pleasant, but didn't have all the LSP goodness.

It is sad that it is a plugin instead of a core feature and a buggy one at that (https://github.com/AndCake/micro-plugin-lsp), it's the last missing piece to transform a really good choice into the de factor killer

Re: Modeless Vim

#170
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, I can easily ignore the pop-up once I've got the muscle memory, or I can even disable the pop-ups altogether. It's brilliant for discoverability.

With this, I've passively memorized far more advanced motions in the last 12 months than I did in the ~8 years before that. And since Helix is a vim style editor, many of these motions also work in vim!

I feel like Helix is the perfect editor for people like me who know just enough vim to be comfortable, but never got very deep into customizing or muscle memory with advanced motions. Helix does some things differently compared to Vim, which I hear puts off some more advanced Vim users.

The built-in LSP & highlighting support with a stack-based "jump to symbol" and keybinds to traverse the stack also perfectly maps to how I want to navigate code, it has made me far more productive than ever before.

I'm not affiliated with the project myself, I'm just super happy I found the perfect editor for me :]

Post reply on HN