From 6df4be0e1a9060ce4c1e0795a761a0da4a513887 Mon Sep 17 00:00:00 2001 From: Bodaniel Jeanes Date: Sun, 23 Oct 2011 19:03:10 -0500 Subject: [PATCH] Remove duplicate code --- vim/vimrc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 2e323b5..b89514c 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -19,19 +19,6 @@ cmap :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> tran \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" -" Align cucumber tables -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 -inoremap :call align()a - " Quick editing of common dot-files map vv :edit $MYVIMRC map gg :edit $MYGVIMRC