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


GVIM脚本——打开当前文件所在位置
  1. function OpenFileLocation()  
  2.     if ( expand("%") != "" )  
  3.         execute "!start explorer /select, %"   
  4.     else  
  5.         execute "!start explorer /select, %:p:h"  
  6.     endif  
  7. endfunction  
  8.   
  9. map gb <ESC>:call OpenFileLocation()<CR>  
  10.   
  11. "我的第一个VIM脚本。  
  12. "功能:当前文件所在位置,同时不阻塞当前窗口。  

相关内容