Files and Windows Flashcards
zf{textobject}
manually create a fold around the text object
zo
manually open a fold
zc
manually close a fold
Start Vim with a list of files to edit
$vim file1 file2 etc
:args
Show on the status line the files open for editing. The current file is surrounded by brackets.
:n[ext]
Move to the next file.
:wnext
Write the current file and move to the next file
:next!
Move to the next file, abandoning changes to the current file.
:prev[ious]
Move the previous file.
:first
move to the first file
:last
move to the last file
:set (no)autowrite
Turn (off) on autowriting - when moving from file to file Vim will automatically write any changes.
CTRL-^
Jump between current file and the previously edited (the ‘alternate’) file
:edit filename
Opens file ‘filename’ for editing.
“{a-z}[ypd]
Perform the y, p or d operation (followed by each operations motion arguments) on the register specified by a single character from a to z.
Append to file
:write»_space; newfile
Append selection to file
Use visual mode to select a block of text. Then do
:write»_space; newfile
vim -R file
Open the file in Vim as read-only, ! will override