diff --git a/.bmfiles b/.bmfiles index d71325b..e794fa4 100644 --- a/.bmfiles +++ b/.bmfiles @@ -1,5 +1,5 @@ -bf ~/.key_files -bd ~/.key_directories +bf ~/.bmfiles +bd ~/.bmdirs cfb ~/.bashrc cfz ~/.zshrc cfv ~/.vimrc diff --git a/.vimrc b/.vimrc index 5ba108a..2eb76d2 100644 --- a/.vimrc +++ b/.vimrc @@ -41,22 +41,17 @@ call plug#end() map v $F@ly$:!feh --scale-down --auto-zoom --image-bg black " & " Open my bibliography file in split - map :vsp~/Documents/LaTeX/uni.bib - map b :vsp~/Documents/LaTeX/uni.bib - -" Open the selected text in a split (i.e. should be a file). - map o "oyaW:sp o - xnoremap o "oy:sp o - vnoremap o "oy:sp o + map b :vsp$BIB + map r :vsp$REFER " Replace all is aliased to S. nnoremap S :%s//g -" Open corresponding .pdf +" Open corresponding .pdf/.html or preview map p :!opout % -" Compile document - map c :!compiler % +" Compile document, be it groff/LaTeX/markdown/etc. + map c :w! \| !compiler % "For saving view folds: "au BufWinLeave * mkview @@ -69,7 +64,7 @@ call plug#end() autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown " groff files automatically detected - autocmd BufRead,BufNewFile *.ms,*.me,*.mom set filetype=groff + autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff " .tex files automatically detected autocmd BufRead,BufNewFile *.tex set filetype=tex @@ -77,11 +72,11 @@ call plug#end() " Readmes autowrap text: autocmd BufRead,BufNewFile *.md set tw=79 -" Get line, word and character counts with F3: - map :!wc % +" Get line, word and character counts with w: + map w :!wc % -" Spell-check set to F6: - map :setlocal spell! spelllang=en_us +" Spell-check set to o, 'o' for 'orthography': + map o :setlocal spell! spelllang=en_us " Use urlview to choose and open a url: :noremap u :wsilent !urlscan @@ -92,9 +87,7 @@ call plug#end() map "+P " Goyo plugin makes text more readable when writing prose: - map :Goyo map f :Goyo \| set linebreak - inoremap :Goyoa " Enable Goyo by default for mutt writting " Goyo's width will be the line limit in mutt. @@ -106,10 +99,10 @@ call plug#end() set wildmenu " Automatically deletes all tralling whitespace on save. - autocmd BufWritePre * %s/\s\+$//e + "autocmd BufWritePre * %s/\s\+$//e " When shortcut files are updated, renew bash and ranger configs with new material: - autocmd BufWritePost ~/.key_directories,~/.key_files !bash ~/.scripts/tools/shortcuts + autocmd BufWritePost ~/.bm* !shortcuts " Run xrdb whenever Xdefaults or Xresources are updated. autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb % @@ -134,11 +127,8 @@ call plug#end() """LATEX " Word count: - autocmd FileType tex map :w !detex \| wc -w - autocmd FileType tex inoremap :w !detex \| wc -w - " Compile document using xelatex: - autocmd FileType tex inoremap :!xelatex%a - autocmd FileType tex nnoremap :!xelatex% + autocmd FileType tex map o :w !detex \| wc -w + autocmd FileType tex inoremap o :w !detex \| wc -w " Code snippets autocmd FileType tex inoremap ,fr \begin{frame}\frametitle{}<++>\end{frame}<++>6kf}i autocmd FileType tex inoremap ,fi \begin{fitch}\end{fitch}<++>3kA