使用垂直分割的vim自动滚动分页 [英] auto-scrollable pagination with vim using vertical split

查看:104
本文介绍了使用垂直分割的vim自动滚动分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现以下目标:我想将一个vim会话拆分为两个(或更多)垂直窗口(使用:vsplit命令).然后,我想使每个窗口的内容垂直偏移,以使第一个窗口中最后一个可见的窗口之后的行成为第二个窗口的第一行.然后,当我使用箭头滚动时,垂直窗口将被滚动绑定,以使文本从第二个窗口流入第一个窗口.我该如何实现?

I want to achieve the following: I want to split a vim session into two (or more) vertical windows (with the :vsplit command). Then, I want to have each window contents vertically offsetted so that the line after the last visible one of the first window becomes the first line of the second window. Then, when I use the arrows to scroll around, the vertical windows are scrollbound so that text flows from the second window into the first. How can I achieve this?

推荐答案

有适用于此的插件: MultiPage

您还可以使用Chip Campbell在此帖子中描述的oneliner:

You can also use a oneliner described in this post by Chip Campbell:

 :nmap <silent> <Leader>ef :vsplit<bar>wincmd l<bar>exe "norm! Ljz<c-v><cr>"<cr>:set scb<cr>:wincmd h<cr> :set scb<cr>

这将绑定<Leader>ef以打开vsplit并使拆分连续进行.

This will bind <Leader>ef to open a vsplit and make the splits continuous.

这篇关于使用垂直分割的vim自动滚动分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆