- replace
:%s/Search-Word/Replace-Word/g
- Go to a file
gf
- Go to a link
gx
- Go to the definition
gd
- Go to the implementation
gi
:enew
:new
:vnew
- go to a file
gf
- tag
<C-x><C-]>
- filename
<C-x><C-f>
- context-aware word
<C-x><C-p>
- line
<C-x><C-l>
- omni
<C-x><C-o>
- add word under the cursor as a good word
zg
orzug
- add word under the cursor as a bad word
zw
orzuw
-
move current line to the middle of the screen
zz
-
move current line to the top of the screen
zt
-
move current line to the bottom of the screen
zb
-
repeat find next character
;
forward,
backward -
see the content of registers
:registers
-
check if mapping exists
:mapcheck("<CR>", "n")
-
go back to previous location
<C-o>
-
go forward in locations
<C-i>
-
change to lowercase
gu
-
change to uppercase
gU
-
cycle through
:jumps
-
jump to the link
<C-]>
-
search word under the cursor
*
-
Horizontal split
:sp
-
Vertical split
:vs
-
change window size
- vertical
number <C-w> -/+` or `:res +/-number
- horizontal
number <C-w> >/<` or `:vertical res +/-number
-
set window size
- vertical
:resize 60
- horizontal
:vertical resize 60
-
Create new file in the file explore
%
-
Rename a file
R
- open cheatsheet
<leader>c
- open commit browser
:GV
- commit only for the current file
:GV!
- open in a split
<C-x>
- open in a vsplit
<C-v>
- indent
>>
<C-t>
- dedent
<<
<C-d>
-
function
af
,if
,aF
,iF
-
indent
ai
,ii
,aI
,iI
-
line
al
,il
,aL
,iL
- basic
cp<motion>
- line copy
cP
- paste
cv
gr<motion>
<operation>s<tag>
- ex ds"
-
git status
:G
-
add to stage
s
-
unstage
u
-
difftoal
dv
-
drop in difftool
dp
-
commit
:Gcommit
-
push
:Gpush
-
jump to next/previou funks
]c
[c
-
move up the directory
u
orU
-
Open commands
m
-
Open file without moving the cursor
go
gi
for split window
- open a selected file in vsplit
<C-v>
- open a selected file in split
<C-s>
-
goto definition
gf
-
goto implementation
gi
- toggle comment
gc{motion}