Skip to content

Commit

Permalink
NEW: add usingVim
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuk committed Oct 25, 2016
1 parent 4fc4d89 commit b02ae80
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/vimExplorer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ Common Options~

|g:VEConf_usingKDE| If set to 1, use "kfmclient"
|g:VEConf_usingGnome| If set to 1, use "gnome-open"
|g:VEConf_usingVim| If set to 1, always use Vim.

|g:VEConf_vimOpenCommand| The Vim command to open file.
Default: "tabfind"

|g:VEConf_recyclePath| Recycle path. Example:
let g:VEConf_recyclePath = 'C:\VErecycle\'
Expand Down
14 changes: 14 additions & 0 deletions plugin/vimExplorer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ endif
if !exists("g:VEConf_usingGnome")
let g:VEConf_usingGnome = 0
endif
if !exists("g:VEConf_usingVim")
let g:VEConf_usingVim = 0
endif
if !exists("g:VEConf_vimOpenCommand")
let g:VEConf_vimOpenCommand = "tabfind"
endif

"Recycle path
if !exists("g:VEConf_recyclePath")
Expand Down Expand Up @@ -510,6 +516,14 @@ function! VEPlatform.start(path)
elseif g:VEConf_usingGnome
let convPath = "gnome-open " . convPath
let ret = self.system(convPath)
elseif g:VEConf_usingVim
let ret = 1
try
execute g:VEConf_vimOpenCommand . " " . convPath
catch
let ret = 0
echohl ErrorMsg | echomsg v:exception | echohl None
endtry
else " default using gnome-open.
let convPath = "gnome-open " . convPath
let ret = self.system(convPath)
Expand Down

0 comments on commit b02ae80

Please sign in to comment.