Live data from Hacker News

Modeless Vim

github.com

141–150 of 398 posts

Re: Modeless Vim

#141
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 because they were created in an era where computing and terminal capabilities were very limited vim was released in 1991. Same year linux kernel started and Apple PowerBook came out. Limited terminal capabilities is not the reason vim is modal.

Vim was heavily based on vi, and vi was designed for limited terminal capacities.

Re: Modeless Vim

#142

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.

It wouldn't be disingenuous to call the F1 a race car just because a go-kart is also technically a race car. Vim is built around modal editing. It's entire workflow is built around it. Your argument is pedantic.

Re: Modeless Vim

#143

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 :(

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.

Re: Modeless Vim

#144

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…

> Vim purports to be more efficient than other editors because it's a modal editor, but that's nonsense.

My understanding is that Vim purports to be efficient because it lets users make precise edits (large or small) with minimal input.

Re: Modeless Vim

#145
post #139

Earlier quoted context omitted.

Just fact that ones you learn vim motions it is hard to let go since they are so powerful

Well, reasonable people can have different, even more reasonable explanations for that 'fact'! https://news.ycombinator.com/item?id=25099049

[flagged]

Re: Modeless Vim

#146

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 :(

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 single file libraries that obey the same conventions of moving across words that you get in office), publishing software, chat clients... Vim is the only outsider, and because I only need it rarely, I forget things and I accidentally use the shortcuts from other software which sometimes break things.

I know enough vim, but I keep using conventions from other software out of habit, and shortcuts do other things. Vim is great editor, but a horrible thing to use by default simply because it was made before text editing ux got standardized.

Re: Modeless Vim

#147
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?

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)

Re: Modeless Vim

#148
post #58

Seems maybe author did not know that this is already built into vim?: "easy vim", aka evim, or "vim -y". see "man vim" That said, if modeless editor you are looking for... then vim is not the editor you're looking for. It goes against what vim is, and hamstrings it. Learning vim is a journey, and once comfort sets in, you will understand why, why vim.

[deleted]

Re: Modeless Vim

#150

Earlier quoted context omitted.

If you don't already do it the neovim extension for vscode is nights and days better than the one trying to emulate vim in javascript.

I tried both (mainly to use my neovim extensions) but unfortunately it was buggy (around 6 months ago) for me. Has it gotten more stable now?

[dead]
Post reply on HN