-
-
Save pstachula-dev/8974789 to your computer and use it in GitHub Desktop.
Vim cheat sheets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Useful Commands | |
gg - jump to begining of file | |
G - jumo to end of file | |
{ - jump to paragraph | |
i - insert mode | |
a - insert mode after cursor | |
o - insert in new line below and swtich to insert mode | |
O - insert in new line above and swtich to insert mode | |
r - change letter | |
x - delele character | |
s - delete charcter and switch to insert mode | |
w - select first letter of next word | |
b - select previous word | |
cw - delete word and switch to insert mode | |
dw - delete word | |
dd - delete line | |
cc - delete line and insert mode | |
>G - indentation from the current line | |
. - repeat last change | |
u - undo changes | |
<C-r> - redo changes | |
A - move cursor to the end of line and switch to insert mode | |
I - move cursor to the start of line and swotch to insert mode | |
C - delete to the end of line and insert switch to insert mode | |
f{char} - look for the next character and move cursor to this match | |
; - select next match | |
, - select previous match | |
/pattern- n/N select next/previous match | |
%s/word/newowrd/g - search and replace word | |
2. Normal mode | |
yyp - duplicate line | |
>> - indent line | |
p - paste | |
yw - copy word | |
<C-d> - move down of half a screen | |
<C-u> - move up... | |
zz - move cursor in middle in the window | |
<C-ww> - change tab | |
vsplit{name} - new tab | |
<C-w>HJKL - moving tab | |
<C-w>> - expand a tab | |
<C-w>= - default size | |
:tabe {path}-new tab | |
3. Insert mode | |
<C-h> - delete back one character | |
<C-w> - delete back one word | |
<C-u> - delete back to start of line | |
4. Visual mode | |
v - visual mode | |
V - line visual mode | |
<C-v> - block visual mode (helper $) | |
vit - select word inside tag | |
ct{char}- delete word inside tag and swich to insert mode | |
gv - reselect visual selection | |
r{char} - replace character |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment