Live data from Hacker News

How to Exit Vim

github.com

371–380 of 409 posts

Re: How to Exit Vim

#371

Earlier quoted context omitted.

> And of course I'd have to dive deep into the ecosystem in order to get the same benefits that my main editor provides out of the box, To me, vim shines as a modal editor , not an IDE. I use it for two purpose: 1. quick editing configuration files, or single file scripts 2. an editing mode in an IDE (mostly VSCode) The main benefit of vim is to save you from using the mouse or the touch pad. I touch type, my indexes…

My hypothesis is that vim style work (without moving a wrist even a bit) is the reason people get carpel tunnel. I anecdotally see far fewer (none?) People who don't do vim/emacs getting these injuries. Makes sense as well right? Just like "take a walk and don't sit in the same place" but for your fingers

Maybe that's a bit like saying that running shoes are harmful because people with running shoes sustain running-related injuries more often than the average person, who in reality just doesn't run as much.

Re: How to Exit Vim

#372

Earlier quoted context omitted.

I live in a different universe to you it seems. The only vim command I know is :q . Honestly, I tried several times over the decades and walked away with my head buzzing. PS: I don't live in emacs either! What I do love in both camps is how the explanations begin... "All you have to do is...[insert irrational (to non-vim/emacs users) command]" which makes me laugh every time. Love the article, which ironically proves…

Nitpick: 'q' is an ed command. ('ed' Being the underlying line-editor upon which the original vi was layered.)

Meta-nitpick: Vi was built on Ex, not Ed.

Re: How to Exit Vim

#373
post #321
post #214

Earlier quoted context omitted.

Nice. I did something similar w/ tmux: map the prefix key to C-a and map CapsLock key to Ctrl (never found real use for it). So Ctrl-a (actually CapsLock-a) is very ergonomically pleasant.

What about moving to the beginning of a line?

I did the same thing but I also mapped Ctrl-\ to send the "prefix" (helpful for neated tmux sessions), so I just hit Ctrl-\ for beginning of line.

(Although this seems to have broken in recent tmux releases on Debian (3.x?) and I haven't looked into yet.)

Re: How to Exit Vim

#374
post #365

Earlier quoted context omitted.

> It’s a college class in which students are supposed to learn something new Unless the central thrust of the course is supposed to be the mechanics of a particular dated editor, the restriction described seems to be a distraction from rather than an aid to what the students are supposed to be learning. It doesn't make any more sense than a social science course where the deliverables for most assignments are essays…

> particular dated editor I wonder how you feel about age discrimination. Old != bad. I started using Vim when I was 14; I was the only one in the class who wasn't using an IDE. Vim (perhaps combined with a language server if you're okay with the complexity) runs circles around bloated IDEs like IntelliJ/VSCode. Unix combined with a tiling WM is the best IDE in existence. The professor in question is likely doing the…

Cool, I use nano. Should I be penalized?

Re: How to Exit Vim

#375

Earlier quoted context omitted.

From perspective of ASCII-only application, vim interface isn't actually bad, it just lacks discoverability. There is also a real cost to making tool beginner-friendly and it often makes sense to optimize for advanced users instead.

An interface lacking discoverability is a bad interface.

Once you learn the tool, discoverability wastes screen space and user focus. It's like training wheels, at some point you want them off or they slow you down. I'm not a vim user, I just appreciate the UI trade-offs made by its devs.

Re: How to Exit Vim

#376
post #127

Earlier quoted context omitted.

How do you exit, then, if you never learned :q?

ctrl-z to background it. Then `kill` it.

That was how I'd exit vi for a long time. Often "killall vi" because any other vi instances running would in any case be by accident.

I once caused a near rebellion of vi users when I was running an ISP and symlinked vi to emacs on our shell server because I was sick and tired of it...

Re: How to Exit Vim

#377

One of my Computer Science lecturers had a rule: use Vim for all development for his class whilst on campus, and if caught using any other editor/IDE – or committing any artifacts showing evidence of such – we would lose several percentage points from our final mark for his class. Harsh? Perhaps. But I can’t thank that lecturer enough for that rule. He converted a mostly IDE-wielding class into one that actually appr…

I'd have taken the loss in mark on principle over something like that.

Re: How to Exit Vim

#378
post #321
post #214

Earlier quoted context omitted.

Nice. I did something similar w/ tmux: map the prefix key to C-a and map CapsLock key to Ctrl (never found real use for it). So Ctrl-a (actually CapsLock-a) is very ergonomically pleasant.

What about moving to the beginning of a line?

Ctrl-a + Ctrl-a, works like a charm :)

Re: How to Exit Vim

#379
post #290

Earlier quoted context omitted.

I'm glad you had a good experience with this, but I can tell you right now that if I had a professor insist I couldn't use my own tools for his class out of what appears to be nothing more than "you will use what I force you to use because I believe only REAL programmers use vim," I would be the type of student who would take great pleasure in using my text editor of choice discretely and doing whatever I could to en…

I am a Vim user, and if I had a group leader tell me that I had to use some different editor because we are all learning how to do this job together, and that learning how to use the editor properly was part of learning how to do the job, I would do what he says. At least for as long as he stays in the room... On the other hand, we had an architect who has since retired that said, if it was up to him, all developers…

I would do as they said if they convinced me that they had sound reasons for the choice. I don't think they'd be able to come up with sound reasons for dictating vi specifically, over a more lenient requirement, though. And being dictated to like that without sound reasoning behind it would instantly make me rebel. Unlike the other commenter, I would not do so quietly - I'd be more likely to make sure to use whatever he'd take most offense at in front of him, and seek to rally others to that cause.

Re: How to Exit Vim

#380
post #226
post #95

In the opposing vein, as an Emacs user the best configuration I ever made was to rebind C-x C-c to execute-extended-command instead of kill-emacs. It was way too easy to (even accidentally!) kill emacs with a sweep of a finger. And I probably use a few hundred execute-extended-command calls for each kill-emacs (which I now have to type manually as 'C-x C-c kill-emacs' - no problemo). A similar optimisation was with t…

| However, I've been toying around with the idea | of eventually writing a minimal 'vi' clone that | you cannot exit. I'm sure there's pent-up demand | just waiting for one! If a user space program can be truly unexitable without restarting (including the possibility of killing it through another shell, of course), then would you consider it to be a bug in the operating system? Seems a reasonable conclusion to me.

I once played a maze game on X where the maze would literally not allow the mouse cursor to go through the walls so it would be taken hostage. The only way to continue your X session was to solve the maze. That was quite funny. Oh, well, there could have been some other keys that would have done something about it but it was fun anyway.
Post reply on HN