diff options
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/.config/nvim/init.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 896d282..67e8384 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -86,6 +86,20 @@ call plug#end() noremap <Leader>l :set list!<CR> set list +" Latex settings +" Compile document, be it groff/LaTeX/markdown/etc. + map <leader>c :w! \| !compiler <c-r>%<CR> + +" Open corresponding .pdf/.html or preview + map <leader>p :!opout <c-r>%<CR><CR> + +" Runs a script that cleans out tex build files whenever I close out of a .tex file. + autocmd VimLeave *.tex !texclear % + +" Ensure files are read as what I want: + let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} + autocmd BufRead,BufNewFile *.tex set filetype=tex + " Ansible settings au BufRead,BufNewFile */playbooks/*.yaml set filetype=yaml.ansible au BufRead,BufNewFile */tasks/*.yaml set filetype=yaml.ansible @@ -136,3 +150,8 @@ call plug#end() let g:UltiSnipsJumpForwardTrigger = "<c-j>" let g:UltiSnipsJumpBackwardTrigger = "<c-k>" let g:UltiSnipsRemoveSelectModeMappings = 0 + +" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable. +if &diff + highlight! link DiffText MatchParen +endif |
