Live data from Hacker News

How to Exit Vim

github.com

231–240 of 409 posts

Re: How to Exit Vim

#231
post #53
post #45

I do not like the grep -v grep pattern. I think the regexp trick should be prefered: :!ps axuw | grep [v]im | awk '{print $2}' | xargs kill -9 This can also be merged in the awk command: :!ps axuw | awk '/[v]im/{print $2}' | xargs kill -9

Ugh, ps|grep is unnecessary. Just use pgrep! Or even better, pkill -9 ;-)

Issue 26 (q.v.) is closed.

Re: How to Exit Vim

#232

- So, how did you learn Vim? I heard there's quite a learning curve. - I just open it, but I couldn't figure out how to quit. Then I have been using it for three years already. (Same applies to Emacs.)

I have tried to start using vim so many times and failed. Even this year I thought to start using vim. Daily I open vim once try to do something new with it. Although I don't have much of hope that I will start using it an soon.

As a sysadmin, not a programmer, what I found helpful for learning Vim was not to try something new each day, but to find one or two commands that were valuable enough that I would at least open Vim somewhat regularly. The two that did it for me are delete line (dd), and change inner word (ciw), both extremely helpful for config file editing, especially when combined with repeat command (.)

After learning these first simple commands, it was enough to get me to open Vim at least a few times a day, which then motivated me to start learning more of the commands and it just snowballed along. I still only know probably 25% of Vim, but I feel incredibly comfortable in it now and rarely run into trouble when doing beginner to intermediate editing tasks.

Re: How to Exit Vim

#233

Earlier quoted context omitted.

It saddens me to say, but this is so familiar. Especially working in a big corporate company where they hire scrum masters who just follow the scrum guide.

Scrum has a built in self destruct method - the retrospective. With a little maneuvering, the team should be able to remove most of the annoying things about scrum by using the retrospective. Obviously you can't go scorched earth and drop all the annoying bits at once. But, if scrum is really being followed (I know this is also part of the problem), the retro should allow the team to change the process over time.

You can't remove a professional scrum-master who does nothing else in the retrospective as the scrum-master is running the retrospective.

Re: How to Exit Vim

#235
post #216
post #107

Great jokes but bad user interface design comes at a real cost.

Vim interface is copied too often for you to call it bad. It’s obviously well-loved.

No. It is quite objectively bad ui. That thousands of users cannot figure out how to do basic things is as objective as it gets.

Also that we nerds enjoy making jokes about it instead of fixing it is the reason we don't get invited to parties.

Re: How to Exit Vim

#236

Earlier quoted context omitted.

'screen' uses C-a as a prefix shortcut so developers of 'tmux' decided to use the next available key to avoid clash.

I don't understand the logic there. In what non-contrived scenario would you run both simultaneously, such that they would conflict? C-a does annoyingly conflict with readline's "move to start of line", though.

My understanding of the history is that the developers of tmux were using screen to develop tmux, because tmux didn't exist yet, so they needed a non-conflicting keystroke.

Obviously they could have switched before a general release, but I guess they had gotten used to it.

Re: How to Exit Vim

#237

Earlier quoted context omitted.

I have tried to start using vim so many times and failed. Even this year I thought to start using vim. Daily I open vim once try to do something new with it. Although I don't have much of hope that I will start using it an soon.

As a sysadmin, not a programmer, what I found helpful for learning Vim was not to try something new each day, but to find one or two commands that were valuable enough that I would at least open Vim somewhat regularly. The two that did it for me are delete line (dd), and change inner word (ciw), both extremely helpful for config file editing, especially when combined with repeat command (.) After learning these first…

As a fellow sysadmin, I would advise to learn vi properly then switch to Vim because the former is pretty much everywhere, and for example you could mess the file with cursor keys in Insert mode instead of using hjkl in it.

Re: How to Exit Vim

#238
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…

Emacs is so dynamic and easily configurable, that people can actually rebind a lot of things when their colleague go to the bathroom as a prank. Just open a scratch file, enter some s-expressions, evaluate them, then kill the buffer.

That's why my scratch buffer is by default NOT in elisp mode

Re: How to Exit Vim

#239
post #223
post #148

Earlier quoted context omitted.

Yeah, I mean if you really wanted to help people exit Vim you'd trap Ctrl-c in command mode and print the instructions at the bottom of the screen. Something along the lines of "Type :qa and press to exit Vim" would probably do it...

You're only targetting old 1970s terminal users, there, though. If you wanted to also help slightly more modern users who are used to CUA conventions from GUIs, you would have the [F1] key bring up some form of help screen, which said something like "Get out of Vim: Use :qa!" at the top.

You're only targeting old 1990s GUI users there, though.

If you wanted to also help silghtly more modern users who are used to discoverable-UI conventions from mobile apps, you would have it so shaking your device brings up some form of chat bot, which would suggest asking it how to quit Vim.

Re: How to Exit Vim

#240

Earlier quoted context omitted.

Scrum has a built in self destruct method - the retrospective. With a little maneuvering, the team should be able to remove most of the annoying things about scrum by using the retrospective. Obviously you can't go scorched earth and drop all the annoying bits at once. But, if scrum is really being followed (I know this is also part of the problem), the retro should allow the team to change the process over time.

You can't remove a professional scrum-master who does nothing else in the retrospective as the scrum-master is running the retrospective.

Exactly, and those scrum-masters are usually good at talking and getting the business on their sides. There's literally no way to change those processes without making yourself look bad.
Post reply on HN