Live data from Hacker News

How to Exit Vim

github.com

81–90 of 409 posts

Re: How to Exit Vim

#82

Fun read! My next bash exercise will be to try and understand some of these commands, quite a feat! greping the ps output would work with any program, right ? That was pretty cool. Killing it from emacs was def a good laugh ! They should add the script kiddie way: `sudo rm -rf /` ^^

safe-rm voids that command ( https://launchpad.net/safe-rm )

Re: How to Exit Vim

#83

The question is not "How" but "Why" you would want to ever do that in the first place;-) Many years ago I knew a university professor and students said about him he might leave uni occasionally but he sure never leaves Emacs. Some live in Emacs, some live in Vim.

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

Re: How to Exit Vim

#85
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 ;-)

pgrep is a good habit, it's on every major unix except perhaps aix.

Most other constructions can backfire in some unexpected way.

Re: How to Exit Vim

#87
I distinctly remember being a teenager and trying vim. Being entirely confused I wanted to exit and when I realized I couldn't I panicked a bit and started smashing keys. Eventually I gave up and forced a reboot with the power button. Based on my extensive experience with Windows I was confident it was hung in a bad state.

Re: How to Exit Vim

#88
I once found a system where a third party vendor installed vim as root with suid permissions. I've had a few days of fun before I finally decided to clue the sysadmin about it.

Re: How to Exit Vim

#89

Oh dear. What are the chances this will eventually rank fairly highly on search engines - this is going to ruin the soul of the unsuspecting people who end up thinking that this is not satirical advice.

If you don't see it's a joke, Vim is not for you. Stick with Notepad or Google Docs. Obviously, it's not aimed at you :-;

Re: How to Exit Vim

#90

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

Why make it a nitpick and not a fun fact? :)
Post reply on HN