Oh looks, it's only been 10 minutes since the last Vim article was trending on HN, we're rivalling Hollywood levels of bubble here. Seriously, when CES is currently showing hundreds of new tech products and services, including a Hyundai electric helicopter - Vim is what we still talk about?
How to Exit Vim
41–50 of 409 posts
Re: How to Exit Vim
#42Oh looks, it's only been 10 minutes since the last Vim article was trending on HN, we're rivalling Hollywood levels of bubble here. Seriously, when CES is currently showing hundreds of new tech products and services, including a Hyundai electric helicopter - Vim is what we still talk about?
Re: How to Exit Vim
#43I came into this with a sense of "oh not again" and came out surprisingly happy. TIL that ZZ, ZQ exist and that a disown command exist on the command line. Also my preferred method from the list is the timeout, it would be nice to have counter in a corner of the vim window to know how much time is left though.
Re: How to Exit Vim
#44Fun 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 /` ^^
Yep, `ps | grep` is a common and useful idiom!
Re: How to Exit Vim
#45 :!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 -9Re: How to Exit Vim
#46The 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…
Re: How to Exit Vim
#47I like :x which effectively does an :wq if there have been changes but is one character less.
Re: How to Exit Vim
#48The 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.
As to why shutdown: cultural thing in the end. I was raised with the idea that wasting is bad (and objectively speaking it's very hard to argue with that) so if I don't need the machine running after I'm done with it, I just can't stand the idea of the thing using energy literally for nothing.
Re: How to Exit Vim
#49pssh.. they didn't mention the vimtectualist way - :q! or the French way - ZZ
As a vim noob, I needed to look it up [0]. ZZ saves the current file if modified and closes it. ZQ closes it without saving. Thank you, that will save me a few seconds per year. Why the French way? I don't get it and I am very curious :-) [0] https://unix.stackexchange.com/questions/93144/exit-vim-more...