From e5d28a505a76d84d2c695d574a815a985ce400ca Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 20 May 2018 10:07:15 -0700 Subject: [PATCH] vimrc tweaks --- .vimrc | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.vimrc b/.vimrc index 9d09aab..310f9ca 100644 --- a/.vimrc +++ b/.vimrc @@ -13,7 +13,6 @@ let mapleader =" " set nocompatible filetype plugin on syntax on - "colorscheme wal set encoding=utf-8 set number set relativenumber @@ -36,6 +35,7 @@ let mapleader =" " " 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 @@ -67,24 +67,31 @@ let mapleader =" " " Spell-check set to F6: map :setlocal spell! spelllang=en_us,es -" Toggle DeadKeys set to F7 (for accent marks): +" Toggle DeadKeys set (for accent marks): so ~/.vim/luke/deadkeys.vim - nm :call ToggleDeadKeys() + nm d :call ToggleDeadKeys() + imap d :call ToggleDeadKeys()a " Source my IPA shorcuts: - map i :so ~/.vim/luke/ipa.vim + so ~/.vim/luke/ipa.vim + nm i :call ToggleIPA() + imap i :call ToggleIPA()a " Use urlview to choose and open a url: :noremap u :wsilent !urlview -" Copy selected text to system clipboard (requires xclip installed): - vnoremap "cy:!echo -n 'c' \|xclip +" Copy selected text to system clipboard (requires gvim installed): + vnoremap "*y :let @+=@* " Goyo plugin makes text more readable when writing prose: map :Goyo - map f :Goyo + map f :Goyo \| set linebreak inoremap :Goyoa +" Toggle Prose Mode with F8: + so ~/.vim/luke/prose.vim + nm :call ToggleProse() + " 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 @@ -97,8 +104,7 @@ 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: +" 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. @@ -120,7 +126,6 @@ let mapleader =" " inoremap jw inoremap wj - "____ _ _ "/ ___| _ __ (_)_ __ _ __ ___| |_ ___ "\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __| @@ -250,7 +255,6 @@ let mapleader =" " autocmd Filetype rmd inoremap ;p ```{python}```2kO """.xml - "autocmd FileType xml inoremap ;e <++>:put=strftime('%c')A<++><++> autocmd FileType xml inoremap ;e <++>isPermaLink="false"><++>:put=strftime('%a, %d %b %Y %H:%M:%S %z')kJA<++>]]>?<enter>cit autocmd FileType xml inoremap ;a <a href="<++>"><++></a><++><Esc>F"ci"