Earlier quoted context omitted.
Yes, I was able to save the file using ZZ rather than :w It's been a long time, but I was probably hung up on not being able to experimentally figure out : commands, where I was able to figure out control-z and ZZ.
ZZ exits vi(m) though?
How to Exit Vim
301–310 of 409 posts
Re: How to Exit Vim
#302:q!
Figured that would be useful to know in future.
Re: How to Exit Vim
#303Earlier quoted context omitted.
This page is well at the bottom of the first results page, and vim tells you how to exit it now when you try things like ctrl+c. I don't think anyone is in danger. https://i.imgur.com/b6dqBiV.png
>This page is well at the bottom of the first results page It's at the bottom now , yes, but if this (and copycats) takes off, it won't be. I've seen cases where the search results get so dominated by oh-so-clever parodies that are mixed in with legit answers that you can't tell which is which. >vim tells you how to exit it now when you try things like ctrl+c. Which is great, if that version of vim universally replac…
Re: How to Exit Vim
#304Re: How to Exit Vim
#305Earlier quoted context omitted.
>This page is well at the bottom of the first results page It's at the bottom now , yes, but if this (and copycats) takes off, it won't be. I've seen cases where the search results get so dominated by oh-so-clever parodies that are mixed in with legit answers that you can't tell which is which. >vim tells you how to exit it now when you try things like ctrl+c. Which is great, if that version of vim universally replac…
You're being a little dramatic
Re: How to Exit Vim
#306In 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…
> A similar optimisation was with tmux to bind the prefix to C-z. It's in a handy location next to ctrl and I very rarely use suspend anyway. I think gnu screen has the right idea here: ctrl-a. And you say z is close to control - does that mean you use emacs without shift lock as control?! (I mean sure, still closer than b...).
Re: How to Exit Vim
#307- 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 still prefer Emacs because of macros and org-mode, but I no longer fear vi when I'm doing a quick edit, editing a huge file, or on a emacsless new machine.
[1] https://stackoverflow.com/questions/1218390/what-is-your-mos...
Re: How to Exit Vim
#308Re: How to Exit Vim
#309Earlier quoted context omitted.
It’s a college class in which students are supposed to learn something new, that seems like a perfect example of a situation where you should be forced to do something outside your comfort zone. I don’t interpret that as the college professor saying this is actually the best way to code, just that forcing students to struggle through it is a learning experience.
> 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…
Re: How to Exit Vim
#310I 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 ;-)
What a day!