From fc53d9806c8fe318f2e308263b0b3da2eb45d92d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 13 Dec 2016 11:19:49 -0800 Subject: [vim] a few more changes --- vimrc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 382b5be..77907cb 100644 --- a/vimrc +++ b/vimrc @@ -1,14 +1,17 @@ +set nocompatible setlocal spell spelllang=en_us syn off +filetype plugin indent on set autoindent set autowrite -set expandtab +set expandtab " expand tabs by default (overloadable per file type later) set ignorecase +set incsearch set list -set listchars=tab:>-,trail:~,extends:>,precedes:< -set nohls +set listchars=tab:>\ ,trail:~,extends:>,precedes:< +set hls set nospell set ruler set viminfo="" @@ -16,6 +19,11 @@ set viminfo="" set shiftwidth=2 set smarttab set tabstop=2 +set softtabstop=4 " when hitting , pretend like a tab is removed, even if spaces +set shiftround " use multiple of shiftwidth when indenting with '<' and '>' + +set wildmenu +set wildmode=longest:full,full set nobackup " Don't create annoying backup files set noswapfile " Don't use swapfile @@ -29,5 +37,20 @@ set encoding=utf-8 " Set default encoding to UTF-8 set winminheight=0 " minimize split window +set tags=tags;/ " try to find the tags file in the path + +" makefile +autocmd FileType make setlocal noexpandtab tabstop=4 shiftwidth=4 + +" ruby +autocmd FileType ruby setllocal expandtab stabstop=2 hiftwidth=2 softtabstop=2 + +" golang +autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 +autocmd BufWritePost *.go :silent !gofmt -w % + +" python indent +autocmd FileType python setlocal tabstop=2 softtabstop=2 shiftwidth=2 textwidth=100 smarttab expandtab autoindent -au BufNewFile,BufRead *.go setlocal noet ts=4 sw=4 sts=4 +set laststatus=2 +set statusline=%<%f\ %h%w%m%r%y%=L:%l/%L\ (%p%%)\ C:%c%V\ B:%o -- cgit 1.4.1