Standardize wiki link opening scheme with xdg-open
This commit is contained in:
parent
c541763617
commit
7b076d7a2f
1 changed files with 4 additions and 8 deletions
|
@ -42,13 +42,9 @@ let g:wiki_list_todos = ['[ ]', '[x]']
|
||||||
|
|
||||||
" set file opening schemes
|
" set file opening schemes
|
||||||
function! WikiFileOpen(...) abort dict
|
function! WikiFileOpen(...) abort dict
|
||||||
if self.path =~# '.pdf$'
|
" use xdg-open for now -- can still customize if need be, see
|
||||||
silent execute '!zathura' fnameescape(self.path) '&'
|
" :help wiki-config -> g:wiki_file_open for an example
|
||||||
return 1
|
silent execute '!xdg-open' fnameescape(self.path) '&'
|
||||||
elseif self.path =~# '.html$'
|
return 1
|
||||||
silent execute '!qutebrowser' fnameescape(self.path) '&'
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
return 0
|
|
||||||
endfunction
|
endfunction
|
||||||
let g:wiki_file_open = 'WikiFileOpen'
|
let g:wiki_file_open = 'WikiFileOpen'
|
||||||
|
|
Loading…
Reference in a new issue