vim中lua require路径的gf跳转

.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分屏打开

你可能感兴趣的:(vim,lua,require,vimrc)