├── .gitmodules
├── README.md
├── autoload
└── pathogen.vim
├── gvimrc
├── solarized.zip
└── vimrc
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "bundle/emmet-vim"]
2 | path = bundle/emmet-vim
3 | url = git@github.com:mattn/emmet-vim.git
4 | [submodule "bundle/nerdcommenter"]
5 | path = bundle/nerdcommenter
6 | url = git@github.com:scrooloose/nerdcommenter.git
7 | [submodule "bundle/snipmate"]
8 | path = bundle/snipmate
9 | url = git@github.com:caike/snipmate.vim.git
10 | [submodule "bundle/tlib_vim"]
11 | path = bundle/tlib_vim
12 | url = git@github.com:tomtom/tlib_vim.git
13 | [submodule "bundle/vim-addon-mw-utils"]
14 | path = bundle/vim-addon-mw-utils
15 | url = git@github.com:MarcWeber/vim-addon-mw-utils.git
16 | [submodule "bundle/vim-coffee-script"]
17 | path = bundle/vim-coffee-script
18 | url = git@github.com:kchmck/vim-coffee-script.git
19 | [submodule "bundle/vim-javascript"]
20 | path = bundle/vim-javascript
21 | url = git@github.com:pangloss/vim-javascript.git
22 | [submodule "bundle/vim-rails"]
23 | path = bundle/vim-rails
24 | url = git@github.com:tpope/vim-rails.git
25 | [submodule "bundle/vim-ruby"]
26 | path = bundle/vim-ruby
27 | url = git@github.com:vim-ruby/vim-ruby.git
28 | [submodule "bundle/vim-surround"]
29 | path = bundle/vim-surround
30 | url = git@github.com:tpope/vim-surround.git
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Vim Config
2 |
3 | My collection of vim settings and plugins.
4 |
5 |
--------------------------------------------------------------------------------
/autoload/pathogen.vim:
--------------------------------------------------------------------------------
1 | " pathogen.vim - path option manipulation
2 | " Maintainer: Tim Pope
3 | " Version: 2.3
4 |
5 | " Install in ~/.vim/autoload (or ~\vimfiles\autoload).
6 | "
7 | " For management of individually installed plugins in ~/.vim/bundle (or
8 | " ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
9 | " .vimrc is the only other setup necessary.
10 | "
11 | " The API is documented inline below.
12 |
13 | if exists("g:loaded_pathogen") || &cp
14 | finish
15 | endif
16 | let g:loaded_pathogen = 1
17 |
18 | " Point of entry for basic default usage. Give a relative path to invoke
19 | " pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke
20 | " pathogen#surround(). Curly braces are expanded with pathogen#expand():
21 | " "bundle/{}" finds all subdirectories inside "bundle" inside all directories
22 | " in the runtime path.
23 | function! pathogen#infect(...) abort
24 | for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}']
25 | if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]'
26 | call pathogen#surround(path)
27 | elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)'
28 | call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
29 | call pathogen#surround(path . '/{}')
30 | elseif path =~# '[{}*]'
31 | call pathogen#interpose(path)
32 | else
33 | call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
34 | call pathogen#interpose(path . '/{}')
35 | endif
36 | endfor
37 | call pathogen#cycle_filetype()
38 | if pathogen#is_disabled($MYVIMRC)
39 | return 'finish'
40 | endif
41 | return ''
42 | endfunction
43 |
44 | " Split a path into a list.
45 | function! pathogen#split(path) abort
46 | if type(a:path) == type([]) | return a:path | endif
47 | if empty(a:path) | return [] | endif
48 | let split = split(a:path,'\\\@]','\\&','')
235 | endif
236 | endfunction
237 |
238 | " Like findfile(), but hardcoded to use the runtimepath.
239 | function! pathogen#runtime_findfile(file,count) abort "{{{1
240 | let rtp = pathogen#join(1,pathogen#split(&rtp))
241 | let file = findfile(a:file,rtp,a:count)
242 | if file ==# ''
243 | return ''
244 | else
245 | return fnamemodify(file,':p')
246 | endif
247 | endfunction
248 |
249 | " Section: Deprecated
250 |
251 | function! s:warn(msg) abort
252 | echohl WarningMsg
253 | echomsg a:msg
254 | echohl NONE
255 | endfunction
256 |
257 | " Prepend all subdirectories of path to the rtp, and append all 'after'
258 | " directories in those subdirectories. Deprecated.
259 | function! pathogen#runtime_prepend_subdirectories(path) abort
260 | call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')')
261 | return pathogen#surround(a:path . pathogen#slash() . '{}')
262 | endfunction
263 |
264 | function! pathogen#incubate(...) abort
265 | let name = a:0 ? a:1 : 'bundle/{}'
266 | call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')')
267 | return pathogen#interpose(name)
268 | endfunction
269 |
270 | " Deprecated alias for pathogen#interpose().
271 | function! pathogen#runtime_append_all_bundles(...) abort
272 | if a:0
273 | call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')')
274 | else
275 | call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()')
276 | endif
277 | return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}')
278 | endfunction
279 |
280 | if exists(':Vedit')
281 | finish
282 | endif
283 |
284 | let s:vopen_warning = 0
285 |
286 | function! s:find(count,cmd,file,lcd)
287 | let rtp = pathogen#join(1,pathogen#split(&runtimepath))
288 | let file = pathogen#runtime_findfile(a:file,a:count)
289 | if file ==# ''
290 | return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
291 | endif
292 | if !s:vopen_warning
293 | let s:vopen_warning = 1
294 | let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE'
295 | else
296 | let warning = ''
297 | endif
298 | if a:lcd
299 | let path = file[0:-strlen(a:file)-2]
300 | execute 'lcd `=path`'
301 | return a:cmd.' '.pathogen#fnameescape(a:file) . warning
302 | else
303 | return a:cmd.' '.pathogen#fnameescape(file) . warning
304 | endif
305 | endfunction
306 |
307 | function! s:Findcomplete(A,L,P)
308 | let sep = pathogen#slash()
309 | let cheats = {
310 | \'a': 'autoload',
311 | \'d': 'doc',
312 | \'f': 'ftplugin',
313 | \'i': 'indent',
314 | \'p': 'plugin',
315 | \'s': 'syntax'}
316 | if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
317 | let request = cheats[a:A[0]].a:A[1:-1]
318 | else
319 | let request = a:A
320 | endif
321 | let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
322 | let found = {}
323 | for path in pathogen#split(&runtimepath)
324 | let path = expand(path, ':p')
325 | let matches = split(glob(path.sep.pattern),"\n")
326 | call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
327 | call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
328 | for match in matches
329 | let found[match] = 1
330 | endfor
331 | endfor
332 | return sort(keys(found))
333 | endfunction
334 |
335 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0)
336 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0)
337 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1)
338 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1)
339 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1)
340 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1)
341 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1)
342 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1)
343 |
344 | " vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=':
345 |
--------------------------------------------------------------------------------
/gvimrc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caike/vim-config/80150c11d0fd8d224814dec6ccdca43bc52778ff/gvimrc
--------------------------------------------------------------------------------
/solarized.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/caike/vim-config/80150c11d0fd8d224814dec6ccdca43bc52778ff/solarized.zip
--------------------------------------------------------------------------------
/vimrc:
--------------------------------------------------------------------------------
1 | call pathogen#infect()
2 | call pathogen#helptags()
3 |
4 | set nocompatible "ensures vim over vi
5 | set number
6 | set ruler "add line/column count to the bottom of screen
7 | "syntax on
8 | syntax enable
9 | set noerrorbells visualbell t_vb= "turn off annoying bells
10 | set tags=.tags "destination file for ctags
11 | set softtabstop=2 "number of space chars a tab counts for
12 | set shiftwidth=2 "number of space chars for indentation
13 | set expandtab "insert space characters whenever the tab key is pressed
14 | set tabstop=2 "space chars inserted when tab key is pressed
15 | set autoindent
16 |
17 | filetype plugin indent on
18 |
19 | " For MacVim
20 | if has('gui_running')
21 | syntax enable
22 | set background=dark
23 | colorscheme solarized
24 | endif
25 |
26 |
27 | set splitright "opens new split on the right
28 | set splitbelow "open new vsplit on the bottom
29 |
30 | " Remove trailling whitespace on :w
31 | autocmd BufWritePre * :%s/\s\+$//e
32 |
33 | " Incremental search
34 | set incsearch
35 |
36 | highlight Cursor guibg=Green guifg=NONE
37 |
--------------------------------------------------------------------------------