forked from artemave/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bundles.vim
246 lines (201 loc) · 7.18 KB
/
.bundles.vim
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
"vim -u .bundles.vim +BundleInstall +q
set nocompatible
let $GIT_SSL_NO_VERIFY='true'
nnoremap <space> <Nop>
let mapleader=" "
filetype off " required! by vundle
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
" let Vundle manage Vundle
" required!
Plugin 'gmarik/Vundle.vim'
" My Bundles here:
"
" original repos on github
Plugin 'tpope/vim-dispatch'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-rake'
Plugin 'tpope/vim-bundler'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-haml'
au BufNewFile,BufRead *.hamlc set filetype=haml
Plugin 'tpope/vim-cucumber'
" cucumber auto outline
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
endif
endfunction
function! MyCloseGdiff()
if (&diff == 0 || getbufvar('#', '&diff') == 0)
\ && (bufname('%') !~ '^fugitive:' && bufname('#') !~ '^fugitive:')
echom "Not in diff view."
return
endif
" close current buffer if alternate is not fugitive but current one is
if bufname('#') !~ '^fugitive:' && bufname('%') =~ '^fugitive:'
if bufwinnr("#") == -1
b #
bd #
else
bd
endif
else
bd #
endif
endfunction
nnoremap <Leader>D :call MyCloseGdiff()<cr>
Plugin 'tpope/vim-eunuch'
Plugin 'tpope/vim-unimpaired'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-obsession'
Plugin 'tpope/vim-commentary'
Plugin 'vim-ruby/vim-ruby'
Plugin 'kana/vim-textobj-user'
Plugin 'rhysd/vim-textobj-ruby'
Plugin 'kchmck/vim-coffee-script'
" Bundle 'artemave/slowdown.vim'
Plugin 'jgdavey/tslime.vim'
vmap <C-c><C-c> <Plug>SendSelectionToTmux
nmap <C-c><C-c> <Plug>NormalModeSendToTmux
nmap <C-c>r <Plug>SetTmuxVars
Plugin 'YankRing.vim'
let g:yankring_replace_n_pkey = '<c-n>'
let g:yankring_replace_n_nkey = ''
nnoremap <Leader>re :YRShow<cr>
Plugin 'lucapette/vim-ruby-doc'
let g:ruby_doc_command='open'
let g:ruby_doc_ruby_host='http://apidock.com/ruby/'
let g:ruby_doc_rails_host='http://apidock.com/rails/'
Plugin 'michaeljsmith/vim-indent-object'
Plugin 'AndrewVos/vim-aaa'
Plugin 'godlygeek/tabular'
nnoremap <Leader>a= :Tabularize /=<CR>
vnoremap <Leader>a= :Tabularize /=<CR>
nnoremap <Leader>a: :Tabularize /:\zs/r0c1l0<CR>
vnoremap <Leader>a: :Tabularize /:\zs/r0c1l0<CR>
nnoremap <Leader>a> :Tabularize /=><CR>
vnoremap <Leader>a> :Tabularize /=><CR>
nnoremap <Leader>ae :Tabularize /==<CR>
vnoremap <Leader>ae :Tabularize /==<CR>
Plugin 'scrooloose/syntastic'
" Enable syntastic syntax checking
let g:syntastic_enable_signs=1
" else syntastic breaks ]l
let g:syntastic_always_populate_loc_list=1
Plugin 'sjl/gundo.vim'
nmap <F6> :GundoToggle<CR>
imap <F6> <ESC>:GundoToggle<CR>
Plugin 'Shougo/vimproc.vim' " after install: cd ~/.vim/bundle/vimproc.vim && make && cd -
Plugin 'Shougo/unite.vim'
" custom command: ag --follow --nocolor --nogroup --hidden -g ""
let g:unite_source_rec_async_command = ['ag', '--follow', '--nocolor', '--nogroup', '--hidden', '-g', '']
nnoremap <Leader>f :Unite -buffer-name=files -no-split -start-insert file_rec/async<cr>
nnoremap <Leader>F :Unite -buffer-name=scoped_files -no-split -start-insert -path=`expand("%:p:h")` file_rec/async:!<cr>
nnoremap <Leader>b :Unite -buffer-name=buffer -no-split -start-insert buffer<cr>
nnoremap <leader>y :<C-u>Unite -no-split -buffer-name=yank history/yank<cr>
au FileType unite call s:unite_my_settings()
function! s:unite_my_settings()
" Overwrite settings.
imap <silent><buffer><expr> <C-v> unite#do_action('vsplit')
imap <silent><buffer><expr> <C-s> unite#do_action('split')
nmap <silent><buffer><expr> <C-v> unite#do_action('vsplit')
nmap <silent><buffer><expr> <C-s> unite#do_action('split')
endfunction
Plugin 'Raimondi/delimitMate'
Plugin 'matchit.zip'
Plugin 'The-NERD-tree'
Plugin 'AnsiEsc.vim'
Plugin 'haskell.vim'
Plugin 'Shougo/neocomplete'
Plugin 'Shougo/echodoc.vim'
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#disable_auto_complete = 1
let g:neocomplete#enable_fuzzy_completion = 0
let g:neocomplete#sources#syntax#min_keyword_length = 3
let g:echodoc_enable_at_startup = 1
set noshowmode
set completeopt+=menuone
set completeopt-=preview
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
" useful when <Tab> -> <Esc>
" let g:snips_trigger_key='<C-@>' " this is <C-Space> that works
Plugin 'majutsushi/tagbar'
nmap <F8> :TagbarToggle<CR>
Plugin 'ecomba/vim-ruby-refactoring'
Plugin 'featurist/vim-pogoscript'
au FileType pogo nnoremap <Leader>c :PogoCompile<cr>
Plugin 'Lokaltog/vim-powerline'
" PowerLine recommeneded:
set laststatus=2 " Always show the statusline"
set encoding=utf-8 " Necessary to show Unicode glyphs"
Plugin 'mustache/vim-mustache-handlebars'
" mustache/handlebars with m M
let g:surround_109 = "{{\r}}"
let g:surround_77 = "{{{\r}}}"
let g:mustache_abbreviations = 1
Plugin 'fatih/vim-go'
let g:go_fmt_command = "goimports"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>i <Plug>(go-info)
au FileType go nmap <Leader>gd <Plug>(go-doc-browser)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>re <Plug>(go-rename)
Plugin 'kien/rainbow_parentheses.vim'
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadBraces
let g:rbpt_colorpairs = [
\ ['brown', 'RoyalBlue3'],
\ ['Darkblue', 'SeaGreen3'],
\ ['darkgreen', 'firebrick3'],
\ ['darkcyan', 'RoyalBlue3'],
\ ['darkred', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['brown', 'firebrick3'],
\ ['Darkblue', 'firebrick3'],
\ ['darkgreen', 'RoyalBlue3'],
\ ['darkcyan', 'SeaGreen3'],
\ ['darkred', 'DarkOrchid3'],
\ ['red', 'firebrick3'],
\ ]
Plugin 'rking/ag.vim'
" Quick grep for word under the cursor in rails app
noremap <Leader><Leader>f :Ag <cword><cr>
let g:molokai_original = 1
Plugin 'tomasr/molokai'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
Plugin 'marijnh/tern_for_vim'
Plugin 'AndrewRadev/sideways.vim'
nnoremap <c-h> :SidewaysLeft<cr>
nnoremap <c-l> :SidewaysRight<cr>
omap aa <Plug>SidewaysArgumentTextobjA
xmap aa <Plug>SidewaysArgumentTextobjA
omap ia <Plug>SidewaysArgumentTextobjI
xmap ia <Plug>SidewaysArgumentTextobjI
Plugin 'tommcdo/vim-exchange'
Plugin 'tmux-plugins/vim-tmux-focus-events'
Plugin 'chrisbra/NrrwRgn'
Plugin 'roman/golden-ratio'
Plugin 'terryma/vim-multiple-cursors'
call vundle#end() " required
filetype plugin indent on " required!
colorscheme molokai " this has to come after 'filetype plugin indent on'