-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvimcheatsheet
40 lines (29 loc) · 1.17 KB
/
vimcheatsheet
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
Filename: ~/.vimcheatsheet
Author: <lukas42singer (at) gmail (dot) com>
Date: 2015/01/11
Copyright (C) 2015 Lukas Singer
This is my vim cheat sheet.
I Load this by Pressing <leader>cs in normal mode in vim.
I automatically scroll down to the line "cheat sheet starts here" with no spaces between the words.
So the lines before that are a good place for general comments.
I open the cheatsheet window 60chars width, so you should keep your cheat sheet lines shorter than that.
Your cheet sheet should always contain about 7 cheats. (Clean them up and add new ones from time to time!)
Lookup my ~/.vimrc to see how i open it.
CHEATSHEETSTARTSHERE
<leader>cs
open this cheatsheet! add new cheats!
delete cheats when you master them!
make sure to have always about 7 cheats!
Search and Replace
:%s/foo/bar/g "replace foo with bar
:%s//bar/g " replace last search with bar
:%s/foo/bar/gc " replace foo with bar but ask
Use and add Abbreviations!
Use CapsLock instead of <C-c>
Use Gundo Plugin
<leader>u
H is PageDown
L is PageUp
Use <C-s to save a buffer.
Use <C-S> to save all buffers.
Use <leader>dt to display the date/time.