-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unwanted spaces added at each invocation #41
Comments
I have run into the same issue. The problem is, that all spaces at the start of a line are not trimmed. So another issue which arises is, given
and doing a
But then it is impossible to get back to left-alignment for the first column. |
A walk around is :Tab /|/l0l1 |
This is the same issue as was reported in #21 - the fix for which never appears to have gotten merged. Can you try testing out the fix there (the trim_1st_field branch) for a few days and see if it solves this problem without adding any new ones? |
I put it into canaaerus/tabular/master for installing with Vundle. |
I just switched branch and will use this version now. But, just like
canaaerus, I hardly ever ran into this issue. Well, we’ll see.
Thank you very much!
|
Trying the branch trim_1st_field, I ran into the following problem. |
That is true. An empty first column will grow by one space on every call of |
Thank you for your message, @godlygeek, I switched shortly after. But I recently encountered another corner case. Calling #define longmacro \
macro first line \
macro second line \
yet another line \
and the end yields: #define longmacro \
macro first line \
macro second line \
yet another line \
and the end instead of the expected (and working on #define longmacro \
macro first line \
macro second line \
yet another line \
and the end Maybe it is just that the first field should be trimmed only on the right-hand side? |
This is not a corner case for me; it's what our code base is full of. I have noticed that switching gvim into visual, selecting a block, and doing gq sometimes causes some lines to be improperly indented, similar to the 'and the end' line in the second box above. Perhaps part of Tabular's problem here is an underlying vim bug. I don't know enough to know if this is even relevant information, but do so because it might be. |
Fixes this issue with "indent creep": godlygeek/tabular#41
Fixes this issue with "indent creep": godlygeek/tabular#41
Starting with a buffer containing:
and running
Tab /|
, I get:as expected. But running it again on the same buffer, I get:
Each successive run adds a new space:
etc.
If all lines contain nothing or all contain something before the
|
, everything behaves as expected.The text was updated successfully, but these errors were encountered: