aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2021-10-20 03:43:42 -0400
committertdro <tdro@users.noreply.github.com>2021-10-20 03:43:42 -0400
commit537cc93fc967e18301126f0a19184c0e78728b38 (patch)
tree52c94d55f6bf331381242f0327b6d53199812567 /.vimrc
parentbd62f21ef5177163f99c4577187abec52dc789b7 (diff)
downloaddotfiles-537cc93fc967e18301126f0a19184c0e78728b38.tar.gz
dotfiles-537cc93fc967e18301126f0a19184c0e78728b38.tar.bz2
dotfiles-537cc93fc967e18301126f0a19184c0e78728b38.zip
.vimrc: Bring back nim for a few scripts
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index c22abeb..296c38f 100644
--- a/.vimrc
+++ b/.vimrc
@@ -308,6 +308,7 @@ augroup AutoCommands
autocmd FileType html autocmd! BufWritePost <buffer> exe 'Notify(''prettier --write --parser html ' . expand('%') . ' 2>&1'')' | :e
autocmd FileType python autocmd! BufWritePost <buffer> exe 'Notify(''black ' . expand('%') . ' 2>&1 && pylint ' . expand('%') . ' 2>&1'')' | :e
autocmd FileType ruby autocmd! BufWritePost <buffer> exe 'Notify(''rufo ' . expand('%') . ' 2>&1 && rubocop ' . expand('%') . ' 2>&1'')' | :e
+ autocmd FileType nim autocmd! BufWritePost <buffer> exe 'Notify(''nimpretty ' . expand('%') . ' 2>&1 && printf "Nim OK: ' . expand('%') . '"'')' | :e
autocmd FileType rust autocmd! BufWritePost <buffer> exe 'Notify(''rustfmt ' . expand('%') . ' 2>&1 && printf "rustfmt OK: ' . expand('%') . '"'')' | :e
autocmd FileType json autocmd! BufWritePost <buffer> exe 'Notify(''jsonlint -i ' . expand('%') . ' 2>&1 && printf "JSON OK: ' . expand('%') . '"'')' | :e
autocmd FileType elixir autocmd! BufWritePost <buffer> exe 'Notify(''mix format ' . expand('%') . ' 2>&1 && printf "Elixir Format OK: ' . expand('%') . '"'')' | :e
@@ -345,6 +346,9 @@ augroup AutoCommands
autocmd FileType nix set formatprg=nixfmt
autocmd FileType sh set formatprg=shfmt\ -
+ " Set file types.
+ 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'')'