automatically grab default pdf viewer for latex preview

This commit is contained in:
Andrei Stoica 2019-01-29 14:28:43 -05:00
parent fecc31cf2c
commit 0bd195b6d0
1 changed files with 5 additions and 2 deletions

7
.vimrc
View File

@ -1,7 +1,7 @@
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
filetype on " required filetype on " required
if empty(glob("~/.vim/bundle/Vundle.vim")) if empty(glob("~/.vim/bundle/Vundle.vim"))
execute '!git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim' execute '!git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim'
autocmd VimEnter * silent! PluginInstall autocmd VimEnter * silent! PluginInstall
endif endif
@ -75,4 +75,7 @@ highlight OverLength ctermbg=red ctermfg=white
match OverLength /\%>80v.\+/ match OverLength /\%>80v.\+/
filetype plugin on filetype plugin on
nmap ne :NERDTreeToggle<cr> nmap ne :NERDTreeToggle<cr>
let g:livepreview_previewer = 'atril' let pdf_viewer = system('echo ${$(xdg-mime query default application/pdf)\%.desktop}')
if pdf_viewer > 0
let g:livepreview_previewer = 'atril'
endif