From 7b076d7a2ff4346fd09942eba9308482dddba9cf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 4 Feb 2020 20:47:49 +0100 Subject: [PATCH] Standardize wiki link opening scheme with xdg-open --- nvim/.config/nvim/plugin/wiki.vim | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nvim/.config/nvim/plugin/wiki.vim b/nvim/.config/nvim/plugin/wiki.vim index 1c63525..874c742 100644 --- a/nvim/.config/nvim/plugin/wiki.vim +++ b/nvim/.config/nvim/plugin/wiki.vim @@ -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'