我希望同时打开NERDTree和TagList,但我不需要它们占据整个屏幕的高度。相反,我想让它们在单个垂直分割线内水平分割。
更具体地说,我想能够打开一个窗口,比如NERDTree,让它占满整个屏幕的高度。然后当我打开TagList时,让它与已经打开的NERDTree窗口水平分割。
有没有办法做到这一点?可能甚至有一种非“特定于这两个插件”的方法吗?
有没有办法做到这一点?可能甚至有一种非“特定于这两个插件”的方法吗?
NERDTree和Taglist无法在分屏中打开。
假设您在左侧有一个拆分的缓冲区(例如源代码),右侧有Taglist。
您可以将此放入一个函数中,并使用映射调用它:
NERDTree " open NERDTree
wincmd J " move NERDTree to the very bottom
wincmd k " move the cursor to the above split (the source code buffer)
wincmd H " move the split to the very left
wincmd l " move the cursor back to the NERDTree split
resize 20 " resize the split height to 20
exe 'vertical resize ' . g:NERDTreeWinSize " reset the split width
水平分割:
:split
垂直分割:
:vsplit
然后,当您按照自己的喜好拆分屏幕后,在所需的框架内打开nerdtree。 (或者您可以像@Vivek Pandey建议的那样使用缩写::sp :vsp)。