diff options
author | tdro <tdro@users.noreply.github.com> | 2021-11-04 00:28:17 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2021-11-04 00:46:01 -0400 |
commit | 14b56c5e36125e0de7afb9a321bbba10a8662587 (patch) | |
tree | e9bfb62ab330636240baa7412ae20f392a168807 | |
parent | f71472fccc6fa894ec1be945614d6baf4f40d56c (diff) | |
download | dotfiles-14b56c5e36125e0de7afb9a321bbba10a8662587.tar.gz dotfiles-14b56c5e36125e0de7afb9a321bbba10a8662587.tar.bz2 dotfiles-14b56c5e36125e0de7afb9a321bbba10a8662587.zip |
.vimrc: Bring back latexindent
-rw-r--r-- | .config/latexindent/settings.yaml | 11 | ||||
-rwxr-xr-x | .local/bin/latexindent | 2 | ||||
-rw-r--r-- | .vimrc | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/.config/latexindent/settings.yaml b/.config/latexindent/settings.yaml new file mode 100644 index 0000000..febe0a7 --- /dev/null +++ b/.config/latexindent/settings.yaml @@ -0,0 +1,11 @@ +--- +# Default: https://raw.githubusercontent.com/cmhughes/latexindent.pl/main/defaultSettings.yaml +onlyOneBackUp: 1 +backupExtension: .backup.tex +logFilePreferences: + endLogFileWith: '--------------' + showAmalgamatedSettings: 0 + showDecorationFinishCodeBlockTrace: 0 + showDecorationStartCodeBlockTrace: 0 + showEveryYamlRead: 0 + showGitHubInfoFooter: 0 diff --git a/.local/bin/latexindent b/.local/bin/latexindent new file mode 100755 index 0000000..09b9750 --- /dev/null +++ b/.local/bin/latexindent @@ -0,0 +1,2 @@ +#!/bin/sh -eu +$(which latexindent --all | grep --invert-match "local/bin" | head -n 1) --local="$HOME/.config/latexindent/settings.yaml" "$@"; @@ -315,6 +315,7 @@ augroup AutoCommands autocmd FileType haskell autocmd! BufWritePost <buffer> exe 'Notify(''hlint ' . expand('%') . ' 2>&1 && brittany --write-mode inplace ' . expand('%') . ' 2>&1'')' | :e autocmd FileType c autocmd! BufWritePost <buffer> exe 'Notify(''clang-format -i ' . expand('%') . ' 2>&1 && printf "Clang Format OK: ' . expand('%') . '"'')' | :e autocmd FileType bash,sh autocmd! BufWritePost <buffer> exe 'Notify(''shellcheck -x --exclude=SC1090,SC1091 ' . expand('%') . ' 2>&1 && printf "Shellcheck OK: ' . expand('%') . '"'')' + autocmd FileType tex autocmd! BufWritePost <buffer> exe 'Notify(''latexindent --silent --cruft=/tmp --overwrite ' . expand('%') . ' 2>&1 && printf "LaTeX OK: ' . expand('%') . '"'')' | :e | :only | :term ++close ++rows=10 latex-compile % autocmd FileType javascript autocmd! BufWritePost <buffer> exe 'Notify(''eslint -c $HOME/.config/eslintrc.yml --fix ' . expand('%') . ' 2>&1 && printf "JavaScript OK: '. expand('%') . '"'')' | :e autocmd FileType go autocmd! BufWritePost <buffer> exe 'Notify(''gofmt -w -s -e ' . expand('%') . ' 2>&1 && go vet ' . expand('%') . ' 2>&1 && printf "Go Format OK: ' . expand('%') . '"'')' | :e autocmd FileType nix autocmd! BufWritePost <buffer> exe 'Notify(''nix-linter ' . expand('%') . ' 2>&1 && printf "Nix Lint OK: ' . expand('%') . '"' . ' && nixfmt ' . expand('%') . ' 2>&1' . ''')' | :e @@ -350,7 +351,6 @@ augroup AutoCommands autocmd BufRead,BufNewFile *.nims set filetype=nim " General auto commands. - autocmd BufWritePost *.tex :term ++close ++rows=10 latex-compile % autocmd BufWritePost $HOME/.config/chromexup/config.ini exe 'Notify(''chromexup 2>&1'')' autocmd BufWritePost rc.lua exe 'Notify(''awesome -k 2>&1'')' autocmd BufWritePost quotes,*.fortune exe 'Notify(''strfile ' . expand('%') . ''')' |