From fdbe40acd8b7582bf0771bdd1b8baf9c785c1abe Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Mon, 6 Jan 2020 03:14:53 +0300 Subject: improve quality of life when editing latex --- .vimrc | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.vimrc b/.vimrc index dea2745..09b1b33 100644 --- a/.vimrc +++ b/.vimrc @@ -48,14 +48,11 @@ let mapleader =" " " Replace all is aliased to S. nnoremap S :%s//g -" Open corresponding.pdf - map p :!mupdf %pdf & - " Compile document - map c :!compiler % + map c :!doccompiler % -" Interpret .md files, etc. as .markdown - let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} +" View live preview of document + map v :LLPStartPreview " Make calcurse notes markdown compatible: autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown @@ -63,9 +60,6 @@ let mapleader =" " " Spell-check set to F2: map :setlocal spell! spelllang=en_us,es,ru -" Use urlview to choose and open a url: - :noremap u :wsilent !urlview - " Copy selected text to system clipboard (requires gvim installed): vnoremap "*y :let @+=@* @@ -81,11 +75,6 @@ let mapleader =" " vnoremap p "+p vnoremap P "+P -" Enable Goyo by default for mutt writting - " Goyo's width will be the line limit in mutt. - autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=72 - autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo - " Enable autocompletion: set wildmode=longest,list,full set wildmenu @@ -94,16 +83,13 @@ let mapleader =" " " Automatically deletes all tralling whitespace on save. autocmd BufWritePre * %s/\s\+$//e -" When shortcut files are updated, renew bash and ranger configs with new material: - autocmd BufWritePost ~/.scripts/folders,~/.scripts/configs !bash ~/.scripts/shortcuts.sh - " Runs a script that cleans out tex build files whenever I close out of a .tex file. - autocmd VimLeave *.tex !texclear + autocmd VimLeave *.tex !texclear % " Disables automatic commenting on newline: autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o -" Join line with ctrl +" Join line with alt nnoremap J " Easier tab navigation (similar to qutebrowser) -- cgit v1.2.3