如何配置Vim WindowManager自动聚焦文件窗口?

时间:2012-06-22 18:04:58

标签: vim

如何配置WinManager以自动执行此操作:

  • 当所有文件都关闭时,退出vim。
  • 当一个文件(或缓冲区)关闭时,显示下一个文件。
  • 当vim启动时,焦点转到文档窗口。

1 个答案:

答案 0 :(得分:0)

来自WinManager文档:(使用Script #1440,更新自Script #95

g:persistentBehaviour: if set to 0, then as soon as you quit all the files      
  and only the explorer windows are the ones left, vim will quit. the         
  default is 1, which means that the explorer windows persist even if         
  they are the only ones visible.

let g:persistentBehaviour=0

哪个应该解决你的第一个问题。

至于其他人,我会承认我很快就扫描了3500多行vimL,没有看到任何令我印象深刻的其他问题,而没有深入了解代码以及作者是如何做事的

相关问题