-
Notifications
You must be signed in to change notification settings - Fork 1
/
vim_exercises.cheats
57 lines (50 loc) · 1.68 KB
/
vim_exercises.cheats
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
There should be some vim exercies here.
* Buffer motion
- Top of window
- H
- Middle of Window
- M
- Bottom of Window
- L
- Current line to top of window
- z<CR>
- Keep cursor on current line, but move lines up by 3
- <C-e>
- Keep cursor on current line, but move lines down by 4
- <C-y>
* Windows
- create 4 panes in vim
- :split<CR> :vsplit<CR> Control-Wj :vsplit<CR>
- switch focus to all of them
- Control-Wh
- Control-Wj
- Control-Wk
- Control-Wl
- expand the northwest pane to fill the screen, then return to the 4 panes
- Control-Wh
- Contral-Wj
#you should be in the northwest pane
- Control-W_
- Control-W|
#you should have the northwest pane fill the sceen
- Control-W=
#you should be back to 4 equal panes
- expand the southeast pane to fill the screen, then return to the 4 panes
- Control-w3w
- Control-W_
- Control-W|
or
- Control-ww
- Control-W_
- Control-W|
? which side of the screen does a new window get created on? Is that what you want?
- use these in your .vimrc to override the default behavior of :vnew or :new
set splitright
set splitbelow
? What pattern of panes do you use in your normal workflow? Ask why yourself should ever leave vim.
- if you're feeling sick of control-W use <leader> to map a new command, or some other remap.
* Starting vim
- Start vim with no .vimrc settings
- vim -u NONE <my file>
- Start vim in readonly mode
- vim -R <my file>