From 677db037f1aaec6631099be76077dd26082c7d3e Mon Sep 17 00:00:00 2001 From: Bodaniel Jeanes Date: Sat, 15 Jan 2011 15:32:50 +1000 Subject: [PATCH] Update the vim bundles and add a few more --- .gitmodules | 18 ++++++++++++++++++ shell/exports.sh | 2 +- vim/bundle/AutoAlign | 1 + vim/bundle/NERDCommenter | 2 +- vim/bundle/command-t | 2 +- vim/bundle/endwise | 2 +- vim/bundle/fugitive | 2 +- vim/bundle/markdown-preview | 2 +- vim/bundle/matchit | 1 + vim/bundle/rails | 2 +- vim/bundle/ruby-refactoring | 1 + vim/bundle/supertab | 2 +- vim/bundle/surround | 2 +- vim/bundle/syntastic | 2 +- vim/bundle/tabular | 1 + vim/bundle/textobj-rubyblock | 1 + vim/bundle/textobj-user | 1 + vim/vimrc | 27 +++++++++++++++++++++++---- 18 files changed, 57 insertions(+), 14 deletions(-) create mode 160000 vim/bundle/AutoAlign create mode 160000 vim/bundle/matchit create mode 160000 vim/bundle/ruby-refactoring create mode 160000 vim/bundle/tabular create mode 160000 vim/bundle/textobj-rubyblock create mode 160000 vim/bundle/textobj-user diff --git a/.gitmodules b/.gitmodules index ecd88d6..ea5f755 100644 --- a/.gitmodules +++ b/.gitmodules @@ -76,3 +76,21 @@ [submodule "vim/bundle/taglist"] path = vim/bundle/taglist url = https://github.com/vim-scripts/taglist.vim.git +[submodule "vim/bundle/matchit"] + path = vim/bundle/matchit + url = https://github.com/mhz/vim-matchit.git +[submodule "vim/bundle/textobj-user"] + path = vim/bundle/textobj-user + url = https://github.com/kana/vim-textobj-user.git +[submodule "vim/bundle/textobj-rubyblock"] + path = vim/bundle/textobj-rubyblock + url = https://github.com/nelstrom/vim-textobj-rubyblock.git +[submodule "vim/bundle/tabular"] + path = vim/bundle/tabular + url = https://github.com/godlygeek/tabular.git +[submodule "vim/bundle/ruby-refactoring"] + path = vim/bundle/ruby-refactoring + url = https://github.com/ecomba/vim-ruby-refactoring.git +[submodule "vim/bundle/AutoAlign"] + path = vim/bundle/AutoAlign + url = https://github.com/vim-scripts/AutoAlign.git diff --git a/shell/exports.sh b/shell/exports.sh index 4ed8319..9b800b7 100644 --- a/shell/exports.sh +++ b/shell/exports.sh @@ -17,7 +17,7 @@ export GIT_EDITOR="$(which mvim || which vim) -f" # http://is.gd/hGrsF export IRBRC="$HOME/.irbrc" export JEWELER_OPTS="--rspec --gemcutter --rubyforge --reek --roodi" -export TERM=xterm-256color +#export TERM=xterm-256color export GREP_OPTIONS='--color=auto' export GREP_COLOR='1;32' export CLICOLOR=1 diff --git a/vim/bundle/AutoAlign b/vim/bundle/AutoAlign new file mode 160000 index 0000000..3f385ae --- /dev/null +++ b/vim/bundle/AutoAlign @@ -0,0 +1 @@ +Subproject commit 3f385ae8fe3f263a487ef445d904631e55a71ee8 diff --git a/vim/bundle/NERDCommenter b/vim/bundle/NERDCommenter index 930be32..760df35 160000 --- a/vim/bundle/NERDCommenter +++ b/vim/bundle/NERDCommenter @@ -1 +1 @@ -Subproject commit 930be32a23e902ddc46135ddbb9e76b0fac0c14b +Subproject commit 760df352734666753ceb66a0886e0f0a844c3a48 diff --git a/vim/bundle/command-t b/vim/bundle/command-t index a08fed9..85fd8b0 160000 --- a/vim/bundle/command-t +++ b/vim/bundle/command-t @@ -1 +1 @@ -Subproject commit a08fed9f6c37519e8ca58e6cf0b0c99ae8581ffe +Subproject commit 85fd8b0ce657f772ad9c1c50fe502e08ca2bf04c diff --git a/vim/bundle/endwise b/vim/bundle/endwise index 780fa56..b674cb5 160000 --- a/vim/bundle/endwise +++ b/vim/bundle/endwise @@ -1 +1 @@ -Subproject commit 780fa5603c0917d9b22e3b64dd8ab0423e006eb5 +Subproject commit b674cb5c7c3c8595e639847cce95f9ba834181e5 diff --git a/vim/bundle/fugitive b/vim/bundle/fugitive index affce71..1561235 160000 --- a/vim/bundle/fugitive +++ b/vim/bundle/fugitive @@ -1 +1 @@ -Subproject commit affce710e296f384585e7dbe3b2be4d9d04be49f +Subproject commit 156123520b1b0f1e128837a4c51f4246017932d4 diff --git a/vim/bundle/markdown-preview b/vim/bundle/markdown-preview index cd51f61..b0842f8 160000 --- a/vim/bundle/markdown-preview +++ b/vim/bundle/markdown-preview @@ -1 +1 @@ -Subproject commit cd51f6130fccf99728090b5476a392469f54f28b +Subproject commit b0842f896bf151324573e1d11a02be3c028876eb diff --git a/vim/bundle/matchit b/vim/bundle/matchit new file mode 160000 index 0000000..67cc55c --- /dev/null +++ b/vim/bundle/matchit @@ -0,0 +1 @@ +Subproject commit 67cc55c340ddd1c62ea84d1f9774cbf6e297b970 diff --git a/vim/bundle/rails b/vim/bundle/rails index 26dade8..0a55cda 160000 --- a/vim/bundle/rails +++ b/vim/bundle/rails @@ -1 +1 @@ -Subproject commit 26dade8251a07da3d78467bcbc08bd1b2767008d +Subproject commit 0a55cda9e826bd601f0389a787595bfbf9987306 diff --git a/vim/bundle/ruby-refactoring b/vim/bundle/ruby-refactoring new file mode 160000 index 0000000..4175be7 --- /dev/null +++ b/vim/bundle/ruby-refactoring @@ -0,0 +1 @@ +Subproject commit 4175be7abbf39f13e01252d25362e6551fbd14fd diff --git a/vim/bundle/supertab b/vim/bundle/supertab index 2f432d1..c6d704c 160000 --- a/vim/bundle/supertab +++ b/vim/bundle/supertab @@ -1 +1 @@ -Subproject commit 2f432d1132e93c5db806c6d782f3656dc86efade +Subproject commit c6d704c6daf64b85828d99a88f9099efc7e01299 diff --git a/vim/bundle/surround b/vim/bundle/surround index 27710a2..1936496 160000 --- a/vim/bundle/surround +++ b/vim/bundle/surround @@ -1 +1 @@ -Subproject commit 27710a2224d6dd0486d1c40d09ef18dd752e7d37 +Subproject commit 193649616c560f15bc8bcd9b15fd96d1bdaeb2ee diff --git a/vim/bundle/syntastic b/vim/bundle/syntastic index 4b690ba..7e183dd 160000 --- a/vim/bundle/syntastic +++ b/vim/bundle/syntastic @@ -1 +1 @@ -Subproject commit 4b690ba5e20fd603986df9563614909442b4086c +Subproject commit 7e183dd2e2985c2c88cb62df7cc839fd6c265dda diff --git a/vim/bundle/tabular b/vim/bundle/tabular new file mode 160000 index 0000000..f4d460e --- /dev/null +++ b/vim/bundle/tabular @@ -0,0 +1 @@ +Subproject commit f4d460ea92527f242e447aab37e3fd180ceef526 diff --git a/vim/bundle/textobj-rubyblock b/vim/bundle/textobj-rubyblock new file mode 160000 index 0000000..ea53988 --- /dev/null +++ b/vim/bundle/textobj-rubyblock @@ -0,0 +1 @@ +Subproject commit ea53988472604c1c1235a70a78de079d38c98342 diff --git a/vim/bundle/textobj-user b/vim/bundle/textobj-user new file mode 160000 index 0000000..8dc7888 --- /dev/null +++ b/vim/bundle/textobj-user @@ -0,0 +1 @@ +Subproject commit 8dc78888b7e3bbd562b2f8c29c96365f61cba194 diff --git a/vim/vimrc b/vim/vimrc index 269cee1..899c00a 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1,5 +1,7 @@ set nocompatible +runtime macros/matchit.vim + " Pathogen setup runtime! autoload/pathogen.vim if exists('g:loaded_pathogen') @@ -235,14 +237,31 @@ set wildignore+=Transmission*Remote*GUI let g:ragtag_global_maps = 1 -if filereadable(expand('~/.vimrc.local')) - source ~/.vimrc.local -endif - "Directories for swp files set backupdir=~/.vim/backup set directory=~/.vim/backup " better way to run this? let ignorethisvar = system("mkdir -p ~/.vim/backup") +" Align cucumber tables +inoremap :call align()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 + +" Prevents 'DiscretionaryEnd' being inserted when pressing in +" insert mode on new files. Blame SuperTab +let g:SuperTabCrMapping = 0 +let g:SuperTabDefaultCompletionType = "context" + +if filereadable(expand('~/.vimrc.local')) + source ~/.vimrc.local +endif