diff options
author | tdro <tdro@users.noreply.github.com> | 2021-03-25 03:47:15 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2021-03-25 03:47:15 -0400 |
commit | 0e63547d8f3a264a417cf51f5fbc628285762e29 (patch) | |
tree | 4a638c8c01768c8ae9fec63a4e54a14012812d4f /.vimrc | |
parent | 224c14ecb5eadc3b91eca9422f4fbc7725ae9027 (diff) | |
download | dotfiles-0e63547d8f3a264a417cf51f5fbc628285762e29.tar.gz dotfiles-0e63547d8f3a264a417cf51f5fbc628285762e29.tar.bz2 dotfiles-0e63547d8f3a264a417cf51f5fbc628285762e29.zip |
.config/nixpkgs: Add lit and shfmt
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -285,9 +285,10 @@ augroup AutoCommands autocmd BufWritePost plugins.vim source % | silent exe '!' . expand(g:notify) . ' ' . '''Sourcing plugins...''' " Linting extension post write commands. - autocmd BufWritePost *.php :call PHPFix() - autocmd BufWritePost *.js :call ESLintFix() + autocmd BufWritePost *.php :call PHPFix() + autocmd BufWritePost *.js :call ESLintFix() autocmd BufWritePost *.txt,*.md :only | :term ++rows=10 vale-wrapper % + autocmd BufWritePost *.lit silent exe '!' . expand(g:notify) . ' ' . '"$(lit % 2>&1 && printf ''Literate OK: %'')"' " Linting file type post write commands. autocmd FileType css autocmd! BufWritePost <buffer> silent exe '!' . expand(g:notify) . ' ' . '"$(prettier --write --parser css % 2>&1)"' @@ -322,6 +323,10 @@ augroup AutoCommands autocmd FileType javascript noremap <buffer> <leader>cc :REPL node<cr> autocmd FileType awk noremap <buffer> <leader>cc :term ++rows=10 ++close awk -f %<cr> + " Formatting programs. + autocmd FileType nix set formatprg=nixfmt + autocmd FileType sh set formatprg=shfmt\ - + " General auto commands. autocmd BufWritePost *.tex :term ++close ++rows=10 latex-compile % autocmd BufWritePost quotes,*.fortune silent exe '!' . expand(g:notify) . ' ' . '"$(strfile %)"' |