From fe22a1e23348e266b77aa65d0ce63e19e74c604e Mon Sep 17 00:00:00 2001
From: Luke
Date: Sun, 21 Jan 2018 19:44:23 -0700
Subject: vimrc additions and deadkeys
---
.vimrc | 135 ++++++++++++++++++++++++++++++-----------------------------------
1 file changed, 63 insertions(+), 72 deletions(-)
(limited to '.vimrc')
diff --git a/.vimrc b/.vimrc
index dce8cbb..d742574 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1,3 +1,9 @@
+" _ _ ____ _ _ _ _ _
+" | | _ _| | _____ / ___| _ __ ___ (_) |_| |__ ( )___ __ _(_)_ __ ___ _ __ ___
+" | | | | | | |/ / _ \ \___ \| '_ ` _ \| | __| '_ \|// __| \ \ / / | '_ ` _ \| '__/ __|
+" | |__| |_| | < __/ ___) | | | | | | | |_| | | | \__ \ \ V /| | | | | | | | | (__
+" |_____\__,_|_|\_\___| |____/|_| |_| |_|_|\__|_| |_| |___/ \_/ |_|_| |_| |_|_| \___|
+
" Load Pathogen for plugins:
execute pathogen#infect()
execute pathogen#helptags()
@@ -5,45 +11,49 @@
" Some basics:
set nocompatible
filetype plugin on
- "colorscheme wal
syntax on
+ "colorscheme wal
set encoding=utf-8
set number
- set relativenumber
+ "set relativenumber
-"au BufWinLeave * mkview
-"au BufWinEnter * silent loadview
-let g:instant_markdown_autostart = 0
+"For saving view folds:
+ "au BufWinLeave * mkview
+ "au BufWinEnter * silent loadview
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} "Interpret .md files, etc. as .markdown
-"Make calcurse notes markdown compatible:
+" Make calcurse notes markdown compatible:
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
-"Spell-check set to F6:
+" Spell-check set to F6:
map :setlocal spell! spelllang=en_us,es
-"Toggle DeadKeys set to F7 (for accent marks):
+" Toggle DeadKeys set to F7 (for accent marks):
so ~/.vim/luke/deadkeys.vim
nm :call ToggleDeadKeys()
-"Goyo plugin makes text more readable when writing prose:
+" Goyo plugin makes text more readable when writing prose:
map :Goyo
inoremap :Goyoa
-"Enable Goyo by default for mutt writting
+" Source my IPA shorcuts:
+ so ~/.vim/luke/ipa.vim
+
+" Enable Goyo by default for mutt writting
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=72
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
+ " Goyo's width will be the line limit in mutt.
-"Enable autocompletion:
+" Enable autocompletion:
set wildmode=longest,list,full
set wildmenu
-"Automatically deletes all tralling whitespace on save.
+" 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 ~/.config/Scripts/folders,~/.config/Scripts/configs !bash ~/.config/Scripts/shortcuts.sh
" Runs a script that cleans out tex build files whenever I close out of a .tex file.
@@ -55,18 +65,22 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd
"Copy selected text to system clipboard (requires gvim installed):
vnoremap "+y
-"C-T for new tab
+" Disables automatic commenting on newline:
+ autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
+
+" C-T for new tab
nnoremap :tabnew
-"""BASIC TOOLS
-"Navigating with guides
+" Navigating with guides
inoremap /<++>"_c4l
vnoremap /<++>"_c4l
map /<++>"_c4l
inoremap ;gui <++>
-"For normal mode when in terminals (in X I have caps mapped to esc, this replaces it when I don't have X)
+
+" For normal mode when in terminals (in X I have caps mapped to esc, this replaces it when I don't have X)
inoremap jw
inoremap wj
+
"Shortcutting split navigation, saving a keypress:
map h
map j
@@ -84,8 +98,8 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd
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 inoremap :!xelatex%a
+ autocmd FileType tex nnoremap :!xelatex%
" Code snippets
autocmd FileType tex inoremap ;fr \begin{frame}\frametitle{}<++>\end{frame}<++>6kf}i
autocmd FileType tex inoremap ;fi \begin{fitch}\end{fitch}<++>3kA
@@ -93,9 +107,6 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd
autocmd FileType tex inoremap ;em \emph{}<++>T{i
autocmd FileType tex inoremap ;bf \textbf{}<++>T{i
autocmd FileType tex vnoremap ; ``>2la}?\\{a
- "autocmd FileType tex vnoremap : ``>2la}?{\\la
- autocmd FileType tex inoremap {{ F{i
- autocmd FileType tex inoremap }} f}a
autocmd FileType tex inoremap ;it \textit{}<++>T{i
autocmd FileType tex inoremap ;ct \textcite{}<++>T{i
autocmd FileType tex inoremap ;cp \parencite{}<++>T{i
@@ -154,49 +165,36 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd
autocmd Filetype tex inoremap ;inst {\textsc{inst}}
autocmd FileType tex inoremap ;tipa \textipa{}<++>T{i
-"For Indo-European
-"autocmd FileType tex inoremap ;dh d\textsuperscript{h}
-"autocmd FileType tex inoremap ;bh b\textsuperscript{h}
-"autocmd FileType tex inoremap ;gh g\textsuperscript{h}
-"autocmd FileType tex inoremap ;gwh g\textsuperscript{hw}
-"autocmd FileType tex inoremap ;kw k\textsuperscript{w}
-"autocmd FileType tex inoremap ;gw g\textsuperscript{w}
-"autocmd FileType tex inoremap ;h1 {h\textsubscript{1}}
-"autocmd FileType tex inoremap ;h2 {h\textsubscript{2}}
-"autocmd FileType tex inoremap ;h3 {h\textsubscript{3}}
-"autocmd FileType tex inoremap ;h4 {h\textsubscript{4}}
-
-
"""PHP
-autocmd FileType php,html inoremap ;b <++>FbT>i
-autocmd FileType php,html inoremap ;i <++>FeT>i
-autocmd FileType php,html inoremap ;h1 <++>2kf<++>2kf<++>2kf
<++>02kf>a
-autocmd FileType php,html inoremap ;a href=""><++><++>14hi
-autocmd FileType php,html inoremap ;e target="_blank"href=""><++><++>14hi
-autocmd FileType php,html inoremap ;ul <++>03kfoF>a
-autocmd FileType php,html inoremap ;ol
<++>03kfclass="image">href="pix/<++>"> src="pix/<++>"width="<++>"> |
<++>4kf>a
-autocmd FileType php,html inoremap ;td | <++>Fdcit
-autocmd FileType php,html inoremap ;tr
<++>kf<++>Fhcit
-autocmd FileType php,html inoremap ;tab O
-autocmd FileType php,html inoremap ;gr F>a
-autocmd FileType php,html inoremap ;rd F>a
-autocmd FileType php,html inoremap ;yl F>a
-autocmd FileType php,html inoremap ;dt <++><++>2kcit
-autocmd FileType php,html inoremap ;dl
<++>3kcc
-"autocmd FileType php,html inoremap -- –
-"autocmd FileType php,html inoremap --- —
+ autocmd FileType php,html inoremap ;b <++>FbT>i
+ autocmd FileType php,html inoremap ;i <++>FeT>i
+ autocmd FileType php,html inoremap ;h1 <++>2kf<++>2kf<++>2kf<++>02kf>a
+ autocmd FileType php,html inoremap ;a href=""><++><++>14hi
+ autocmd FileType php,html inoremap ;e target="_blank"href=""><++><++>14hi
+ autocmd FileType php,html inoremap ;ul <++>03kfoF>a
+ autocmd FileType php,html inoremap ;ol
<++>03kfclass="image">href="pix/<++>"> src="pix/<++>"width="<++>"> |
<++>4kf>a
+ autocmd FileType php,html inoremap ;td | <++>Fdcit
+ autocmd FileType php,html inoremap ;tr
<++>kf<++>Fhcit
+ autocmd FileType php,html inoremap ;tab O
+ autocmd FileType php,html inoremap ;gr F>a
+ autocmd FileType php,html inoremap ;rd F>a
+ autocmd FileType php,html inoremap ;yl F>a
+ autocmd FileType php,html inoremap ;dt <++><++>2kcit
+ autocmd FileType php,html inoremap ;dl
<++>3kcc
+ "autocmd FileType php,html inoremap -- –
+ "autocmd FileType php,html inoremap --- —
""".bib
-autocmd FileType bib inoremap ;a @article{author="<++>",year="<++>",title="<++>",journal="<++>",volume="<++>",pages="<++>",}<++>8kA,i
-autocmd FileType bib inoremap ;b @book{author="<++>",year="<++>",title="<++>",publisher="<++>",}<++>6kA,i
-autocmd FileType bib inoremap ;c @incollection{author="<++>",title="<++>",booktitle="<++>",editor="<++>",year="<++>",publisher="<++>",}<++>8kA,i
+ autocmd FileType bib inoremap ;a @article{author="<++>",year="<++>",title="<++>",journal="<++>",volume="<++>",pages="<++>",}<++>8kA,i
+ autocmd FileType bib inoremap ;b @book{author="<++>",year="<++>",title="<++>",publisher="<++>",}<++>6kA,i
+ autocmd FileType bib inoremap ;c @incollection{author="<++>",title="<++>",booktitle="<++>",editor="<++>",year="<++>",publisher="<++>",}<++>8kA,i
"MARKDOWN
autocmd Filetype markdown,rmd inoremap ;n ---
@@ -215,14 +213,9 @@ autocmd FileType bib inoremap ;c @incollection{author="<++>
autocmd Filetype rmd inoremap ;r ```{r,echo=TRUE}```2kO
""".xml
-"autocmd FileType xml inoremap ;e - <++>:put=strftime('%c')A<++><++>
-autocmd FileType xml inoremap ;e - <++>:put=strftime('%c')A<++>]]>
5kcit
-autocmd FileType xml inoremap ;a <++><++>F"ci"
-
-"Insert the time:
- noremap ;time :put=strftime('%c')
- inoremap ;time :put=strftime('%c')
-
+ "autocmd FileType xml inoremap ;e - <++>:put=strftime('%c')A<++><++>
+ autocmd FileType xml inoremap ;e - <++>:put=strftime('%c')A<++>]]>
5kcit
+ autocmd FileType xml inoremap ;a <++><++>F"ci"
vmap ++ VMATH_YankAndAnalyse()
nmap ++ vip++
@@ -231,5 +224,3 @@ vnoremap K xkP`[V`]
vnoremap J xp`[V`]
vnoremap L >gv
vnoremap H