-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvim_tips
More file actions
44 lines (36 loc) · 961 Bytes
/
vim_tips
File metadata and controls
44 lines (36 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
########
# regex
########
# reuse part of search pattern
%s/\(.*\)/\1/ #what you want to reuse stays within \( \) , what you don't is outside
#############
# macros
############
# To enter a macro, type:
q<letter><commands>q
# To execute the macro <number> times (once by default), type:
<number>@<letter>
#######
# UI
#######
# cycle tabs
gt gT
# move insert mode (to the right move normally)
<S-Left> cursor one word back (like "b" command)
<C-Left> cursor one word back (like "b" command)
<S-Right> cursor one word forward (like "w" command)
<C-Right> cursor one word forward (like "w" command)
# delete
de # delete to end of word
dw # delete to beginning of next word (space also)
d$ # delete to end of line
# split vertically
C-w v
v# move among splitted tabs
c-w arrow
#or#
c-w c-w
## ntree
:Explore - opens netrw in the current window
:Sexplore - opens netrw in a horizontal split
:Vexplore - opens netrw in a vertical split