Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在使用winwidth(0)找出我可以在表格中显示多少文本,但如果有垂直拆分的窗口并且当前窗口没有跨越顶部框架的整个宽度,这将不起作用。如何在 Vim 脚本中获取顶部框架或 tabline 的宽度?
winwidth(0)
表格线占据了所有可用的宽度。该columns选项为您提供该宽度:
columns
let tabline_width = &columns