-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
100 lines (83 loc) · 2.31 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
set nocompatible " required
filetype off " required
" set vundle runtime path and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.Vim'
" other plugins come here
" file browser
Plugin 'scrooloose/nerdtree'
" work with rails
Plugin 'tpope/vim-rails'
" code completion
Plugin 'Valloric/YouCompleteMe'
" code snippets with snipmate
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
" extra snippets with vim-snippets
Plugin 'honza/vim-snippets'
" code commenting
Plugin 'tomtom/tcomment_vim'
" match braces
Plugin 'jiangmiao/auto-pairs'
" syntax checking with syntastic
Plugin 'vim-syntastic/syntastic'
" code search with silversearcher
Plugin 'mileszs/ack.vim'
" git integration
Plugin 'tpope/vim-fugitive'
" surround
Plugin 'tpope/vim-surround'
" dbml
" https://github.com/jidn/vim-dbml
Plugin 'jidn/vim-dbml'
" golang support
" Plugin 'fatih/vim-go'
"
" TODO: https://github.com/dense-analysis/ale
" TODO: https://github.com/justinmk/vim-sneak
call vundle#end() " required
filetype plugin indent on " required
syntax on
" non-plugin configs come after
"
" indentation, 2 spaces, tab to spaces
set tabstop=2
set shiftwidth=0 " defaults to tabstop
set expandtab
set smartindent
set autoindent
" show line numbers
set number
" highlight search
set hlsearch
" enable mouse
set mouse=a
" use system clipboard
set clipboard=unnamedplus
" show path of current file
set statusline+=%F
" snipmate mappings
" https://github.com/Valloric/YouCompleteMe/issues/47
:imap zz <esc>a<Plug>snipMateNextOrTrigger
:smap zz <Plug>snipMateNextOrTrigger
" nerdtree mappings
" https://medium.com/@todariasova/rails-vim-101-essential-vim-plugins-for-ruby-on-rails-development-d74e808d186d
:map <C-\> :NERDTreeToggle<CR>
" syntastic options
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_ruby_checkers = ['mri', 'rubocop']
let g:syntastic_ruby_rubocop_args = "--no-display-cop-names --parallel"
" use ag with ack.vim
if executable('ag')
let g:ackprg = "ag --nogroup --nocolor --column"
endif
let g:snipMate = { 'snippet_version' : 1 }