Created
March 22, 2016 20:19
-
-
Save jcmartins/ea80c6929e260fc619d4 to your computer and use it in GitHub Desktop.
vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
filetype plugin indent on | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
" The sparkup vim script is in a subdirectory of this repo called vim. | |
" Pass the path to set the runtimepath properly. | |
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
Plugin 'tpope/vim-sensible' | |
Plugin 'tpope/vim-surround' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'tpope/vim-rails' | |
Plugin 'tpope/vim-rake' | |
Plugin 'Lokaltog/vim-powerline' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'SirVer/ultisnips' | |
Plugin 'honza/vim-snippets' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'nsf/gocode', {'rtp': 'vim/'} | |
Plugin 'garyburd/go-explorer' | |
Plugin 'fatih/vim-go' | |
Plugin 'fatih/molokai' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'airblade/vim-gitgutter' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
"let g:molokai_original = 1 | |
let g:rehash256 = 1 | |
"color molokai | |
color bvemu | |
"color jellybeans | |
" Show some extra information. | |
set splitright | |
set ruler | |
set magic | |
set showcmd | |
set showmode | |
set showmatch | |
set incsearch | |
set laststatus=2 | |
set report=0 | |
" Colors, syntax and search highlight. | |
syntax on | |
set hlsearch | |
set t_Co=256 | |
hi Comment term=bold ctermfg=White | |
hi Search term=bold ctermfg=Black ctermbg=DarkYellow | |
" Highlight cursor line. | |
set cursorline | |
hi CursorLine cterm=NONE ctermbg=DarkGrey | |
" Highlight overlength lines. | |
if exists('+colorcolumn') | |
set colorcolumn=140 | |
hi ColorColumn ctermbg=DarkGrey | |
else | |
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) | |
endif | |
" Highlight trailing whitespace. | |
highlight WhitespaceEOL ctermbg=DarkRed | |
match WhitespaceEOL /\s\+$/ | |
" Automatic formatting | |
autocmd BufWritePre *.rb :%s/\s\+$//e | |
autocmd BufWritePre *.go :%s/\s\+$//e | |
autocmd BufWritePre *.html :%s/\s\+$//e | |
au BufNewFile * set noeol | |
au BufRead,BufNewFile *.go set filetype=go | |
" NERDTree | |
nmap <leader>n :NERDTreeToggle<CR> | |
let NERDTreeHighlightCursorline=1 | |
let NERDTreeIgnore = ['tmp', '.yardoc', 'pkg'] | |
" | |
" Vim-go | |
au FileType go nmap <leader>r <Plug>(go-run) | |
au FileType go nmap <leader>b <Plug>(go-build) | |
au FileType go nmap <leader>t <Plug>(go-test) | |
au FileType go nmap <leader>c <Plug>(go-coverage) | |
au FileType go nmap <Leader>ds <Plug>(go-def-split) | |
au FileType go nmap <Leader>dv <Plug>(go-def-vertical) | |
au FileType go nmap <Leader>dt <Plug>(go-def-tab) | |
au FileType go nmap <Leader>gb <Plug>(go-doc-browser) | |
au FileType go nmap <Leader>s <Plug>(go-implements) | |
" Vim-Go settings | |
let g:go_highlight_functions = 1 | |
let g:go_highlight_methods = 1 | |
let g:go_highlight_structs = 1 | |
let g:go_highlight_operators = 1 | |
let g:go_highlight_build_constraints = 1 | |
" vim tagbar | |
let g:tagbar_type_go = { | |
\ 'ctagstype' : 'go', | |
\ 'kinds' : [ | |
\ 'p:package', | |
\ 'i:imports:1', | |
\ 'c:constants', | |
\ 'v:variables', | |
\ 't:types', | |
\ 'n:interfaces', | |
\ 'w:fields', | |
\ 'e:embedded', | |
\ 'm:methods', | |
\ 'r:constructor', | |
\ 'f:functions' | |
\ ], | |
\ 'sro' : '.', | |
\ 'kind2scope' : { | |
\ 't' : 'ctype', | |
\ 'n' : 'ntype' | |
\ }, | |
\ 'scope2kind' : { | |
\ 'ctype' : 't', | |
\ 'ntype' : 'n' | |
\ }, | |
\ 'ctagsbin' : 'gotags', | |
\ 'ctagsargs' : '-sort -silent' | |
\ } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment