aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Damani <damani.kumar@gmail.com>2020-06-18 17:08:01 +0000
committerKumar Damani <damani.kumar@gmail.com>2020-06-18 17:08:01 +0000
commitf9fa4661fcc0b2344509966ab74d07eca6b124dc (patch)
treed0ad90f22e612cef763edd3140e60d20b6d08996
parent92f8aaa867763fc4851e8ef11f09d48781b16f6a (diff)
updated nvim
-rw-r--r--nvim/.config/nvim/init.vim19
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