One of my Computer Science lecturers had a rule: use Vim for all development for his class whilst on campus, and if caught using any other editor/IDE – or committing any artifacts showing evidence of such – we would lose several percentage points from our final mark for his class. Harsh? Perhaps. But I can’t thank that lecturer enough for that rule. He converted a mostly IDE-wielding class into one that actually appr…
Had the same thing when I was studying CompSci. Ended up spending more time configuring vim than doing the work I was supposed to do. Even did the completely pointless exercise of making custom syntax highlighting for the pseudocode language we had to use.
How to Exit Vim
221–230 of 409 posts
Re: How to Exit Vim
#222I have the feeling something is missing on that list, but I can't put my finger on it ...
BRS, that old classic Big Red Switch, kills all known operating systems and proc's, dead in their tracks. Me, It's usually :wq, or sometimes :q! or more than likely ZZ - which can be done with shift zz or if you truly want to do it with just one finger, capslock then zz.
Re: How to Exit Vim
#223Jokes 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...
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.
Re: How to Exit Vim
#224One of my Computer Science lecturers had a rule: use Vim for all development for his class whilst on campus, and if caught using any other editor/IDE – or committing any artifacts showing evidence of such – we would lose several percentage points from our final mark for his class. Harsh? Perhaps. But I can’t thank that lecturer enough for that rule. He converted a mostly IDE-wielding class into one that actually appr…
That's stupid and elitist. There's no reason to force students to go against IDEs that they're already used to, but also the general method of navigating around a computer which they're probably used to from MS Word etc.
Re: How to Exit Vim
#225Re: How to Exit Vim
#226In 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…
| However, I've been toying around with the idea
| of eventually writing a minimal 'vi' clone that
| you cannot exit. I'm sure there's pent-up demand
| just waiting for one!
If a user space program can be truly unexitable without restarting (including the possibility of killing it through another shell, of course), then would you consider it to be a bug in the operating system? Seems a reasonable conclusion to me.Re: How to Exit Vim
#227Earlier quoted context omitted.
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? :)
Re: How to Exit Vim
#228Earlier quoted context omitted.
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.
* https://mywiki.wooledge.org/ProcessManagement#The_risk_of_pa...
Re: How to Exit Vim
#229Re: How to Exit Vim
#230It appears that the first bunch of methods don't account for graphical distributions of Vim, e.g. MacVim―which have a different executable name.