Tip #131: Scroll alternate window
tip karma |
Rating 4/4, Viewed by 786
|
created: |
|
October 11, 2001 7:53 |
|
complexity: |
|
basic |
author: |
|
Max Ischenko |
|
as of Vim: |
|
6.0 |
This mapping allow you to quickly scroll inactive window when displaying several windows concurrently.
nmap <silent> <M-Down> :call ScrollOtherWindow("down")<CR>
nmap <silent> <M-Up> :call ScrollOtherWindow("up")<CR>
fun! ScrollOtherWindow(dir)
if a:dir == "down"
let move = "\<C-E>"
elseif a:dir == "up"
let move = "\<C-Y>"
endif
exec "normal \<C-W>p" . move . "\<C-W>p"
endfun
PS: Original idea and discussion of this tip appeared on [email protected] mailing list, I'm just prettified it a little.
<<disabling default ftplugins |
window zooming convenience >>
Additional Notes
|