GVIM脚本——打开目前文件所在位置

GVIM脚本——打开当前文件所在位置function OpenFileLocation()if ( expand(%) ! )execute !start ex

GVIM脚本——打开当前文件所在位置

function OpenFileLocation()if ( expand("%") != "" )execute "!start explorer /select, %" elseexecute "!start explorer /select, %:p:h"endifendfunctionmap gb <ESC>:call OpenFileLocation()<CR>"我的第一个VIM脚本。"功能:当前文件所在位置,同时不阻塞当前窗口。