This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| snippets:vim:shortcuts [2015/02/14 14:46] – allspark | snippets:vim:shortcuts [2018/05/29 14:55] (current) – allspark | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| * normal mode: gT | * normal mode: gT | ||
| * :tabp | * :tabp | ||
| + | |||
| + | # split | ||
| + | |||
| + | ``` | ||
| + | :e filename | ||
| + | : | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 10 ctrl-w+ | ||
| + | : | ||
| + | : | ||
| + | : | ||
| + | : | ||
| + | : | ||
| + | :b 2 - open buffer #2 in this window | ||
| + | ``` | ||
| + | |||
| + | ## resize | ||
| + | |||
| + | ``` | ||
| + | :resize 60 | ||
| + | :res +5 | ||
| + | :res -5 | ||
| + | :vertical resize 80 | ||
| + | :vertical resize +5 | ||
| + | :vertical resize -5 | ||
| + | ``` | ||
| # editing | # editing | ||
| Line 18: | Line 47: | ||
| * dgg delete to beginning of file | * dgg delete to beginning of file | ||
| * dG delete to end of file | * dG delete to end of file | ||
| + | |||
| + | ## insert | ||
| + | |||
| + | ``` | ||
| + | To do this, move to the a in the first line, then press Ctrl-V (or Ctrl-Q if you use Ctrl-V for paste), then jj to select a visual block over three lines. | ||
| + | |||
| + | Now type I to start a special form of insert mode, then type the wanted text (s:). When you press Esc to exit from insert mode, the text will be inserted in the same position on each of the lines affected by the visual block selection. | ||
| + | ``` | ||