6 ms·
$i for a Few Important People:wq
by slashnull 12y ago
$i for a Few Important People:wq
- Danieru 12y agoYou might know this already but ZZ is faster and a bit more reliable method than :wq ZZ has the side benefit of never saving out copies into randomly named files.
- scintill76 12y ago(Not the same poster) Nice, I'll keep that in mind! Love that I'm getting vim tips from comments on an article about organized crime.
- S4M 12y agoActually I have no idea what this slashnull's first comment has to do with the article. There must be a pun I am not getting...
- atavistic 12y agoDollar sign eye will cause the Vee Eye text editing program to insert the subsequent text at the end of the current line in a text file (in this hypothetical instance the title of the article), until it encounters the special colon operator, at which point the double you and queue letters will cause the program to write those changes to disk, and then quit. http://www.vim.org http://www.vim.org If you were SSH'd into a Linux machine serving static HTML to the world-wide web, those are the keystrokes you might issue to the vi text editor, at the command line, to modify the line in a particular file, responsible for the title of the article on this site. The user, dang, has changed the title of this article, as a moderator action, in an effort to clarify the nature of this article, and deflect any advocacy of organized crime away from Hacker News, leaving that part of the social commentary in Vice's hands, as is the tendency for most articles that Vice magazine publishes. Ha ha, get it?
- slashnull 12y agoToo late. :wq is already embedded in my autonomic nervous system. Really this is what vim is about. The commands you first remember just stay with you. Just so you can forget alternatives even exist and use that memory to save new commands. Thanks either way.
- slashnull 12y agoAlso, find . -name "*.swp" -exec rm {} \; is also slowly getting abstracted away in my mind as a single, atomic and very useful command.
- jessaustin 12y agoYou don't recover the editing session first?
- GregorStocks 12y agoYou can configure Vim to put the swap files in your ~/.vim instead of the directory of the file you're editing, which in my experience is much less annoying - see https://github.com/GregorStocks/configs/blob/35ab5c3c45e5cfa9a380c56431d539ca47ea7e00/.vimrc#L65 https://github.com/GregorStocks/configs/blob/35ab5c3c45e5cfa...
- jqm 12y agoI have a directory in /tmp set up for swap files. And indeed, it is much less annoying than having them in the working directory.
- cturner 12y ago$a