From 28c2be1a35d9e3fc17febbd452cfa9ff6d723c88 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Thu, 7 Mar 2013 12:45:17 -0800 Subject: [PATCH] Update vim settings --- vim/ftplugin/go.vim | 6 ++++++ vimrc | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 vim/ftplugin/go.vim diff --git a/vim/ftplugin/go.vim b/vim/ftplugin/go.vim new file mode 100644 index 0000000..3265d14 --- /dev/null +++ b/vim/ftplugin/go.vim @@ -0,0 +1,6 @@ + +set noexpandtab " noexpandtab keeps tabs +set shiftwidth=4 " unify +set softtabstop=4 " Pressing backspace works like tabs +set tabstop=4 + diff --git a/vimrc b/vimrc index 884d2f3..19ef00d 100644 --- a/vimrc +++ b/vimrc @@ -55,10 +55,11 @@ let NERDTreeDirArrows=1 " Prep some variables for use with syntastic syntax checker let g:syntastic_phpcs_disable=1 -let g:syntastic_auto_loc_list=0 +let g:syntastic_auto_loc_list=1 let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' let g:syntastic_javascript_checker = "jshint" let g:syntastic_jslint_conf = "~/.jshintrc" +let g:syntastic_json_checker = "jsonlint" " Close all open buffers on entering a window if the only " buffer that's left is the NERDTree buffer @@ -120,7 +121,7 @@ set incsearch " BUT do highlight as you type you search phrase set scrolloff=5 " Keep 5 lines (top/bottom) for scope set sidescrolloff=5 " Keep 5 lines at the size set list " we do what to show tabs, to ensure we get them out of my files -set listchars=tab:▹\ ,trail:… " show tabs and trailing whitespace +set listchars=tab:𝅔\ ,trail:… " show tabs and trailing whitespace " ~\file[+] [type] [line,column] [number of lines] set statusline=%F%m%r%h%w\ [%Y]\ [%03l,%03v]\ [%L] @@ -138,6 +139,8 @@ set completeopt=menu,longest,preview " improve the way autocomplete works autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft() +autocmd FileType go autocmd BufWritePre Fmt + augroup json au! BufRead,BufNewFile *.json set syntax=javascript augroup END @@ -160,6 +163,8 @@ augroup END augroup mustache au! BufRead,BufNewFile *.mustache set filetype=mustache + au! BufRead,BufNewFile *.mu set filetype=mustache + au! BufRead,BufNewFile *.hjs set filetype=mustache augroup END augroup coffee