Commit 0cbaaeb5c7c29b8f03b0a05834c7ab184d6b081a Parent: aa4184319f65332a24a4ba667e5eb21c73fabd7b Author: mcol <mcol@posteo.net> Date: 2019-05-21 19:54:09 +0100 Committer: mcol <mcol@posteo.net> Committed: 2019-05-21 19:54:09 +0100 add tex ftplugin and texdoc handler
vimrc Modified
@@ -134,3 +134,14 @@ set title titlestring=%{progname}\ [%{v:servername}]\ [%n]\ %F endif if &term =~ '^screen' && !has('nvim') | exe "set t_ts=\e]2; t_fs=\7" | endif + + +let g:vimtex_doc_handlers = ['Texdoc'] +function! Texdoc(context) + call vimtex#doc#make_selection(a:context) + if !empty(a:context.selected) + execute '!texdoc' a:context.selected '&' + endif + return 1 +endfunction +
ftplugin/tex.vim Added
@@ -0,0 +1,9 @@ +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal shiftwidth=4 +setlocal textwidth=79 +setlocal expandtab + +nnoremap K :VimtexDocPackage<CR> + +nnoremap <localleader>lw :exe 'cexpr system("texcount ' . expand('%') . '")'<CR>:copen<CR>