diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-06-20 02:45:09 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-06-20 02:45:09 +0200 |
| commit | 382295fe653fa9937c4cd66350f718ee072bb93d (patch) | |
| tree | 76fb9709949407463d035de659d3ee67e3bf30cd /vimrc | |
| parent | 7a3bfe8eb2ab27856b8dd62656047ccdf117a1a6 (diff) | |
| download | dotfiles-382295fe653fa9937c4cd66350f718ee072bb93d.tar.gz | |
Update vimrc
Diffstat (limited to 'vimrc')
| -rw-r--r-- | vimrc | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -2,7 +2,7 @@ set nocompatible | |||
| 2 | set number relativenumber autoindent | 2 | set number relativenumber autoindent |
| 3 | set ignorecase smartcase incsearch | 3 | set ignorecase smartcase incsearch |
| 4 | set hidden nowrap nobackup noswapfile autoread | 4 | set hidden nowrap nobackup noswapfile autoread |
| 5 | set wildmenu laststatus=2 | 5 | set wildmenu wildmode=longest,list,full laststatus=2 |
| 6 | set encoding=utf8 spelllang=en_us | 6 | set encoding=utf8 spelllang=en_us |
| 7 | set backspace=2 scrolloff=4 | 7 | set backspace=2 scrolloff=4 |
| 8 | set shiftwidth=4 tabstop=4 | 8 | set 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. |
| 39 | function! Format() | 39 | function! 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 |
| 42 | endfunction | 42 | endfunction |
| 43 | command! Format call Format() | 43 | command! Format call Format() |
| 44 | 44 | ||
