dotfiles/editors/vim/bundles.vim

136 lines
4.7 KiB
VimL
Raw Normal View History

2012-03-29 06:31:02 +11:00
augroup bundles
autocmd!
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
2012-03-29 06:31:02 +11:00
call neobundle#rc(expand('~/.vim/bundle/'))
2012-03-29 06:31:02 +11:00
" Let NeoNeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vimproc', {
\ 'build' : {
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
2012-03-29 06:31:02 +11:00
2014-01-21 18:52:09 +11:00
NeoBundle 'tpope/vim-endwise' " Auto-add 'end' etc appropriately in various languages
2014-01-21 18:51:48 +11:00
NeoBundle 'kana/vim-smartinput'
2014-01-21 18:57:39 +11:00
NeoBundleLazy 'tpope/vim-vinegar', { 'autoload' : { 'filetypes' : ['netrw'] } }
2013-11-06 19:36:55 +11:00
2012-03-29 06:31:02 +11:00
" Languages/Syntaxes/Frameworks {{{
2014-04-03 18:29:10 +11:00
NeoBundleLazy 'wting/rust.vim', { 'autoload' : { 'filetypes' : ['rust'] } }
au BufNewFile,BufRead *.rs set filetype=rust
2014-04-03 18:29:28 +11:00
NeoBundleLazy 'jnwhiteh/vim-golang', { 'autoload' : { 'filetypes' : ['go'] } }
au BufNewFile,BufRead *.go set filetype=go
au FileType go autocmd BufWritePre <buffer> Fmt
au FileType go set noexpandtab
2012-03-29 06:31:02 +11:00
" Ruby {{{
NeoBundleLazy 'vim-ruby/vim-ruby'
2013-11-06 19:36:55 +11:00
NeoBundleLazy 'tpope/vim-rails'
NeoBundleLazy 'tpope/vim-rake'
2013-11-06 19:36:55 +11:00
NeoBundleLazy 'tpope/vim-bundler'
NeoBundleLazy 'thisivan/vim-ruby-matchit'
2013-11-06 19:36:55 +11:00
NeoBundleLazy 'nelstrom/vim-textobj-rubyblock', { 'depends' : ['kana/vim-textobj-user', 'thisivan/vim-matchit'] }
autocmd FileType ruby NeoBundleSource
\ vim-ruby
2013-11-06 19:36:55 +11:00
\ vim-rails " <- how to maket his only load in rails projects?
\ vim-bundler
\ vim-rake
\ vim-haml
\ vim-ruby-matchit
\ vim-textobj-rubyblock
2012-03-29 06:31:02 +11:00
" }}}
2014-02-13 16:20:02 +11:00
" Clojure(script) {{{
2014-01-21 18:48:33 +11:00
NeoBundleLazy 'guns/vim-clojure-static'
NeoBundleLazy 'guns/vim-sexp', { 'depends' : ['tpope/vim-repeat'] }
NeoBundleLazy 'tpope/vim-sexp-mappings-for-regular-people', { 'depends' : ['guns/vim-sexp'] }
2014-05-24 02:02:04 +10:00
NeoBundleLazy 'tpope/vim-dispatch'
NeoBundleLazy 'tpope/vim-leiningen', { 'depends' : ['tpope/vim-dispatch'] }
NeoBundleLazy 'tpope/vim-fireplace', { 'depends' : ['tpope/vim-leiningen']}
2014-01-21 18:48:33 +11:00
autocmd FileType clojure,clojurescript NeoBundleSource
\ vim-clojure-static
\ vim-sexp-mappings-for-regular-people
\ vim-fireplace
autocmd FileType clojure,clojurescript set lispwords-='->'
autocmd FileType clojure,clojurescript set lispwords-='->>'
2012-03-29 06:31:02 +11:00
" }}}
NeoBundleLazy 'tpope/vim-markdown', { 'autoload' : { 'filetypes' : ['markdown'] } }
2012-03-29 06:31:02 +11:00
" HTML/CSS/Javascript {{{
NeoBundleLazy 'tpope/vim-haml', { 'autoload' : { 'filetypes' : 'haml' } }
NeoBundleLazy 'kchmck/vim-coffee-script', { 'autoload' : { 'filetypes' : 'coffee' } }
NeoBundleLazy 'pangloss/vim-javascript', { 'autoload' : { 'filetypes' : 'javascript' } }
NeoBundleLazy 'css3', { 'autoload' : { 'filetypes' : 'css' } }
NeoBundleLazy 'othree/html5-syntax.vim', { 'autoload' : { 'filetypes' : 'html' } }
NeoBundleLazy 'slim-template/vim-slim', { 'autoload' : { 'filetypes' : 'slim' } }
2012-03-29 06:31:02 +11:00
" }}}
2012-03-29 06:31:02 +11:00
" }}}
2011-12-14 10:44:35 +11:00
2012-03-29 06:31:02 +11:00
" Git {{{
NeoBundle 'tpope/vim-fugitive', { 'augroup': 'fugitive' }
NeoBundle 'tpope/vim-git'
NeoBundle 'tjennings/git-grep-vim'
" }}}
2012-03-29 06:31:02 +11:00
" Text objects {{{
NeoBundle 'michaeljsmith/vim-indent-object'
NeoBundle 'argtextobj.vim'
2011-12-14 10:53:25 +11:00
" }}}
2012-03-29 06:31:02 +11:00
" Utility {{{
2013-11-06 19:36:55 +11:00
NeoBundle 'tpope/vim-surround', { 'depends' : 'tpope/vim-repeat' }
2012-03-29 06:31:02 +11:00
2013-11-06 19:36:55 +11:00
NeoBundleLazy 'AutoComplPop', { 'autoload' : { 'insert' : 1 } }
2012-03-29 06:31:02 +11:00
let g:acp_enableAtStartup = 0
let g:acp_completeoptPreview = 1
let g:acp_behaviorKeywordLength = 3
let g:acp_behaviorKeywordIgnores = [
\ 'the', 'def', 'end',
\ 'else', 'elsif', 'elif', 'endif', 'then',
\ 'case', 'done', 'do'
\ ]
NeoBundle 'Tabular'
2012-03-29 06:31:02 +11:00
autocmd VimEnter * AddTabularPattern! first_eq /\%(=.*\)\@<!=[>=]\@!/l1c1l0
autocmd VimEnter * AddTabularPattern! first_rocket /\%(=>.*\)\@<!=>/l1c1l0
autocmd VimEnter * AddTabularPattern! first_key /\v%(%(\h\w*|"[^"]+"):.*)@<!%(\h\w*|"[^"]+")\zs:/l0l1
" mark, select indent level, tabularize, go to mark
nmap <silent> <Leader>a= mT:Tabularize first_eq<CR>`T
2012-03-29 06:31:02 +11:00
nmap <silent> <Leader>a> mT:Tabularize first_rocket<CR>`T
nmap <silent> <Leader>a: mT:Tabularize first_key<CR>`T
vmap <silent> <Leader>a= :Tabularize first_eq<CR>gv
vmap <silent> <Leader>a> :Tabularize first_rocket<CR>gv
vmap <silent> <Leader>a: :Tabularize first_key<CR>gv
2013-11-06 19:36:55 +11:00
NeoBundle 'tpope/vim-commentary'
autocmd FileType clojure,clojurescript set commentstring=;\ %s
nmap // <Plug>CommentaryLine
vmap // <Plug>Commentary
2012-03-29 06:31:02 +11:00
NeoBundle 'kien/ctrlp.vim'
2012-03-29 06:31:02 +11:00
NeoBundle 'Syntastic'
2012-03-29 06:31:02 +11:00
let g:syntastic_enable_signs = 1
let g:syntastic_auto_loc_list = 0
" }}}
2012-03-29 06:31:02 +11:00
filetype plugin indent on
NeoBundleCheck
2012-03-29 06:31:02 +11:00
augroup END