Commit Graph

13 Commits

Author SHA1 Message Date
Matt Wozniski
7f6f1723a2 Use strdisplaywidth where available
In vim 7.3, the strdisplaywidth function was added to give an accurate
count of the number of screen columns that will be taken up by a given
string.  Tabular was written before vim 7.3, and was implementing this
functionality itself (at least for tabs; it wasn't trying to handle
doublewide characters).

This changeset allows us to take advantage of strdisplaywidth where it
exists.
2012-10-21 23:03:13 -04:00
Matt Wozniski
dadab80e82 GTabularize tweaks 2012-09-11 00:33:47 -04:00
Matt Wozniski
df28fbc369 Refactoring for GTabularize 2012-09-05 00:37:32 -04:00
Matt Wozniski
4894d4add2 First attempt at GTabularize 2012-09-04 23:37:58 -04:00
Matt Wozniski
5dd9b4c9e4 Add license info to tabular.vim 2012-05-03 20:53:54 -04:00
Matt Wozniski
4b543cda52 Rewrite of s:SplitDelim
The original implementation had some serious problems with delimiters
that were allowed to match with zero-width.  This should correct
https://github.com/godlygeek/tabular/issues/3 - please let me know if
you find any regressions!
2011-03-28 01:35:37 -04:00
Matt Wozniski
ae01c3df35 Add a function for testing s:SplitDelim 2011-03-28 01:34:44 -04:00
Matt Wozniski
f4d460ea92 Revert "Alternate strategy for empty first column"
Per tpope:
"I just discovered the second of the two tabular fixes I gave you
doesn't work properly if the delimiter is at the very beginning of the
line...  [It] pretended the leading whitespace was part of the padding,
which doesn't help if there's no leading whitespace."

This reverts commit 16f7b1e204.
2010-01-27 00:21:13 -05:00
Tim Pope
16f7b1e204 Alternate strategy for empty first column 2009-12-20 18:09:36 +08:00
Tim Pope
c5fcca78ab Don't add leading space in empty first column 2009-12-20 15:39:39 +08:00
Matt Wozniski
ae157f4a06 Make sure we don't remove all leading indent
The 'remove trailing spaces from first field' logic backfired if the
first field was all whitespace.
2009-03-09 17:25:14 -04:00
Matt Wozniski
d28a1791ea Handle functions that return a:lines
The logic to clear a:lines and replace it with the return of the
function failed pretty miserably when the function returned a:lines.  It
cleared a:lines and then replaced it with the (now empty) elements.
2009-03-03 21:43:31 -05:00
Matt Wozniski
ef55d4b6eb Initial commit 2009-03-03 01:20:14 -05:00