use vim's search pattern in Tabularize #19

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

jceb commented Jan 11, 2013

  • also set vim's search pattern when a pattern was provided to Tabularize
  • this makes :Tabularize behave more like a tightly integrated vim feature, e.g. :g
use vim's search pattern if no pattern is specified
- also set vim's search pattern when a pattern was provided to Tabularize
- this makes :Tabularize behave more like a tightly integrated vim feature, e.g. :g
Owner

godlygeek commented Jan 28, 2013

I'm considering this. I'm not sure if this is the right place to put this change - s:ParsePattern() is called from 2 places, AddTabularPattern() and Tabularize(). This logic might make sense for :Tabularize, but I'm not sure about :AddTabularPattern - in particular, whether :AddTabularPattern foo /bar/ should change @/.

This would be a pretty big behavior change - people may have existing maps, etc that don't change affect their search pattern today but would if we made this change. The other concern is that there's a (maybe undocumented?) feature of :Tabular - if you run :Tab foo, the 'foo' is remembered, so the next time you run :Tab with no arguments, 'foo' gets reused. This would break that feature, at least for tabular pipelines.

That said there are definitely some strong arguments to be made for integrating tabular with @/ - I'll need to think about this a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment