Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry, I do not get it?

what is :wq ?



You use that command in Vim to save and exit the file. But as a modal editor, if you're in insert mode, you'll type it into the file as text instead of a command, thus the search here.


It's the method of saving and exiting a text file in Vim. ':' enters command input mode, 'w' writes to disk and 'q' quits the program. These people mistakenly typed and saved it in non-vim-edited text files.


Write and quit on vi/vim, its quite hilarious to see them actually on code :)


Happens to me all the time if I'm in an IDE for some reason.


They're showing how often coders accidentally write ":wq" in their code, which is a common command in vim (save and quit).


In vi it's save (write) then quit vi. But if you're in the wrong mode it just thinks you're typing in the file.


It writes and quits in vi(m).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: