From 8acde477c8d550d7a47436e5aa5e4f7c6610d8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerardo=20Marx=20Ch=C3=A1vez-Campos?= Date: Tue, 5 Jul 2022 00:02:26 -0500 Subject: [PATCH] vimlatex --- vimrc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/vimrc b/vimrc index a1b3ac8..3cab2b8 100644 --- a/vimrc +++ b/vimrc @@ -29,6 +29,7 @@ set spelllang=en_us set fillchars+=eob:~ set showtabline=2 set laststatus=2 +set backspace=indent,eol,start " more powerful backspacing " ------------------ " Basic styling @@ -38,12 +39,27 @@ highlight CursorLine ctermbg=Black cterm=NONE highlight CursorLineNr ctermbg=Black cterm=bold ctermfg=Green highlight LineNr ctermbg=Black ctermfg=White +" OS detection +" --------------------------------------------- +if !exists("g:os_current") + if system('uname -s') == "Linux\n" + let g:os_current = "Linux" + elseif system('uname -s') == "Darwin\n" + let g:os_current = "Darwin" + else + echom "Error: the current operating system won't support my Vim Config" + let g:os_current = "Other" + endif +endif +" --------------------------------------------- " Plugin settings " ------------------ call plug#begin() Plug 'https://github.com/Badacadabra/vim-archery' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' +Plug 'lervag/vimtex' +Plug 'Valloric/YouCompleteMe' call plug#end() " Theme configuration @@ -57,3 +73,22 @@ let g:airline#extensions#tabline#left_alt_sep = '|' let g:airline_symbols = {} let g:airline_symbols.colnr = ' ㏇:' +" LaTeX +let g:tex_flavor='latex' +set sw=2 +set iskeyword+=: +let g:vimtex_view_method = "skim" +let g:vimtex_compiler_latexmk= {'options' : ['-pdf', '-shell-escape', '-verbose', '-file-line-error', '-synctex=1', '-interaction=nonstopmode',],} " we need to enable -shell-escape to be able to use externalization library for avioiding recompiling unchanged diagrams/graphs created using tikz/pgfplots +if !exists('g:ycm_semantic_triggers') + let g:ycm_semantic_triggers = {} + endif +au VimEnter * let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme +" --------------------------------------------- + + +" Miscelanious +" --------------------------------------------- +" Easier write command +let mapleader = " " +nnoremap w write +