简体   繁体   中英

VIM: how to get current window size, so that I can set NEEDTree to 1/3 window size?

I wish when I bring out NEEDTree or TagBar, the window size is always 1/3 of my original vim window size, no matter how big my vim window is, it's calculated automatically.

How to do this?

vim has built-in function winwidth({nr}) to get window width. If you pass a zero as win number, it will return your the width of current window.

To change the window size of NerdTree, you have to set the variable: NERDTreeWinSize

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM