This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| tips:tools:vim [2011/05/11 10:35] mattieu | tips:tools:vim [2011/05/11 10:36] (current) mattieu | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * vsplit = vertical split | * vsplit = vertical split | ||
| - | ==== When starting vim ==== | + | === When starting vim === | 
| <code bash>$ vim -o foo bar = open foo and bar in split | <code bash>$ vim -o foo bar = open foo and bar in split | ||
| $ vim -O foo bar = open foo and bar in vsplit</ | $ vim -O foo bar = open foo and bar in vsplit</ | ||
| - | ==== When vim is already started | + | === When vim is already started === | 
| ' | ' | ||
| <code bash>^w s = share the screen horizontally in two | <code bash>^w s = share the screen horizontally in two | ||
| ^w v = share the screen vertically in two</ | ^w v = share the screen vertically in two</ | ||
| - | ==== How to move inside splits | + | === How to move inside splits === | 
| <code bash>^w j = select the bottom split | <code bash>^w j = select the bottom split | ||
| ^w k = select the top split | ^w k = select the top split | ||
| Line 22: | Line 22: | ||
| ^w - = reduce the current split a line</ | ^w - = reduce the current split a line</ | ||
| - | ==== How to move inside vsplits | + | === How to move inside vsplits === | 
| <code bash>^w h = select the vsplit on the left | <code bash>^w h = select the vsplit on the left | ||
| ^w l = select the vsplit on the right | ^w l = select the vsplit on the right | ||
| Line 30: | Line 30: | ||
| ^w [up, | ^w [up, | ||
| - | ==== How to move splits | + | === How to move splits === | 
| <code bash>^w H = move on the left | <code bash>^w H = move on the left | ||
| ^w L = move on the right | ^w L = move on the right | ||
| Line 36: | Line 36: | ||
| ^w J = move on the bottom</ | ^w J = move on the bottom</ | ||
| - | ==== How to close splits | + | === How to close splits === | 
| <code bash>^w q = close the current split | <code bash>^w q = close the current split | ||
| ^w o = close all the splits but the current</ | ^w o = close all the splits but the current</ | ||