Live data from Hacker News

Modeless Vim

github.com

121–130 of 398 posts

Re: Modeless Vim

#121

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…

That's a bad example since search box is a different UI element

Here modality mainly means "for the same element" (text area), and this is a very important and noticeable difference you can't eliminate with a search box

Re: Modeless Vim

#122

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.

Next you are probably going to tell me black forest cake is not made in the black forest any more.

Re: Modeless Vim

#123

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…

Unlike the VSCode example, Vim's multiple modes utilize the exact same content and UI:

With your cursor in the same place, and pressing the same keys on your keyboard, Vim's response will change based on whether you are in normal mode, insert mode, visual mode, or whatever mode.

That's what they mean by modal. In insert mode, you have a ~104 keys that insert new text. In normal mode, the same ~104 keys execute editing functions.

The magical efficiency is because of its modal nature: Without buying new hardware, by switching modes (at a keystroke) you have a magic input device that issues ~104 different editing commands each with one keystroke, and hundreds more with two-key combinations (shift+, ctrl+, etc.).

Re: Modeless Vim

#125

Earlier quoted context omitted.

That's not really the same thing though is it? Each of vim's modes are extremely complex with their own usage of the vim grammar. The "modal" behavior you describe is very simple.

They are the same thing of course, complexity is not relevant to the definition. The main difference is Vim's editing modes are imperative. You have to glue together small painful commands to do what you want. Modern editors are declarative - you say "I want to move this file" or "I want to rename this variable" or "I'll drag this split here" and they do the rest.

> Modern editors are declarative - you say "I want to move this file" or "I want to rename this variable" or "I'll drag this split here" and they do the rest.

Those are imperative actions rephrased to make an artificial distinction (and I rename variables in Vim with gR). How high-level the available actions are and being a modal or non-modal editor are orthogonal.

Re: Modeless Vim

#127

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 concisely describe and differentiate Vim.

Re: Modeless Vim

#129
I don't think this covers the main reason I only use vim occasionally: it is the only reasonable editor available over ssh by default on all VMs deployed in your typical org. Over there it usually has default settings, and it's not trivial to change configs or install other editors.

Worthy attempt, looks cool, but I'm still stuck with having to learn the basics of moving a cursor around reasonably :(

Re: Modeless Vim

#130

Earlier quoted context omitted.

Seriously, it hurts. It makes sense, but it hurts. If only there were a more gentle path to editor modes. Maybe some simple graphical representation of the modes and commands that could be down in the corner? Like a dynamic vim infographic that clued a user into the most likely commands.

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.

Post reply on HN