.vimrc中配置如下
" path指定查找的路径,详情help path
" includeexpr是尝试替换路径名中的.为/,详情help includeexpr
" suffixesadd为尝试路径后缀,详情help suffixesadd
set path=.,/usr/include,,..,../lualib,../work,
set includeexpr=substitute(v:fname,‘\\.‘,‘/‘,‘g‘)
set suffixesadd=.lua
使用gf在当前窗口跳转,或CTRL-M CTRL-F分屏打开
原文地址:http://blog.csdn.net/jncpp/article/details/45219525