(Move categories to tip template) |
(Remove html character entities) |
||
Line 2: | Line 2: | ||
{{TipImported |
{{TipImported |
||
|id=402 |
|id=402 |
||
− | |previous= |
+ | |previous=400 |
|next=404 |
|next=404 |
||
|created=January 14, 2003 |
|created=January 14, 2003 |
||
Line 22: | Line 22: | ||
<pre> |
<pre> |
||
"Jump between windows |
"Jump between windows |
||
− | map |
+ | map <Space> <c-W>w |
"Open window wide |
"Open window wide |
||
− | map |
+ | map <Space><Space> :call OpenSplittedWindowWide()<CR> |
function OpenSplittedWindowWide() |
function OpenSplittedWindowWide() |
||
normal ^W| |
normal ^W| |
||
Line 34: | Line 34: | ||
==Comments== |
==Comments== |
||
− | :map |
+ | :map <Space><Space> <c-W>w<c-W>_ |
will do the job of swichting and maximizing split windows |
will do the job of swichting and maximizing split windows |
||
Line 46: | Line 46: | ||
<pre> |
<pre> |
||
− | map |
+ | map <C-J> <C-W>j<C-W>_ |
− | map |
+ | map <C-K> <C-W>k<C-W>_ |
</pre> |
</pre> |
||
Line 57: | Line 57: | ||
<pre> |
<pre> |
||
− | map |
+ | map <c-space> <c-w>w<c-w>_ |
− | map <s-space |
+ | map <s-space> <c-w>W<c-w>_ |
</pre> |
</pre> |
||
Line 65: | Line 65: | ||
<pre> |
<pre> |
||
− | map |
+ | map <C-space> <Esc><C-W><C-W> |
− | imap <S-space |
+ | imap <S-space> <Esc> |
− | nmap <S-space |
+ | nmap <S-space> <Esc>: |
</pre> |
</pre> |
||
Latest revision as of 02:51, 29 September 2008
created January 14, 2003 · complexity basic · author Klaus Horsten · version 6.0
Jump between split windows and open them wide. Use only the space-bar for this.
Press space-bar once and you jump to the next window.
Press it twice and the window opens wide for better reading - this works for horizontal and vertically open windows.
Put this in your vimrc:
"Jump between windows map <Space> <c-W>w "Open window wide map <Space><Space> :call OpenSplittedWindowWide()<CR> function OpenSplittedWindowWide() normal ^W| normal ^W20+ endfunction
Note: ^W must be generated by vim (must be one character).
Comments[]
:map <Space><Space> <c-W>w<c-W>_
will do the job of swichting and maximizing split windows
Only for horizontal open windows, not for vertically open ones.
A more intuitive (for Vi) way of switching between horizontal splits, is using the 'j' and 'k' keys
Following an earlier issued tip, I use the following mappings:
map <C-J> <C-W>j<C-W>_ map <C-K> <C-W>k<C-W>_
This maps Ctrl-j to "go down 1 window and maximize it" This maps Ctrl-k to "go up 1 window and maximize it"
Great tip! I combined CTRL-i/j and the space so CTRL-space and SHIFT-space to move to the next and previous split, respectively.
map <c-space> <c-w>w<c-w>_ map <s-space> <c-w>W<c-w>_
I use -
map <C-space> <Esc><C-W><C-W> imap <S-space> <Esc> nmap <S-space> <Esc>:
This way, I can quit to the command mode using just the Shift-Spacebar combination from insert mode.