Repository navigation
Expand file tree
/
Copy pathvim_notes.txt
More file actions
133 lines (92 loc) · 2.62 KB
/
Copy pathvim_notes.txt
File metadata and controls
133 lines (92 loc) · 2.62 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
e""MODES"""
ESC "Normal Mode
i "insert mode (see more on insert mode below)
v "visual mode (allows you to select text)
V "visual mode lines (allows you to select lines)
<crtl + v> "block visual mode
"""BUFFERS"""
:bn "next buffer
:bp "previous buffer
:bd "delete buffer
Crtl-^ "switch to last buffer
:ls "show all buffers
"""WINDOWS"""
:sp <filename> "new window horizontal split
:vsp <filename> "new window virtical split
:30winc > "increase widow size 30
:30winc < "decrease widow size 30
Crtl-w = "makes the windows the same size
Crtl-w<size> > "increase window size 1 column
Crtl-w<size> < "decrease window size 1 column
Crtl-w <arrow> "moves to window
Crtl-w L "moves window to the far right
Crtl-w H "moves window to the far left
"""TABS"""
:tabnew <filename> "creates a new tab
:tab close "close tab
gt "switch between tabs
:tabn "next tab
:tabp "previous tab
:tabfirst "go to first tab
:tablast "go to last tab
"""SWITCH CASE"""
gu<motion> "lowercase text operated on by motion
gU<motion> "uppercase text operated on by motion
g~<motion>m "switch case operated on by motion
"""PLUG-INS"""
<f7> "uses vim-flake8 to run syntax and style checker
"""UNDO/REDO"""
u "undo
Crtl-r "redo
"""SEARCHING"""
/<search string> "allows you to search for text
n "goes to next occurance of the word
:nohl "removes the highlight after search
"""MOVING AROUND"""
gg "go to top of document
G "go to end of document
w "move forward one word
b "move backwards one word
e "move to end of word
0 "go to end of line
$ "go to the start of line
( "go forward one setence
) "go back one setence
{ "go forward on paragraph
} " go backward one paragraph
Ctrl-d "move half-page down
Ctrl-u "move half-page up
Ctrl-b "page up
Ctrl-f "page down
Ctrl-o "jump to last cursor position
Ctrl-i "jump to next cursor position
"""SCROLLING"""
zz "move current line to the middle of the screen
zt "move current line to the top of the screen
zb "move current line to the bottom of the screen
"""DELETING TEXT"""
dd "delete entire line
dw "delete word
x "delete character
r "replace a character
R "enter replace mode
dis "delete inside sentence
di{ "delete inside {
di( "delete inside (
di< "delete inside <
di" "delete inside /"
"""FONT SETTINGS"""
:set guifont=* "change the font settings using GUI
:set guifont=<tab> "change the font settings without the window
:set guifont? "find out current font settings
"""SHELL COMMANDS"""
"start the shell
:shell
"""INSERTS"""
"different types of inserts
i "insert before cursor
a "insert after cursor
I "insert at the begining of the line
A "insert at end of line
o "insert a new line below cursor
O "insert a new line above cursor