Live data from Hacker News

Modeless Vim

github.com

361–370 of 398 posts

Re: Modeless Vim

#361

Earlier quoted context omitted.

Oh but mine does… the glaze is powdered sugar and espresso.

This sounds good but not the kind of coffee cake I’m used to

yellow or moist white cake (or marbled cake) with butter crumble brown sugar top and an espresso glaze. The coffee cake of coffee lovers.

Re: Modeless Vim

#363

I think it's funny how much emotional energy gets invested into any (neo)vim posts. But the energy is mostly people that never learned vim and feel super insecure about it. I'm not going to make the same mistake of judging this. If you are someone who has always hated vim and never want to touch it, go for it, this might make your day easier on some machine if you can load this repo really quick (although as others h…

>learn vim

After starting the (neo)vim tutorial, all I could think about was if people who "learned" vim never learned how to edit text in a normal text/code editor.

And I don't mean this in an inflammatory way. I mean:

hjkl = Arrow keys

b = Ctrl + Left

w = Ctrl + Right

df = Ctrl + Delete

$d = Shift + End, Delete

dd = Home, Shift + End, Delete

2 = just press the keyboard command twice??

ddp = Alt + Down

ddkP = Alt + Up

The more I read the tutorial the more I felt like... do you not have arrow keys? I mean this literally. Is your keyboard just esc to f12 and there are no arrows or the numpad and it just ends there?

I do understand some good points of vim, like how explicit it is. There are many code editors/IDEs out there and sometimes how they treat Ctrl+Left/Right has subtle differences, e.g. ending the "word" in "-" or "_" or stopping before or after spaces. But most of this stuff is (or at least should be) configurable. But that's about it.

I mean how do you even use the numbers? Who looks at code and says "no, this should be exactly 8 lines below this one." I just Alt + Down until it's right. I'd spend more time trying to write the command right than I'd spend just pressing the keys multiple times.

Re: Modeless Vim

#364
I expected to somewhat lightly/jokingly make fun of this, but after looking at the README the reasoning makes complete sense to me and it seems like just a straightforwardly good project. This is not about saying what Vim "should" be, the author is setting up a quick hack to make a ubiquitous piece of software usable for them. Totally reasonable and it's great that Vim is flexible enough to make this work.

It's not about building an ideal piece of software, Vim's model of syntax highlighting is probably not the ideal model for a piece of software, ideally you'd use per-language highlighters that are hosted separately. But those highlighters aren't installed by default, and Vim is. So yeah, use the tool that exists and make it usable. Yes, you could install a Vim alternative, but this is not about making an editor to live in or building a perfect system.

So I think this is great, I don't think it defeats the purpose of Vim at all. I say this as someone who set up Emacs to use Vim keybindings and who thinks the modal editing and composition combined with macros within Vim is basically the biggest selling point of the editor. It doesn't matter what Vim "should" be, this is an easy way to get a ubiquitous text editor to be more usable. Not perfect but a one line installation on almost any Linux box with Internet access, so it solves a real problem with relatively little downside in a quick and easy way -- real hacking at its finest.

It might be useful to compare and contrast this to Vim's easy mode (vim -y), but this project is also 2 years old and I don't know what the state of easy mode was back then, and that kind of comparison might be overkill anyway. I like modal editing, so I'm not as familiar with easy mode so I'm not sure what the comparison would be. I know at some point it started defaulting to a graphical session because quitting out of easy mode in the terminal was giving people trouble. But possibly something to look into, maybe, depending on the system you're using if you need to use Vim but can't customize it.

Re: Modeless Vim

#365

My usual comment on any thread touching vim, as an answer to all hypothetical comments talking about how vim never clicked : Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person) It's the most important key and you should punctuate all your inserts with it. So it'd better not be the key that's the furthest away from your fingers. The reason that's the case is an historical a…

Can I suggest going one further and have esc mapped to tap, ctrl to hold. You can also map double escape to :noh in vim, which allows you to quickly remove highlighting.

Re: Modeless Vim

#367
post #253

Earlier quoted context omitted.

What do you do when you need Ctrl in non-vim contexts?

I just press Ctrl ? But frankly I don't use Ctrl that much. Ctrl + L/K in Firefox (I use vimium but I prefer the native bar) And I have Ctrl + J/K to switch terminal tabs In vim I only rarely use Ctrl + I/O

Are you often working within the command line? I don't use vim bindings elsewhere so I use these a lot: "Edit a command line" section on https://support.apple.com/en-gb/guide/terminal/trmlshtcts/ma...

Re: Modeless Vim

#368
post #43

IBM CUA I’ve always wondered how different Unix/Linux would be today if decades ago a Common User Access (standardized menu system like FILE | EDIT | etc) had been defined for TUI apps (like how it was for Windows & Mac OS). Imagine VI & EMacs having the same key bindings due to standards. https://sqlite.org/hctree/doc/hctree/doc/hctree/index.html#s...

Emacs has a mode called cua-mode with keybindings thats more simillar to ones from other modern gui programms like browser.

It's a tiny tweak that gives something like 1% of the functionality.

The real, useful, working CUA mode for Emacs is here:

https://ergoemacs.github.io/

Re: Modeless Vim

#369
post #43

IBM CUA I’ve always wondered how different Unix/Linux would be today if decades ago a Common User Access (standardized menu system like FILE | EDIT | etc) had been defined for TUI apps (like how it was for Windows & Mac OS). Imagine VI & EMacs having the same key bindings due to standards. https://sqlite.org/hctree/doc/hctree/doc/hctree/index.html#s...

So very much this. Around the end of the 1980s / start of the 1990s, all the big DOS apps switched their weird proprietary UIs out for CUA ones. Sometimes with an option to go back, but not often. Sometimes with some of the old UI as well, but mostly, big-bang.

And everything was better, the users adjusted, nobody ever looked back and we were all better off.

Sadly the memo never reached the Unix world, and those terrible 1970s are now enshrined as holy writ.

Re: Modeless Vim

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

In Jef Raskin’s ‘Humane Interface’, there’s a good justification to why modes are evil, mainly leading to excessive user errors, so it’s not that surprising.
Post reply on HN