-
Notifications
You must be signed in to change notification settings - Fork 0
/
command_vim
43 lines (29 loc) · 1.48 KB
/
command_vim
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
:new - Create blank buffer.
:set ft? - Check the filetype.
:set ft=python - Set the filetype of the current buffer (useful with :new).
Assign a file name when creating the blank buffer:
:new mynewfile.py
:edit mynewfile.py
:tabnew mynewfile.py
:imap - To display the currently defined insert mode maps.
:ls - To see a list of current buffers.
:e ../myfile.py - To open a new file.
* Normal Mode *
. - insert last line.
yy or Y - copy line.
p or P - paste line.
$ - last key
% - jumps between pairs of parenthesis ( )'s, { }'s, [ ]'s.
ZQ - to exit unconditionally without changing anything (equal :q!)
ZZ - saves the file and exits. Saves the current file if modified and exits or closes the current window/tab (same as :x but not :wq which writes the file even if it hasn't been modified).
Q - Quit (same as :q)
:x - is one key less than :wq
:xa - To exit unconditionally after having written all the modified files in all windows, tabs and hidden buffers (it still won't exit if some files can't be written for a reason or another)
dit - will delete the text between matching XML tags.
cit - will delete the text between matching XML tags and put inser mode.
ci" - will delete the text between "".
* Visual Mode *
it - select content between inner XML tags block
* Insert Mode *
Ctrl-n - to get a list of word suggestions while in insert mode.
Ctrl-p - to autocomplete word and suggestions.