• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/239

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

239 Cards in this Set

  • Front
  • Back
Move cursor down one line
j
Move cursor up one line
k
Move cursor left one character
h
Move cursor right one character
l
Return to Normal mode
<ESC><br /><span style="font-style:italic;">(escape)</span>
Exit the editor, discarding any changes
:q!<ENTER>
Exit the editor, but abort if there are unsaved changes
:q<ENTER>
Delete the character under the cursor
x
Insert text before the cursor
i
Append text at the end of the current line
A
Save the current file and exit
:wq<ENTER>
Append text after the cursor
a
Invert case of current character
~
Go down half a screen
<C-D>
Go up half a screen
<C-U>
Go forward a screen
<C-F>
Go back a screen
<C-B>
Go to end of text
G
Go to previous word
b
Go to next word
w
Go to end of (next) word
e<br />(goes to end of next word if already at end of word)
Go to end of previous word
ge
Go to first non-whitespace character of current line
^
Go to last character of current line
$
Go to line <span style="font-style:italic;">n</span>
<span style="font-style:italic;">n</span>G <span style="font-style:italic;">n</span>gg
Go to first line of file
1G gg
Go to last line of file
G
Insert at beginning of line (after whitespace)
I
Undo last command
u
Restore last changed line
U
Redo last undo
<C-R>
Move cursor left to start of next space-separated word
B
Move cursor right to start of next space-separated word
W
Move cursor left to end of next space-separated word
gE
Move cursor right to end of next space-separated word
E
Move cursor to next occurrence of character <span style="font-style:italic;">c</span>
f<span style="font-style:italic;">c</span>
Move cursor to previous occurrence of character <span style="font-style:italic;">c</span>
F<span style="font-style:italic;">c</span>
Move cursor to character before next occurrence of <span style="font-style:italic;">c</span>
t<span style="font-style:italic;">c</span>
Move cursor to character after previous occurrence of <span style="font-style:italic;">c</span>
T<span style="font-style:italic;">c</span>
Delete a word
dw
Delete to the end of the line
d$
Delete text indicated by motion <span style="font-style:italic;">m</span>
d<span style="font-style:italic;">m</span><br /><span style="font-style:italic;">(example: d$ means delete to end of line)</span>
Delete <span style="font-style:italic;">n</span> words
<span style="font-style:italic;">n</span>dw
Move to the start of the line (before whitespace)
0
Delete a line
dd
Undo the last command
u<br /><span style="font-style:italic;">(may be used repeatedly to undo multiple commands)</span>
Redo the last undone command
<C-R><br /><span style="font-style:italic;">(Control-R)</span>
Put previously deleted (or copied) text after the cursor
p
Put previously deleted text before the cursor
P
Replace the character under the cursor with character <span style="font-style:italic;">x</span>
r<span style="font-style:italic;">x</span>
Change to the end of the current word
ce
Change to the end of the current line
c$
See location in file and file status
<C-G><br /><span style="font-style:italic;">(Control-G)</span>
Search for phrase
/<span style="font-style:italic;">phrase</span><ENTER>
Substitute first occurrence of <span style="font-style:italic;">phrase1</span> with <span style="font-style:italic;">phrase2</span> on the current line
:s/<span style="font-style:italic;">phrase1</span>/<span style="font-style:italic;">phrase2</span><ENTER>
Substitute all occurrences of <span style="font-style:italic;">phrase1</span> with <span style="font-style:italic;">phrase2</span> on the current line
:s/<span style="font-style:italic;">phrase1</span>/<span style="font-style:italic;">phrase2</span>/g<ENTER><br /><span style="font-style:italic;">(The /g at the end means "global")</span>
Substitute all occurrences of <span style="font-style:italic;">phrase1</span> with <span style="font-style:italic;">phrase2</span> in the entire file
:%s/<span style="font-style:italic;">phrase1</span>/<span style="font-style:italic;">phrase2</span>/g<br /><span style="font-style:italic;">(% means execute the command for the entire file)</span>
Execute external command <span style="font-style:italic;">cmd</span>
:!<span style="font-style:italic;">cmd</span>
Save the current file to file named <span style="font-style:italic;">filename</span>
:w <span style="font-style:italic;">filename</span>
Save the visually selected area to file named <span style="font-style:italic;">filename</span>
:w <span style="font-style:italic;">filename</span><br /><span style=" font-style:italic;">(vim will automatically add '<,'> to the beginning of your command for the visually selected area)</span>
Open a new line below the cursor's line and enter Insert mode
o
Open a new line above the cursor's line and enter Insert mode
O <span style="font-style:italic;">(capital o)</span>
Enter Replace mode, to repeatedly replace the character under the cursor and advance
R
Yank (copy) the selected text
y
Yank (copy) the current line
yy <span style="font-style:italic;">or</span> Y
Yank (copy) from cursor through motion <span style="font-style:italic;">m</span>
y<span style="font-style:italic;">m</span>
Put (paste) copied text after the cursor
p
Put (paste) copied text before the cursor
P
Ignore case in searches
:set ic <span style="font-style:italic;">(or :set ignorecase)</span>
Show partial matches while typing search phrase
:set is <span style="font-style:italic;">(or :set incsearch)</span>
Highlight all matching phrases for the last search
:set hls <span style="font-style:italic;">(or :set hlsearch)</span>
Get help on command <span style="font-style:italic;">cmd</span>
:help <span style="font-style:italic;">cmd</span>
Jump to the next window
<C-W><C-W>
Jump to the next window right, left, up, or down
<C-W><C-<span style="font-style:italic;">K</span>> <span style="font-style:italic;">(where </span>K<span style="font-style:italic;"> is a cursor movement key h, j, k, l)</span>
Jump to last modified line
'.
Jump to exact spot in last modified line
`.
Retrace your movements in file (backward)<br />
<C-O>
Retrace your movements in file (forward)
<C-I>
Forward find word under cursor
*
Forward find word under cursor (fuzzy)
g*
Backward find word under cursor (fuzzy)
g#
Backward find word under cursor
#
Open file name under cursor
gf
Swap next two characters around
xp
(Re)indent the text on the current line or on the area selected
=
Append the next <span style="font-style:italic;">n</span> lines to register 'a'
A<span style=font-style:italic;">n</span>yy
Go to top of screen
H
Go to middle of screen
M
Go to bottom of screen
L
Mark this line <span style="font-style:italic;">x</span>
m<span style="font-style:italic;">x</span>
Go to exact position of mark in line marked <span style="font-style:italic;">x</span>
`<span style="font-style:italic;">x</span>
Go to percentage from top of file
<span style="font-style:italic;">n</span>%
Match of next brace, bracket, comment, #define
%
Go to line <span style="font-style:italic;">n</span> from top of window
<span style="font-style:italic;">n</span>H
Go to line <span style="font-style:italic;">n</span> from bottom of window
<span style="font-style:italic;">n</span>L
Insert at first column
gI
Go to line marked <span style="font-style:italic;">x</span>
'x
Switch case for movement command <span style="font-style:italic;">m</span>
g~<span style="font-style:italic;">m</span>
Lowercase text between cursor and movement <span style="font-style:italic;">m</span>
gu<span style="font-style:italic;">m</span>
Uppercase text between cursor and movement command <span style="font-style:italic;">m</span>
gU<span style="font-style:italic;">m</span>
Delete range <span style="font-style:italic;">r</span> lines
:<span style="font-style:italic;">r</span>d<Enter>
Delete range <span style="font-style:italic;">r</span> lines into register <span style="font-style:italic;">x</span>
:<span style="font-style:italic;">r</span>d<span style="font-style:italic;">x</span><Enter>
Insert character represented by ASCII value <span style="font-style:italic;">n</span> (Insert mode)
<C-V><span style="font-style:italic;">n</span>
Insert previously inserted text (Insert mode)
<C-A>
Text completion before cursor (Insert mode)
<C-N>
Text completion after cursor (Insert mode)
<C-P>
Delete word before cursor (Insert mode)
<C-W>
Delete all inserted characters in current line
<C-U>
Show the content of all registers
:reg<Enter>
Show the content of register <span style="font-style:italic;">x</span>
:reg <span style="font-style:italic;">x</span><Enter>
Perform rot13 encoding on movement <span style="font-style:italic;">m</span>
g?<span style="font-style:italic;">m</span>
Filter lines of movement <span style="font-style:italic;">m</span> through command <span style="font-style:italic;">c</span>
!<span style="font-style:italic;">mc</span>
Filter <span style="font-style:italic;">n</span> lines through command <span style="font-style:italic;">c</span>
<span style="font-style:italic;">n</span>!!<span style="font-style:italic;">c</span>
Filter range <span style="font-style:italic;">r</span> lines through command <span style="font-style:italic;">c</span>
:r!<span style="font-style:italic;">c</span>
In visual mode, exchange cursor position with start/end of highlighting
o
Start highlighting block
<C-V>
Start highlighting with previous visual area
gv
Record typed commands to register <span style="font-style:italic;">x</span>
q<span style="font-style:italic;">x</span>
Append typed commands to register <span style="font-style:italic;">x</span>
q<span style="font-style:italic;">X</span>
Stop recording
q
Move cursor to leftmost position of screen on current line
g0
Move cursor to first non-blank character of current line on screen
g^
Move cursor to last character of current line on screen
g$
Move cursor one screen line up
gk
Move cursor one screen line down
gj
Repeat last f/F/t/T movement
;
Inverse of last f/F/t/T movement
, <span style="font-style:italic;">(comma)</span>
Set a mark in the current file
m<span style="font-style:italic;">[a-z]</span>
Set a mark that can be returned to from any file
m<span style="font-style:italic;">[A-Z]</span><br />(capital letters)
Jump to tag under cursor
<C-]>
Return from tag jump
<C-T>
Jump to tag on top of tag stack (or select if multiple matches)
:tj
Scroll one line up
<C-E>
Scroll one line down
<C-Y>
Scroll current line to top of window
zt <span style="font-style:italic;">or</span> z<Enter>
Scroll current line to center of window
zz <span style="font-style:italic;">or</span> z.
Scroll current line to bottom of window
zb <span style="font-style:italic;">or</span> z-
Scroll one character to the right
zh
Scroll one character to the left
zl
Scroll half a screen to the right
zH
Scroll half a screen to the left
zL
Write range <span style="font-style:italic;">r</span> to file <span style="font-style:italic;">f</span>
:<span style="font-style:italic;">r</span>w <span style="font-style:italic;">f</span>
Append range <span style="font-style:italic;">r</span> to file <span style="font-style:italic;">f</span>
:<span style="font-style:italic;">r</span>w>><span style="font-style:italic;">f</span>
Insert content of file <span style="font-style:italic;">f</span> below cursor
:r <span style="font-style:italic;">f</span>
Insert output of command <span style="font-style:italic;">c</span> below cursor
:r! <span style="font-style:italic;">c</span>
Repeat last substitution (:s) command
&
Go to next modified buffer
:bm
Open all buffers in new splits
:ba <span style="font-style:italic;">or</span> :sba
Open all buffers in new vertical splits
:vert ba <span style="font-style:italic;">or</span> :vert sba
The position of mark <span style="font-style:italic;">x</span> in an <span style="font-style:italic;">ex</span> range
'<span style="font-style:italic;">x</span><br /><span style=" font-style:italic;">(example: :'x,'y delete)</span>
In an <span style="font-style:italic;">ex</span> range, the next line where <span style="font-style:italic;">pat</span> matches
/<span style="font-style:italic;">pat</span>/
In an <span style="font-style:italic;">ex</span> range, the previous line where <span style="font-style:italic;">pat</span> matches
?<span style="font-style:italic;">pat</span>?
<span style="font-style:italic;">n</span> lines from the preceding line number in an <span style="font-style:italic;">ex</span> range
+<span style="font-style:italic;">n</span>
<span style="font-style:italic;">n</span> lines before the preceding line number, in an <span style="font-style:italic;">ex</span> range
-<span style="font-style:italic;">n</span>
Look up keyword under cursor with <span style="font-weight:600;">man</span>
K
Forward to start of next method
]m
Backward to start of previous method
[m
Move to global definition of symbol under cursor
gD
Move to local definition of symbol under cursor
gd
Open a window for each file in the argument list
:all
Display the argument list
:args
List the leaves in the tree of (undoable) changes
:undol[ist]
Go to previous text state (may cross undo branches)
g-
Go to next text state (may cross undo branches)
g+
Set up automatic wrapping when reaching right margin <span style="font-style:italic;">n</span>
:wrapmargin <span style="font-style:italic;">n</span>
Turn off automatic wrapping
:wrapmargin 0
Turn on line numbers
:set number
Turn off line numbers
:set nonumber
List of your movements
:ju(mps)
List of your recent commands
:his[tory]
Lowercase line
guu
Uppercase line
gUU
Display hex, ascii value of character under cursor
ga
Display hex value of utf-8 character under cursor
g8
Rot13 whole file
ggg?G
Add <span style="font-style:italic;">n</span> to next number on same line as the cursor
<span style="font-style:italic;">n</span><C-A>
In insert mode, insert value of expression (ie 5*5) into text
<C-R>=<span style="font-style:italic;">expr</span>
Subtract <span style="font-style:italic;">n</span> (default 1) from next number on same line as cursor
<span style="font-style:italic;">n</span><C-X>
Execute the macro recorded in register <span style="font-style:italic;">x</span> on all lines of the current file
:%normal @<span style="font-style:italic;">x</span>
Execute the macro recorded in register <span style="font-style:italic;">x</span> on a visually selected set of lines
:normal @<span style="font-style:italic;">x</span>
Show lines in file matching word under cursor
[I (capital 'I')
Move cursor <span style="font-style:italic;">n</span> sentences forward
<span style="font-style:italic;">n</span>)
Move cursor <span style="font-style:italic;">n</span> sentences backward
<span style="font-style:italic;">n</span>(
Move cursor <span style="font-style:italic;">n</span> paragraphs forward
<span style="font-style:italic;">n</span>}
Move cursor <span style="font-style:italic;">n</span> paragraphs backward
<span style="font-style:italic;">n</span>{
Paste below the current line, adjusting indentation to match current line
]p
Paste above the current line, adjusting indentation to match current line
[p
Go to center of screen on current line
gm
Column <span style="font-style:italic;">n</span> of current line
<span style="font-style:italic;">n</span>|
Insert previously inserted text and return to command mode (Insert mode)
<C-@>
Insert content of register <span style="font-style:italic;">x</span> (Insert mode)
<C-R><span style="font-style:italic;">x</span>
Insert digraph (£ Θ ± etc.)
<C-K><span style="font-style:italic;">c1c2</span>
Put register after cursor position, leaving cursor after new text
gp
Put register before cursor position, leaving cursor after new text
gP
Format lines of movement <span style="font-style:italic;">m</span> as plain text
gq<span style="font-style:italic;">m</span>
Center lines in range <span style="font-style:italic;">r</span> to width <span style="font-style:italic;">n</span>
:<span style="font-style:italic;">r</span>ce <span style="font-style:italic;">n</span>
Left align lines in range <span style="font-style:italic;">r</span> with indent <span style="font-style:italic;">n</span>
:<span style="font-style:italic;">r</span>le <span style="font-style:italic;">n</span>
Right align lines in range <span style="font-style:italic;">r</span> to width <span style="font-style:italic;">n</span>
:<span style="font-style:italic;">r</span>ri <span style="font-style:italic;">n</span>
In visual mode, select a word
aw
In visual mode, select a sentence
as
In visual mode, select a paragraph
ap
In visual mode, select a block delimited by ( )
ab
In visual mode, select a block delimited by { }
aB
Move cursor down <span style="font-style:italic;">n</span>-1 lines to first non-blank character
<span style="font-style:italic;">n</span>_
Move backward to start of section
[[
Move forward to start of next section
]]
Move backward to previous section end
[]
Move forward to next section end
][
Move backward to previous unclosed (
[(
Move forward to next unclosed )
])
Move backward to previous unclosed {
[{
Move forward to next unclosed }
]}
List matching tags (and select)
:ts
Split window and show tag under cursor
<C-W>]
Preview tag under cursor
<C-W>{
Preview tag <span style="font-style:italic;">t</span>
:pt <span style="font-style:italic;">t</span>
Close tag preview window
<C-W>z <span style="font-style:italic;">or </span>:pc
Visual area expressed as an <span style="font-style:italic;">ex</span> range
*<br /><span style="font-style:italic;">(Example: :* delete)</span>
Create a fold for motion <span style="font-style:italic;">m</span> in manual folding mode
zf<span style="font-style:italic;">m</span>
Create a fold for the visually highlighted text in manual folding mode
zf
Create a fold for <span style="font-style:italic;">n</span> lines in manual folding mode
<span style="font-style:italic;">n</span>zF
Create a fold for the range of lines <span style="font-style:italic;">r</span> in manual folding mode
:<span style="font-style:italic;">r</span>fo[ld]
Delete one folding level at the cursor in manual folding mode
zd
Delete all folds recursively at the cursor in manual folding mode
zD
Eliminate all folds in the window in manual folding mode
zE
Open <span style="font-style:italic;">n</span> levels of folding at the cursor
<span style="font-style:italic;">n</span>zo<br /><span style="font-style:italic;">(default 1 level when no count provided)</span>
Open all folds under the cursor (or visual selection) recursively
zO
Close <span style="font-style:italic;">n</span> levels of folding under the cursor
<span style="font-style:italic;">n</span>zc<br /><span style="font-style:italic;">(default 1 level when no count given)</span>
Close all folds under the cursor (or visual selection) recursively
zC
Toggle <span style="font-style:italic;">n</span> levels of folding (close open folds; open closed folds)
<span style="font-style:italic;">n</span>za
Toggle folding recursively (close open folds and open closed folds)
zA
Open just enough folds to make the line in which the cursor is located not folded
zv
Open all folds
zR
Fold none: All folds will be open
zn
Fold normal: All folds will be as they were before (opposite of fold none)
zN
Move to start of current open fold
[z
Move to end of current open fold
]z
Move down to start of next fold
zj
Move up to end of previous fold
zk