Initial configuration commit

This commit is contained in:
Alex Selimov 2023-10-24 22:54:55 -04:00
commit 31c8abea59
266 changed files with 780274 additions and 0 deletions

8
ftplugin/' Normal file
View file

@ -0,0 +1,8 @@
set spell spelllang=en_us
map <C-b> : w % <Bar> ! md2pdf % <CR>
map <A-b> : w % <Bar> ! md2docx % <CR>
map <C-z> : !zathura %:r.pdf & <CR>
inoremap ;i ** <++><Esc>5hi
inoremap ;b **** <++><Esc>6hi
inoremap ;I ![](<++>)<Esc>6hi
inoremap ;c ```<CR>```<Esc>Oi

1
ftplugin/cpp.vim Normal file
View file

@ -0,0 +1 @@
map <C-b> : w % <Bar> ! make <CR>

13
ftplugin/fortran.vim Normal file
View file

@ -0,0 +1,13 @@
map <C-b> : w % <Bar> ! make <CR>
"Some code snippets for filling in
inoremap ;d do<Space><CR>end<Space>do<Esc>O<Tab><++><Esc>kA
inoremap ;i if<Space>()<Space>then<CR>end<Space>if<Esc>O<Tab><++><Esc>kF(a
inoremap ;s select<Space>case(<++>)<CR>case(<++>)<CR><Tab><++><CR><Esc>4hicase(<++>)<CR><Tab><++><CR><Esc>4hiend<Space>select<CR><Esc>5kFsi
inoremap ;ph print *, '------------------------------------------------------------'<CR>print *, ''<CR>print *, '------------------------------------------------------------'<Esc>kci'
inoremap ;pr read(, *, iostat=iospara) <++><CR>if(iospara>0) then<CR>print *, "Error: Invalid read of <++> with error code", iospara<CR>call mpi_abort(mpi_comm_world, 1, ierr)<CR>end if<ESC>4k0f(a
inoremap ;ptp print *, '[OK] - '<ESC>i
inoremap ;ptf print *, '[FAILED] - '<ESC>i
set colorcolumn=132

12
ftplugin/html.vim Normal file
View file

@ -0,0 +1,12 @@
if &ft=="markdown"
finish
endif
map <C-b> : w % <Bar> ! firefox % & <CR>
inoremap ;d <div class="" ><Return><++><Return></div><Esc>kkf"a
inoremap ;a <a href=""><++></a><Esc>2F"a
inoremap ;p <p><Return></p><Esc>O
inoremap ;b <strong></strong> <++><Esc>2F>a
inoremap ;li <li></li><Esc>F>a
inoremap ;ll <ul><Return></ul><Esc>O
inoremap ;i <img src="" alt="<++>" width="<++>" height=auto><Esc>5F"i
inoremap ;s <body><Enter><div class="container"><Enter></div><Enter></body><Esc>kO

1
ftplugin/mail.viim Normal file
View file

@ -0,0 +1 @@
set textwidth=0

19
ftplugin/markdown.vim Normal file
View file

@ -0,0 +1,19 @@
set spell spellfile="~/.config/nvim/spell/wordlist"
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'fortran']
"set conceallevel=2
"let g:vim_markdown_math = 1
"let g:tex_conceal = "abdmg"
hi clear Conceal
map <C-b> : w % <Bar> AsyncRun md2pdf "%" <CR>
map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR>
map <A-b> : w % <Bar> AsyncRun md2docx % <CR>
map <C-z> : !zathura %:r.pdf & <CR>
inoremap ;i ** <++><Esc>5hi
inoremap ;b **** <++><Esc>6hi
inoremap ;l [](<++>)<Esc>6hi
inoremap ;I ![](<++>)<Esc>6hi
inoremap ;pc ```<CR>```<Esc>O
inoremap ;cu - [ ]
inoremap ;cc - [x]

2
ftplugin/python.vim Normal file
View file

@ -0,0 +1,2 @@
set colorcolumn=100
nmap ;x [hv]h]hk$;sc

7
ftplugin/sh.vim Normal file
View file

@ -0,0 +1,7 @@
map <C-b> : w % <Bar> ! ./% <CR>
inoremap ;ph ####<CR>#Help<CR>####<CR>Help(){<CR>echo ""<CR>echo<CR>echo "Syntax: <++> [<++>] <++>"<CR>echo "options:"<CR>echo "<++>"<CR><BACKSPACE>}<ESC>5k0f"a
inoremap ;pf function fail {<CR>printf '%s\n' "$1" >&2<CR>exit "${2-1}"<CR>}
inoremap ;i if [ ]; then<CR><++><CR>fi<ESC>2k0f[a<Space>
inoremap ;pg args=()<CR>argnum=0<CR>while [ $# -gt 0 ]; do<CR>unset OPTIND<CR>unset OPTARG<CR>#Parse Flags<CR>while getopts 'h' options; do <CR>case $options in<CR>h)<CR>Help<CR>break;;<CR><++>)<CR><++>;;<CR>esac<CR>done<CR>shift $((OPTIND-1))<CR>args+=("$1")<CR> (( argnum++ ))<CR>shift<CR>done<ESC>13kf'la
inoremap ;pf ####<CR>#Error<CR>####<CR>function fail {<CR>printf '%s\n' "$1" >&2<CR>exit "${2-1}"<CR>}<CR>

19
ftplugin/tex.vim Normal file
View file

@ -0,0 +1,19 @@
set spell
set spelllang=en_us
map <C-b> : w % <Bar> make! <CR>
map <C-z> : !make read & <CR>
inoremap ;f \begin{figure}<Enter>\centering<Enter>\includegraphics[]{<++>}<Enter>\caption{<++>}<Enter>\end{figure}<Esc>2kf[a
inoremap ;2f \begin{figure}<CR>\centering<CR>\begin{subfigure}[t]{0.49\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.49\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\end{figure}<Esc>8k/<++><Enter>"_c4l
inoremap ;3f \begin{figure}<CR>\centering<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\end{figure}<Esc>13k/<++><Enter>"_c4l
inoremap ;F \begin{frame}{<++>}<Enter>\end{frame}<Esc>O<++><Esc>-i
inoremap ;b \textbf{} <++><Esc>F{a
inoremap ;c \caption{}<Esc>i
inoremap ;C \begin{columns}<Enter>\column{0.49\textwidth}<Enter>\column{0.49\textwidth}<Enter><++><Enter>\end{columns}<Esc>2kO
inoremap ;ig \includegraphics[width=\textwidth]{<++>}<Esc>16hi
inoremap ;li \begin{itemize}<Enter>\item<Enter>\end{itemize}<Esc>kA
inoremap ;le \begin{enumerate}<Enter>\item<Enter>\end{enumerate}<Esc>kA
inoremap ;ll \item<Space>
inoremap ;2t \begin{table}[h!]<Enter>\begin{center}<Enter>\begin{tabular}{c c}<Enter> \toprule<Enter>\textbf{} & \textbf{<++>} \\<Enter>\midrule<Enter><++> & <++> \\<Enter>\bottomrule<Enter>\end{tabular}<Enter>\end{center}<Enter>\end{table}<Esc>6kf{a
inoremap ;e \begin{equation}<Enter>\label{<++>}<Enter>\end{equation}<ESC>kO
inoremap ;fw width=\textwidth<Esc>F\i
inoremap ;fh height=\textheight<Esc>F\i