-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvim-notes
More file actions
54 lines (36 loc) · 1.24 KB
/
vim-notes
File metadata and controls
54 lines (36 loc) · 1.24 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
================
Git (Fugitive)
================
- add current file to index: :Gwrite
- checkout current file (revert): :Gread
- remove current file from index and delete buffer: :Gremove
- move file and update buffer for new location: :Gmove path/to/move/to (NOTE: "/" is project root, not file system root)
============
Navigating
============
- % toggle between beginning and end of text block (HTML tag, if/else/end, etc)
- m{a-z}{A-Z} (set mark. uppercase is global mark.)
- `{a-z}{A-Z} (go to mark)
========
Macros
========
- macros: "q" to start recording and stop recording
===========
Searching
===========
- * kicks of a search for the word/text under the cursor
- %s/search_text/replace_text/ec (replace all "search_text" occurances with "replace_text". "c" option is for confirmation.)
================
Modifying Text
================
- surround text: cs'" <-- changes ' to "
- remove surrounding text: ds'
- change surrounding tag: cst<ul><ol>
- change surrounding text (visual): select text, S'
- commenting: select text block, <leader>c<space>
=========
Buffers
=========
- resize buffer: <cmd>-direction <- increase/decrease buffer size by 5 pixels
- new vertically split buffer: <leader>s
- navigate between buffers: <cmd>hjkl