Mapping | Description | Depends on |
---|---|---|
Ctrl-n | search files | fzf, awk |
Ctrl-f | search contents | silver-searcher (Ag) |
gd | goto definition | coc |
gy | goto type definition | coc |
gi | goto implementation | coc |
gw | goto references | coc |
rn | rename | coc |
rename | coc | |
f | format | coc |
callers | coc | |
Ctrl-Alt-Left | cursor position back | |
Ctrl-Alt-Right | cursor position forward |
Example | Command | Result |
---|---|---|
"Hello World" | cs"' | 'Hello World' |
'Hello World' | cs'<q> | <q>Hello World</q> |
<q>Hello World</q> | dst | Hello World |
'Hello World' | ds' | Hello World |
Hello World | ysiw<em> | <em>Hello</em> World |
_Hello World | ys2w" | "Hello World" |
In visual mode
Hello World S<p>
<p>
Hello World
</p>
Command | Alias | Description |
---|---|---|
]q | :cnext | next quickfix |
[q | :cprevious | previous quickfix |
]<space> | insert empty line below current line | |
]<space> | insert empty line above current line |
Command | Description |
---|---|
<C-r>/ | insert last search term |
-
| search current word forward (exact match)
g* | search current word(part) forward g# | search current word(part) backwards
Install the silver searcher plugin first if you want to use :Ag command.
yaourt -S the_silver_searcher
Command | Desciption |
---|---|
Tab | select current file |
ALT-D | deselect all |
ALT-A | select all |
C-T | open in tab |
C-V | open in vertical split |
C-X | open in split |
:Ag | silver searcher plugin |
Install xsel to as clipboard provider. Use plus (+) for selection or star (*) for copied register to access the clipboard.
:reg show all registers and stored values
"+p paste from plus register (selection)
Command | Description |
---|---|
% | jump to closing/opening tag |
:setlocal foldlevel=1 level to automatically fold
:setlocal foldlevelstart=1 level to start folding
Command | Description |
---|---|
zO | open all nested folds |
za | toggle fold |
zr | open all folds |
zm | close all folds |
Character | Description |
---|
| level down
^ | level up #foo | id="foo" .bar | class="foo" *5 | repeat 5 times $ | index of repeats starting with 1 ^ | level up
-
| same level
html:5 | create html 5
div#scrollable>ul>li*5.
<div id="scrollable">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
th>+td.foo$*4>
<th></th>
<td class="foo1"></td>
<td class="foo2"></td>
<td class="foo3"></td>
<td class="foo4"></td>