From bd44f769e1902dca82b2c2e90825d5b0f4ab4411 Mon Sep 17 00:00:00 2001 From: tdro Date: Thu, 3 Dec 2020 02:08:50 -0500 Subject: .vimrc: Add clang tools --- .vimrc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index fce994c..8e50b47 100644 --- a/.vimrc +++ b/.vimrc @@ -62,20 +62,19 @@ set encoding=utf-8 " Set UTF-8 encoding. set scrolloff=3 " Set vertical scroll headroom. set sidescroll=3 " Set horizontal column scroll. set sidescrolloff=10 " Set horizontal scroll headroom. +set foldcolumn=2 " Set fold column width to 2. " Convert tab to spaces. set tabstop=2 softtabstop=0 shiftwidth=2 smarttab expandtab let php_sql_query = 1 " Highlight SQL in PHP. let php_htmlInStrings = 1 " Highlight HTML in PHP. - let g:javascript_plugin_jsdoc = 1 " Highlight JavaScript. "----------------Visuals----------------" colorscheme fluid " Set color scheme. - set guioptions-=l " Remove left scrollbar in GUI. set guioptions-=L " Remove left scrollbar in GUI vertical split. set guioptions-=r " Remove right scrollbar in GUI. @@ -84,8 +83,6 @@ set guioptions-=m " Remove menu in GUI. set guioptions-=T " Remove toolbar in GUI. set guioptions-=e " Remove tab bar in GUI. -set foldcolumn=2 " Set fold column width to 2. - "---------------Functions---------------" @@ -326,6 +323,7 @@ augroup AutoCommands autocmd FileType nix autocmd! BufWritePost silent call NixCheck() autocmd FileType elixir autocmd! BufWritePost :call ElixirFormat() autocmd FileType rust autocmd! BufWritePost silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)" + autocmd FileType c autocmd! BufWritePost silent !notify-send "$(clang-format -i % 2>&1 && echo 'clang-format OK:' %)" autocmd FileType go autocmd! BufWritePost silent !notify-send "$(gofmt -w -s -e % 2>&1 && go vet % 2>&1 && echo 'gofmt OK:' %)" autocmd FileType awk autocmd! BufWritePost silent !notify-send "$(awk -g -f % 2>&1 && awk -o- -f % | sponge % && echo 'awk OK:' %)" -- cgit v1.2.3