Standardize wiki link opening scheme with xdg-open

This commit is contained in:
Marty Oehme 2020-02-04 20:47:49 +01:00
parent c541763617
commit 7b076d7a2f

View file

@ -42,13 +42,9 @@ let g:wiki_list_todos = ['[ ]', '[x]']
" set file opening schemes
function! WikiFileOpen(...) abort dict
if self.path =~# '.pdf$'
silent execute '!zathura' fnameescape(self.path) '&'
return 1
elseif self.path =~# '.html$'
silent execute '!qutebrowser' fnameescape(self.path) '&'
return 1
endif
return 0
" use xdg-open for now -- can still customize if need be, see
" :help wiki-config -> g:wiki_file_open for an example
silent execute '!xdg-open' fnameescape(self.path) '&'
return 1
endfunction
let g:wiki_file_open = 'WikiFileOpen'