aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vimrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/vimrc b/vimrc
index c364aae..d47e7ae 100644
--- a/vimrc
+++ b/vimrc
@@ -2,7 +2,7 @@ set nocompatible
2set number relativenumber autoindent 2set number relativenumber autoindent
3set ignorecase smartcase incsearch 3set ignorecase smartcase incsearch
4set hidden nowrap nobackup noswapfile autoread 4set hidden nowrap nobackup noswapfile autoread
5set wildmenu laststatus=2 5set wildmenu wildmode=longest,list,full laststatus=2
6set encoding=utf8 spelllang=en_us 6set encoding=utf8 spelllang=en_us
7set backspace=2 scrolloff=4 7set backspace=2 scrolloff=4
8set shiftwidth=4 tabstop=4 8set shiftwidth=4 tabstop=4
@@ -37,8 +37,8 @@ autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth
37 37
38" Function to auto format source code files. 38" Function to auto format source code files.
39function! Format() 39function! Format()
40 if &filetype == 'c' | call system('clang-format -i '.expand('%')) | edit! | endif 40 if &filetype == 'c' | write | call system('clang-format -i '.expand('%')) | edit! | endif
41 if &filetype == 'go' | call system('go fmt '.expand('%')) | edit! | endif 41 if &filetype == 'go' | write | call system('go fmt '.expand('%')) | edit! | endif
42endfunction 42endfunction
43command! Format call Format() 43command! Format call Format()
44 44