Live data from Hacker News

How to Exit Vim

github.com

141–150 of 409 posts

Re: How to Exit Vim

#141

Earlier quoted context omitted.

I know some basic commands and know it well enough to edit git commit messages and interactive rebase (`ddkP` is probably the most advanced command I know). But I've never thought "I prefer this over my regular editor this is amazing". I just don't get the satisfaction. 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, like idk, cmd+c…

> `ddkP` is probably the most advanced command I know Maybe I'm not thinking straight because of the sickness, but I think `ddp` from the line above does the same thing with one fewer keystroke.

`P` pastes to the line above.

Re: How to Exit Vim

#143

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

I first used vi / vim about 30 years back. There are other editors that provide fancy features and I do use them routinely but there is no day I have not started (and exited) vim. Get used to it.

Re: How to Exit Vim

#144
post #135

Jokes aside, shouldn't the page start with actually teaching how to quit vim? The page is considerably popular to show up on a Google search. I imagine the frustration of a beginner actually trying the first examples and not getting the joke immediately.

I'd bet that most people who get stuck don't start vim themselves though. I taught (the basics of) git to a bunch of students recently and the first time we did a commit I had to go around the room and show people how to operate vim. I bet the same happens when new people use visudo, etc

Re: How to Exit Vim

#145
The Scrum manager way

1. Call in a meeting, early in the morning

2. Tell everybody what a good job they are doing.

3. Tell everybody that there is still a lot to do.

4. Tell everybody that "we" can do it.

5. Remind them of the importance of team work.

6. Go through the tickets.

7. Tell the project manager that a ticket for closing Vim is missing.

8. Write a ticket called "As a user I want to exit Vim!" on your own.

8.1. While reminding everybody that this is not the proper process.

9. Discuss new ticket in group.

10. Reword ticket as "As a user I want to be able to open other applications!"

11. Ask who of the team wants to do this.

12. Postpone decision until the next meeting.

Re: How to Exit Vim

#146
post #135

Jokes aside, shouldn't the page start with actually teaching how to quit vim? The page is considerably popular to show up on a Google search. I imagine the frustration of a beginner actually trying the first examples and not getting the joke immediately.

I don't know about vim, but in neovim you're greeted by the following when you launch it the first time:

type :help nvim if you are new!

type :checkhealth to optimize Nvim

type :q to exit

type :help for help

This joke is pretty outdated :P

(But still kind of funny)

Re: How to Exit Vim

#148
post #135

Jokes aside, shouldn't the page start with actually teaching how to quit vim? The page is considerably popular to show up on a Google search. I imagine the frustration of a beginner actually trying the first examples and not getting the joke immediately.

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

Re: How to Exit Vim

#149
post #107

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

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.

Re: How to Exit Vim

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

'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.

Post reply on HN