vim - Can two `split windows` implement `scroll lock` or `scoll sync` or similar functions?
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 16:38:52
0
1
534

When writing code, because the monitor cannot be raised up, the number of lines displayed in the code is very small, and scrolling up and down is very frequent, so I think like this:

When editing a single file, :vs, there are two vertical windows (The number of the left window is 1-44, and the number of the right window is 45-88) , and then implement the scroll lock or scroll sync function (refer to the tile tabs of firefox), you can make full use of the widescreen space.

Excuse me, has it been implemented?

---Preliminary ideas already available --

:h scroll-bind

过去多啦不再A梦
过去多啦不再A梦

reply all(1)
習慣沉默

Actually, I don’t quite understand what you mean. From your description, is it to display the same file in vertical split screen, and then bind the two split screens to make them scroll together? If so: :help 'cursorbind' See for yourself.

However, your initial request is that scrolling is very frequent, so I don’t understand. Even if the scrolling is divided into two screens simultaneously, isn’t it the same as scrolling on one screen? Unless your two screens display two different parts of a file, such as 1-40 on the left and 41-80 on the right, and then scroll simultaneously...~~ However, vim seems to be unable to do this, and you need to write a plug-in. ~~
Set set scrollbind in both windows. You need to manually adjust the starting lines of the two windows before setting

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!