Added helpful comment for magic within TableizeRange

This commit is contained in:
Dhruva Sagar
2013-03-18 17:20:17 +05:30
parent c94b91237e
commit 8169303d40

View File

@@ -6,7 +6,7 @@
" Notes: This was inspired by Tim Pope's cucumbertables.vim " Notes: This was inspired by Tim Pope's cucumbertables.vim
" (https://gist.github.com/tpope/287147) " (https://gist.github.com/tpope/287147)
" ============================================================================= " =============================================================================
"
if exists('g:table_mode_loaded') if exists('g:table_mode_loaded')
finish finish
endif endif
@@ -143,6 +143,8 @@ endfunction
function! s:TableizeRange() range function! s:TableizeRange() range
call s:Tableizeline(a:firstline) call s:Tableizeline(a:firstline)
undojoin undojoin
" The first one causes 2 extra lines for top & bottom border while the
" following lines cause only 1 for the bottom border.
let lnum = a:firstline+3 let lnum = a:firstline+3
while lnum <= (a:firstline + (a:lastline - a:firstline+1)*2) while lnum <= (a:firstline + (a:lastline - a:firstline+1)*2)
call s:Tableizeline(lnum) call s:Tableizeline(lnum)