Memory Tables Flashcards
> 1>
Redirects STDOUT. If redirection is to a file, the current contents of that file are overwritten.
> > 1»
Redirects STDOUT in append mode. If output is written to a file, the output is appended to that file.
2>
Redirects STDERR.
2>&1
Redirects STDERR to the same destination as STDOUT. Notice that this has to be used in combination with normal output redirection, as in:
ls whuhiu > errout 2>&1
<
0<
Redirects STDIN.
Esc
In vim, switches from input mode to command mode. Press this key before typing any command.
i, a
In vim, switches from command mode to input mode at (i) or after (a) the current cursor position.
o
In vim, opens a new line below the current cursor position and goes to input mode.
:wq
In vim, writes the current file and quits.
:q!
In vim, quits the file without applying any changes. The ! forces the command to do its work. Add the ! only if you really know what you are doing.
:w filename
In vim, writes the current file with a new filename.
dd
In vim, deletes the current line.
yy
In vim, copies the current line.
p
In vim, pastes the contents that have been cut or copied into memory.
v
In vim, enters visual mode, which allows you to select a block of text using the arrow keys. Use d to cut the selection or y to copy it.