Sie sind auf Seite 1von 1

qa = start recording a macro in register a

q = end recording
Macros
@a = replay macro in register a h,j,k,l
ctrl-f = page up
:e filename = edit a file in a new buffer ctrl-b = page down
:bn = go to next buffer % = jump to matching brace
:bd = delete a buffer (close file) w = jump to end of words (punctuation)
:sp fn = open a file in new buffer and split window W = jump by words
ctrl-w s = split window e = jump to end of words (punctuation)
ctrl-w w = switch windows
E = jump to end of words
ctrl-w q = quit a window ctrl w - window commands
b = jump backward by words (punctuation)
ctrl-w v = split windows vertically Multi-File
B = jump backward by words
:tabe fn = edit file in new tab 0 = start of line
gt = next tab ^ = first character of line
gT = previous tabs
$ = end of line
:tabr = First tab Tab Commands
gg = go to first line
:tabl = Last tab
gd = go to def of the function or var under the cursor
:tabm [N] = move current tab after tab N Cursor Movement
[N]G = go to line N or last line
fx = move the cursor forward to the next occurrence of character x on the current line
:w = save
; = repeat last f command
:wq = save and quit
tx = like fx but move right before the character
:x = save and quit
Exiting Fx = move the cursor backwards to the next occurrence of x
:q = quit, but failed if unsaved
) ,(= move the cursor to next, previous sentence
:q! = quit
* = Read the string under the cursor and go to next occurrence
# = same as * but goes to previous occurrence
/pattern = search for pattern
`. = Go to line last edited
?pattern = search backwards for pattern
H = move the cursor to the Highest line on the screen
n = repeat search in same direction
M = move the cursor to the Middle of the screen
N = repeat search in opposite direction Screenwise
Search/Replace L = move the cursor to the Lowest line of the screen
:s/old/new/g = replace all old
throughout file ma = Make a bookmark name a at the current cursor position
:s/old/new/gc = replace all old with Bookmarks `a = Go to bookmark a (backtick, not single quote)
new and confirm each one
i = insert mode at cursor
v = start visual mode I = insert at the beginning of line
V = start linewise visual mode a = append after the cursor
ctrl-v = start blockwise visual mode A = append at the end of the line
o = move to other end of marked area o = open blank line below current line
Insert Mode
U = upper case of marked area O = open blank line above current line
O = move to Other corner of block Esc = exit insert mode
Marking Text
aw = mark a word ctrl-n = next completion
ab = a block with parens (braces) Completions (type a few chars then) ctrl-p = previous completion
Visual Mode
aB = a block with brackets (curly braces)
ib = inner () block r = replace a single character (!insert mode)
iB =inner {} block J = join line below to the current line
> = shift right cc = change an entire line
< = shift left cw = change to the end of word
y = yank c$ = change to the end of line
Commands
d = delete s = delete character at cursor and
~ = switch case substitute text
S = delete line at cursor and substitute text
dd = delete (cut) a line xp = transpose to letters
dw = delete the current word u = undo
Editing
x = delete current character ctrl-r = redo
X = delete previous character . = repeat last command
D = delete to end of line ~ = switch case
yy = yank (copy a line) g~iw = switch case of current word
2yy = yank (copy) 2 lines gUiw = make current word uppercase
Cut and Paste
yw = yank word guiw = make current word lowercase Vim Commands and Shortcuts
y$ = yank to end of line >> = indent line one column right
p = put the clipboard after cursor/current line << = indent line one column left By: Joe Martinez
== = auto-indent current line http://jrmiii.com
P = put the clipboard before the cursor/current line
@capitalist
]p = put the clipboard at the proper indentation
"a = use a register named a for the next yank/paste operation

Das könnte Ihnen auch gefallen