Skip to content

Instantly share code, notes, and snippets.

@piatra
Last active August 29, 2015 14:04
Show Gist options
  • Save piatra/69a81f971712631a206f to your computer and use it in GitHub Desktop.
Save piatra/69a81f971712631a206f to your computer and use it in GitHub Desktop.
vim setup
YouCompleteMe
Zenburn
ctrlp.vim
detectindent
easybuffer.vim
nerdcommenter
nerdtree
python-mode
rust.vim
syntastic
tern_for_vim
vim-bad-whitespace
vim-javascript
vim-jsx
vim-less
vim-lucius
let g:pathogen_disabled = []
if has("gui")
" You complete me ! <3
let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py"
nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
else
call add(g:pathogen_disabled, 'YouCompleteMe')
endif
execute pathogen#infect()
syntax on
set hls
filetype plugin indent on
" show line number
" set nu
" spacing
set ts=2
set sw=2
" set leader
let mapleader = ","
" colorscheme
colorscheme zenburn
" sane search
set smartcase
set incsearch
"""" Mappings
" easy buffer
map <Leader>b :EasyBuffer<CR>
" nerdtree
map <Leader>n :NERDTree<CR>
" only
map <Leader>o :only<CR>
" show line @ 80 chars
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
if exists('+colorcolumn')
set colorcolumn=80
else
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
endif
" jsx syntax
let g:jsCommand='node'
" fuzzy find
let g:ctrlp_working_path_mode = 'a'
nmap ,p :CtrlP<CR>
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
set wildignore+=*/node_modules/*
" spacing
set tabstop=2
set shiftwidth=2
set expandtab
filetype plugin indent on
set guifont=Source\ Code\ Pro:h16
let g:ycm_add_preview_to_completeopt=0
let g:ycm_confirm_extra_conf=0
set completeopt-=preview
filetype plugin on
set omnifunc=syntaxcomplete#Complete
let g:syntastic_javascript_checkers = ['jsxhint']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment