-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
190 lines (136 loc) · 4.44 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
"====[ Vundle ]====
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"====[ Vundle Plugins ]====
"Plugin 'L9'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
Plugin 'othree/html5.vim'
"Plugin 'nathanaelkane/vim-indent-guides'
"Plugin 'sjl/gundo.vim'
Plugin 'tpope/vim-dispatch'
Plugin 'tpope/vim-projectionist'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-surround'
"Plugin 'tpope/vim-ragtag'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-unimpaired'
"Plugin 'MarcWeber/vim-addon-mw-utils'
"Plugin 'tomtom/tlib_vim'
"Plugin 'garbas/vim-snipmate'
"Plugin 'honza/vim-snippets'
Plugin 'scrooloose/nerdtree'
Plugin 'altercation/vim-colors-solarized'
Plugin 'klen/python-mode'
"Plugin 'tsaleh/vim-matchit'
"Plugin 'kana/vim-textobj-user'
"Plugin 'nelstrom/vim-textobj-rubyblock'
"Plugin 'Shutnik/jshint2.vim'
Plugin 'Valloric/YouCompleteMe'
"Plugin 'jondkinney/dragvisuals.vim'
"Plugin 'jondkinney/vmath.vim'
"Plugin 'mattn/emmet-vim'
"Plugin 'derekwyatt/vim-scala'
Plugin 'briancollins/vim-jst'
Plugin 'bitc/vim-hdevtools'
Plugin 'scrooloose/syntastic'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'kien/ctrlp.vim'
call vundle#end()
"====[ General ]====
filetype plugin indent on
syntax on
set hidden " Allow hidden buffers
set wildmenu " Show command completions
set ignorecase
set smartcase
set grepprg=ack
"====[ Tab settings ]====
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
"====[ Styles, fonts and colorschemes ]====
set background=dark
let g:solarized_termtrans=1
colorscheme solarized
set number " Show line numbers
" Highlight the 80th column
call matchadd('ColorColumn', '\%81v', 100)
"====[ Set foldmethod=indent for javascript, jst and ruby files ]======
autocmd FileType javascript,jst,ruby set foldmethod=indent
"====[ Make tabs, trailing whitespace, and non-breaking spaces visible ]======
exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~"
set list
"====[ GUI ]====
if has('gui_running')
set guioptions=-t " Hide the toolbar
set guifont=Menlo\ Regular\ for\ Powerline:h14
endif
" Windows
if has('win32')
set columns=120
set lines=50
set gfn=Consolas:h9:cANSI
endif
"========================
"====[ Key Mappings ]====
"========================
"====[ Tab switching ]====
nnoremap <C-j> gt
nnoremap <C-k> gT
"====[ Keep selection after indent ]====
vnoremap < <gv
vnoremap > >gv
"====[ Swap v and CTRL-V, because Block mode is more useful that Visual mode "]====
nnoremap v <C-V>
nnoremap <C-V> v
vnoremap v <C-V>
vnoremap <C-V> v
"===========================
"====[ Plugin settings ]====
"===========================
"====[ Python-mode ]====
" Don't interfere with YouCompleteMe
let g:pymode_rope_complete_on_dot = 0
" Don't regenerate .ropeproject on save
let g:pymode_rope_regenerate_on_write = 0
"====[ NERDTree ]====
let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$']
noremap <leader>t :NERDTreeTabsToggle<CR>
noremap <leader>T :NERDTreeTabsFind<CR>
"====[ Dispatch ]====
noremap <leader>m :Make<CR>
"====[ Fugitive ]====
" Autodelete hidden fugitive buffers
autocmd BufReadPost fugitive://* set bufhidden=delete
noremap <leader>gc :Gcommit<CR>
noremap <leader>gd :Gdiff<CR>
noremap <leader>gs :Gstatus<CR>
noremap <leader>gw :Gwrite<CR>
"====[ Dragvisuals ]======
vmap <expr> <LEFT> DVB_Drag('left')
vmap <expr> <RIGHT> DVB_Drag('right')
vmap <expr> <DOWN> DVB_Drag('down')
vmap <expr> <UP> DVB_Drag('up')
vmap <expr> D DVB_Duplicate()
" Remove any introduced trailing whitespace after moving...
let g:DVB_TrimWS = 1
"====[ vmath ]====
vmap <expr> ++ VMATH_YankAndAnalyse()
nmap ++ vip++
"====[ syntastic ]====
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 = 1
let g:syntastic_check_on_wq = 0
"====[ hdevtools ]====
noremap <leader>ht :HdevtoolsType<CR>
noremap <leader>hi :HdevtoolsInfo<CR>
noremap <leader>hc :HdevtoolsClear<CR>