Update to homework function and lisp formatting

This commit is contained in:
Wryn Wagner 2019-06-26 11:37:29 -06:00
parent feb68b143f
commit feb280c794
2 changed files with 10 additions and 1 deletions

10
bashrc
View File

@ -24,4 +24,12 @@ function notes() { NOTE="$NOTE_PATH/$1$NOTE_EXTENSION"; [ -f $NOTE ] && vim $NOT
# --- Homework facilitated ------------------------------------
HW_TEMPLATE="$RC_DIR/latex/homework_template.tex"
function hw() { [ $# -ne 0 ] && cp $HW_TEMPLATE ./$1.tex || echo "Homework filename required"; }
function hw() {
[ $# -ne 0 ] \
&& NEW_HW="./$1.tex" \
|| echo "Homework filename required" \
&& return;
[ ! -f $NEW_HW ] && cp $HW_TEMPLATE $NEW_HW;
vim $NEW_HW || echo "Something went wrong :c";
}

1
vimrc
View File

@ -40,6 +40,7 @@ augroup filetype_specific_formatting
autocmd FileType javascript setlocal tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab foldmethod=indent foldlevel=99
autocmd FileType vim setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=marker foldlevel=1
autocmd FileType sh setlocal tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab foldmethod=indent foldlevel=99
autocmd FileType lisp setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab foldmethod=manual foldlevel=99
augroup END
" }}}