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.
我当前的 Vim 设置包括ack.vim 插件。现在,我想使用我在其他系统上的 Vim 设置,但其中一些系统没有安装 ack。有没有办法让我检测 .vimrc 中是否存在 ack 并相应地打开/关闭插件?
(编辑:修正了一个错字。)
可能有更好的方法,但这有效:
call system('which ack') if !v:shell_error " turn your plugin on endif