How do you save in "vim"?
How do you save in "vim"? I've tried ":x", ctrl+s, anything I could think of or find online consisting this information? Sorry for asking such a stupid question, but I can't figure it out, heh.
|
vim 101
<esc>:w<cr> (write the file) <esc>:wq<cr> (write the file and quit) <esc>:q!<cr> (force a quit without saving the file) <esc>/searchphrase<cr> search the file for 'searchprhase' |
Also after making the changes and are in Command mode < esc > you can: <Shift + ZZ>
|
here's a quick reference file that I use:
"i" => insert mode "Esc" => normal mode in insert mode, it's just like a normal text-editor. some basic normal mode commands: :q! => quit w/out saving :w <file> => write to <file> (<file> only needed once) :wq => write and quit dw => delete word d$ => delet to end of line dd => delet whole line u => undo command <ctrl>-g => show location & status of file :<command> => execute <command> (in bash... ex: mkdir) |
I like using vi, and the trick with shift+z+z came in handy when I started to use it, you can see all that vi can offer in a command mode issue
:h to quit out of it just use :q |
All times are GMT -5. The time now is 09:10 PM. |