-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01_plugin_config.vim
More file actions
148 lines (129 loc) · 4.68 KB
/
Copy path01_plugin_config.vim
File metadata and controls
148 lines (129 loc) · 4.68 KB
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
call dein#begin(expand('~/.vim/dein')) " plugins' root path
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/vimproc.vim', {'build' : 'make'})
call dein#add('Shougo/unite.vim')
call dein#add('tweekmonster/startuptime.vim')
call dein#source('colors/*')
call dein#add('airblade/vim-gitgutter')
call dein#add('tomtom/tcomment_vim')
call dein#add('tpope/vim-endwise')
call dein#add('tpope/vim-fugitive')
call dein#add('tpope/vim-rake')
call dein#add('tpope/vim-repeat')
call dein#add('vim-scripts/matchit.zip')
call dein#add('vim-scripts/ruby-matchit')
call dein#add('tpope/vim-abolish')
call dein#add('tpope/vim-sleuth')
call dein#add('slim-template/vim-slim')
call dein#add('mxw/vim-jsx')
call dein#add('isRuslan/vim-es6')
" Neomake for async static linting
call dein#add('neomake/neomake')
let g:neomake_eruby_rubocop_maker = {'exe': 'rubocop'}
let g:neomake_eruby_enabled_makers = ['rubocop']
let g:neomake_elixir_enabled_makers = ['mix']
let g:neomake_javascript_enabled_makers = ['eslint']
let g:neomake_haml_enabled_makers = []
autocmd! BufWritePost * Neomake
" NERDTree for project drawer
call dein#add('scrooloose/nerdtree')
let NERDTreeHijackNetrw = 0
let NERDTreeIgnore=['\.rbc$', '\~$']
nmap <leader>g :NERDTreeToggle<CR>
nmap <leader>G :NERDTreeFind<CR>
map <Leader>nt :NERDTreeToggle<CR>
" Vim airline configs
call dein#add('vim-airline/vim-airline')
" Supertab code completion
call dein#add('ervandew/supertab')
let g:SuperTabContextDefaultCompletionType = '<c-n>'
" AG aka The Silver Searcher
call dein#add('rking/ag.vim')
nmap g/ :Ag!<space>
nmap g* :Ag! -w <C-R><C-W><space>
nmap ga :AgAdd!<space>
nmap gn :cnext<CR>
nmap gp :cprev<CR>
nmap gl :cwindow<CR>
" Ctrlp like functionality
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })
call dein#add('pbogut/fzf-mru.vim')
nnoremap <Leader>b :<C-U>Buffers<CR>
nnoremap <Leader>t :<C-U>Files<CR>
nnoremap <Leader>T :<C-U>FZFMru<CR>
nnoremap <Leader>B :<C-U>FZFMru<CR>
" Tagbar for navigation by tags using CTags
call dein#add('majutsushi/tagbar')
let g:tagbar_autofocus = 1
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
map <Leader>. :TagbarToggle<CR>
map <C-\> :tnext<CR>
" ZoomWin to fullscreen a particular buffer without losing others
call dein#add('troydm/zoomwintab.vim')
map <Leader>z :ZoomWinTabToggle<CR>
" Unimpaired for keymaps for quicky manipulating lines and files
call dein#add('tpope/vim-unimpaired')
" Bubble single lines
nmap <C-Up> [e
nmap <C-Down> ]e
" Bubble multiple lines
vmap <C-Up> [egv
vmap <C-Down> ]egv
" gundo for awesome undo tree visualization
call dein#add('mbbill/undotree')
map <Leader>h :UndotreeToggle<CR>
" rails.vim, nuff' said
call dein#add('tpope/vim-rails')
map <Leader>oc :Econtroller<Space>
map <Leader>ov :Eview<Space>
map <Leader>om :Emodel<Space>
map <Leader>oh :Ehelper<Space>
map <Leader>oj :Ejavascript<Space>
map <Leader>os :Estylesheet<Space>
map <Leader>oi :Eintegration<Space>
" John Papa recommended angular naming conventions
let g:rails_projections = {
\ 'app/assets/*.js.coffee': {
\ 'alternate': 'spec/{}.spec.js.coffee'
\ },
\ 'app/assets/*.js': {
\ 'alternate': 'spec/{}.spec.js'
\ },
\ 'app/assets/*.coffee': {
\ 'alternate': 'spec/{}.spec.coffee'
\ },
\ 'spec/*.spec.js.coffee': {
\ 'alternate': 'app/assets/{}.js.coffee'
\ },
\ 'spec/*.spec.js': {
\ 'alternate': 'app/assets/{}.js'
\ },
\ 'spec/*.spec.coffee': {
\ 'alternate': 'app/assets/{}.coffee'
\ }
\}
" surround for adding surround 'physics'
call dein#add('tpope/vim-surround')
" # to surround with ruby string interpolation
let g:surround_35 = '#{\r}'
" - to surround with no-output erb tag
let g:surround_45 = '<% \r %>'
" = to surround with output erb tag
let g:surround_61 = '<%= \r %>'
" Easy async RSpec running
call dein#add('thoughtbot/vim-rspec')
call dein#add('tpope/vim-dispatch')
let g:rspec_command = '!bundle exec rspec --format=progress --no-profile {spec}'
nmap <Leader>rc :wa<CR> :call RunCurrentSpecFile()<CR>
nmap <Leader>rn :wa<CR> :call RunNearestSpec()<CR>
nmap <Leader>rl :wa<CR> :call RunLastSpec()<CR>
nmap <Leader>ra :wa<CR> :call RunAllSpecs()<CR>
" Elixir vim stuff
call dein#add('elixir-editors/vim-elixir')
call dein#add('c-brenn/phoenix.vim')
call dein#add('tpope/vim-projectionist')
call dein#end()
if dein#check_install()
call dein#install()
endif