Skip to content

Instantly share code, notes, and snippets.

@thiagocaiubi
Created April 4, 2017 12:25
Show Gist options
  • Save thiagocaiubi/a3a309250c09192ca308baafe6472a7d to your computer and use it in GitHub Desktop.
Save thiagocaiubi/a3a309250c09192ca308baafe6472a7d to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
filetype off " required
" 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 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
" Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" 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/'}
" Avoid a name conflict with L9
" Plugin 'user/L9', {'name': 'newL9'}
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'fatih/vim-go'
Plugin 'scrooloose/syntastic'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'tpope/vim-fugitive'
" 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
" ctrlp
" only show files that are not ignored by git
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
set background=dark
" set encoding=utf8
" set expandtab
" set nowrap
set number
set ruler
" set shiftwidth=4
" set smartindent
" set tabstop=4
" syntax on
" syntax json files as javascript
" autocmd BufNewFile,BufRead *.json set ft=javascript
" syntax ejs files as html
" autocmd BufNewFile,BufRead *.ejs set ft=html
" replace multiple spaces by one space
autocmd BufWritePre * :%s/\s\+$//e
" dont use arrowkeys
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" really, just dont
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
" swapfiles location
set backupdir=/tmp//
set directory=/tmp//
" colors
" https://github.com/garybernhardt/dotfiles/blob/master/.vim/colors/ir_black.vim
" https://github.com/garybernhardt/dotfiles/blob/master/.vim/colors/grb256.vim
" colorscheme grb256
" colorscheme atom-dark-256
" highlight the 80th column
highlight ColorColumn ctermbg=233
let &colorcolumn="81,".join(range(121,999),",")
" NERDTree
noremap <c-\> :NERDTreeToggle<cr>
" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 1
let g:syntastic_javascript_checkers = ["jshint", "eslint"]
" Point syntastic checker at locally installed `eslint` if it exists.
if executable('node_modules/.bin/eslint')
let g:syntastic_javascript_eslint_exec = 'node_modules/.bin/eslint'
endif
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
" go
let g:go_fmt_command = "goimports"
let g:go_metalinter_autosave = 1
let g:go_list_type = "quickfix"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment