Permalink
Browse files

GTabularize tweaks

  • Loading branch information...
1 parent df28fbc commit dadab80e8249f30e891663d6f75c49f436ba56d8 @godlygeek committed Sep 11, 2012
Showing with 4 additions and 7 deletions.
  1. +2 −2 autoload/tabular.vim
  2. +2 −5 plugin/Tabular.vim
View
4 autoload/tabular.vim
@@ -256,7 +256,7 @@ function! tabular#TabularizeStrings(strings, delim, ...)
let line = lines[idx]
if len(line) == 1 && s:do_gtabularize
- let lines[idx] = line[0] " GTabularize just ignores non-matching lines
+ let lines[idx] = line[0] " GTabularize doesn't change non-matching lines
continue
endif
@@ -312,7 +312,7 @@ function! tabular#PipeRangeWithOptions(includepat, filterlist, options) range
let top = a:firstline
let bot = a:lastline
- let s:do_gtabularize = (a:options['mode'] ==# 'GTabularize')
+ let s:do_gtabularize = (get(a:options, 'mode', '') ==# 'GTabularize')
if !s:do_gtabularize
" In the default mode, apply range extension logic
View
7 plugin/Tabular.vim
@@ -264,14 +264,11 @@ com! -nargs=* -range -complete=customlist,<SID>CompleteTabularizeCommand
\ Tabularize <line1>,<line2>call Tabularize(<q-args>)
function! Tabularize(command, ...) range
+ let piperange_opt = {}
if a:0
- let options = a:1
- else
- let options = {}
+ let piperange_opt = a:1
endif
- let piperange_opt = { 'mode': get(options, 'mode', '') }
-
if empty(a:command)
if !exists("s:last_tabularize_command")
echohl ErrorMsg

0 comments on commit dadab80

Please sign in to comment.