editor - vim - show one file in several files consistently -
i.e. possible in vim
edit large file in several simultaneously opened tabs in following way: first part of text (that fill vertical space), second - in second pane, , on.
if not possible in vim, maybe it's feature implemented in other editors?
synchronizes 2 vim panes
lets window 20 rows, then
:vsplit // splits window left , right panes ^w^w // focuses right pane 20^e // scrolls right pane down 20 rows :windo set scrollbind // syncronizes both panes
^w
means press , hold ctrl , press w. likewise ^e
:windo
means :set scrollbind
in open panes
implement in function
wraps above commands in function , binds to [
function! syncscroll() vsplit execute "normal! \<c-w>\<c-w>" . winheight(0) . "\<c-e>" windo set scrollbind endfunction nnoremap [ :call syncscroll()<cr>
you can add above function , mapping vimrc :e $myvimrc
, reload :source $myvimrc
ref:
Comments
Post a Comment