diff --git a/.config/i3/config b/.config/i3/config index d723776..194d864 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -1,4 +1,10 @@ # vim: filetype=i3 +# _ _ ____ _ _ _ _ _ _____ ____ __ _ +# | | _ _| | _____ / ___| _ __ ___ (_) |_| |__ ( )___ (_)___ / / ___|___ _ __ / _(_) __ _ +# | | | | | | |/ / _ \ \___ \| '_ ` _ \| | __| '_ \|// __| | | |_ \ | | / _ \| '_ \| |_| |/ _` | +# | |__| |_| | < __/ ___) | | | | | | | |_| | | | \__ \ | |___) | | |__| (_) | | | | _| | (_| | +# |_____\__,_|_|\_\___| |____/|_| |_| |_|_|\__|_| |_| |___/ |_|____/ \____\___/|_| |_|_| |_|\__, | + # |___/ # This is Luke Smith's i3-gaps configuration file. # Me: http://lukesmith.xyz @@ -219,7 +225,7 @@ for_window [title="video0 - mpv"] floating enable for_window [title="video0 - mpv"] sticky enable bindsym $mod+c exec --no-startup-id mpv --geometry=-0-0 --autofit=30% /dev/video0 -bindsym $mod+Shift+c exec killall mpv /dev/video0 +bindsym $mod+Shift+c exec pkill -f dev/video bindsym $mod+v exec $term -e ncmpcpp -s visualizer bindsym $mod+Shift+v exec projectM-pulseaudio diff --git a/.vimrc b/.vimrc index d742574..8d3528d 100644 --- a/.vimrc +++ b/.vimrc @@ -15,13 +15,35 @@ "colorscheme wal set encoding=utf-8 set number - "set relativenumber + set relativenumber + +" Splits open at the bottom and right, which is non-retarded, unlike vim defaults. + set splitbelow + set splitright + +" Shortcutting split navigation, saving a keypress: + map h + map j + map k + map l + +" Replace all is aliased to S. + nnoremap S :%s//g + +" Open my bibliography file in split + map :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 "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 +" Interpret .md files, etc. as .markdown + let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} " Make calcurse notes markdown compatible: autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown @@ -33,13 +55,19 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd so ~/.vim/luke/deadkeys.vim nm :call ToggleDeadKeys() +" Source my IPA shorcuts: + map i :so ~/.vim/luke/ipa.vim + +" 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 + " Goyo plugin makes text more readable when writing prose: map :Goyo inoremap :Goyoa -" 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 @@ -59,12 +87,6 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd " Runs a script that cleans out tex build files whenever I close out of a .tex file. autocmd VimLeave *.tex !texclear -" Use urlview to choose and open a url: - :noremap u :wsilent !urlview - -"Copy selected text to system clipboard (requires gvim installed): - vnoremap "+y - " Disables automatic commenting on newline: autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o @@ -81,17 +103,13 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd inoremap jw inoremap wj -"Shortcutting split navigation, saving a keypress: - map h - map j - map k - map l -"Replace all is aliased to S. Visual mode shortcut doesn't work yet for some -"reason... - nnoremap S :%s//g - vnoremap S noop - vnoremap S :s//g + "____ _ _ +"/ ___| _ __ (_)_ __ _ __ ___| |_ ___ +"\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __| + "___) | | | | | |_) | |_) | __/ |_\__ \ +"|____/|_| |_|_| .__/| .__/ \___|\__|___/ + "|_| |_| """LATEX " Word count: @@ -165,7 +183,7 @@ 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 -"""PHP +"""PHP/HTML autocmd FileType php,html inoremap ;b <++>FbT>i autocmd FileType php,html inoremap ;i <++>FeT>i autocmd FileType php,html inoremap ;h1

<++>2kfauthor="<++>",title="<++>",booktitle="<++>",editor="<++>",year="<++>",publisher="<++>",}<++>8kA,i "MARKDOWN + autocmd Filetype markdown,rmd map w yiWi[Ea](pa) autocmd Filetype markdown,rmd inoremap ;n --- autocmd Filetype markdown,rmd inoremap ;b ****<++>F*hi autocmd Filetype markdown,rmd inoremap ;s ~~~~<++>F~hi @@ -210,7 +229,8 @@ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markd autocmd Filetype markdown,rmd inoremap ;l -------- autocmd Filetype markdown map :!pandoc%-o%.pdf autocmd Filetype rmd map :!echo"require(rmarkdown);render('%')"\|R--vanilla - autocmd Filetype rmd inoremap ;r ```{r,echo=TRUE}```2kO + autocmd Filetype rmd inoremap ;r ```{r}```2kO + autocmd Filetype rmd inoremap ;p ```{python}```2kO """.xml "autocmd FileType xml inoremap ;e <++>:put=strftime('%c')A<++><++>