Update to homework function and lisp formatting
This commit is contained in:
parent
feb68b143f
commit
feb280c794
10
bashrc
10
bashrc
@ -24,4 +24,12 @@ function notes() { NOTE="$NOTE_PATH/$1$NOTE_EXTENSION"; [ -f $NOTE ] && vim $NOT
|
|||||||
|
|
||||||
# --- Homework facilitated ------------------------------------
|
# --- Homework facilitated ------------------------------------
|
||||||
HW_TEMPLATE="$RC_DIR/latex/homework_template.tex"
|
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
1
vimrc
@ -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 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 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 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
|
augroup END
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user