jeetsukumaran / vim-buffergator

Vim plugin to list, select and switch between buffers.
498 stars 49 forks source link

Create <Plug> mappings #16

Closed stephenprater closed 12 years ago

stephenprater commented 12 years ago

move the mappings from global and done in a function into

mappings. Creates a dictionary that can be merged with a global dictionary to selectively override default mappings. also provides a "help screen" accessible from the buffergator that will tell you what your mappings currently are.
stephenprater commented 12 years ago

what was the poor performance? I'm not seeing a performance difference.

Of course, I extracted this out of a branch with a bunch of other feature, so it's possible I forgot some critically important bit when I was doing the patch.

jeetsukumaran commented 12 years ago

Hi Stephen, I actually liked all the enhancements. But I found a serious lag (sometimes up to a second or more) when selecting a buffer for opening, either using "", or any of the other keys (e.g., "o", "O"), before the buffer was actually opened. I thought at first it might be some key-mapping ambiguity/conflict, but this was not the case. I'm not sure what the root cause was. If you can replicate this issue, maybe you could look at it? Perhaps starting from commit 6e1626994d4f6be1858cfff58f7763d6d9b82e0b? I will try and troubleshoot this myself later when I have the time.

stephenprater commented 12 years ago

Figured it out. Apparently, the recursive maps wait on the expanded rhs - so where I have mappings named BuffergatorSelect and BuffergatorSelectGator - that's an ambiguous mapping. I tend to instinctively hit enter after entering a map, so I didn't notice it.

http://vim.1045645.n5.nabble.com/map-timeout-td1181381.html

Learn something new everyday. I have a patch for that, but am unsure of how to proceed? Do I need to rebase my topic branch against SHA: 6e16269 or submit a new PR or ?

jeetsukumaran commented 12 years ago

Hi Stephen,

Glad you fixed it!

One approach might be to revert all my reverts, then rebase your topic branch on this, then commit to the main branch. Maybe then use squash or something so all the reverts plus your fixes are one commit.

Another might be to rebase your topic branch on 6e16269, and then simply check out master and check out your topic branch version of the plugin on top of the master version (i.e., not a merge as such, but just clobbering it in).

What do you think?

stephenprater commented 12 years ago

Okay, I rebased onto SHA:6e16269 and then committed the fix into the topic branch.

It's on the plug_mappings branch - you might be able to merge it in if you reopen?

jeetsukumaran commented 12 years ago

How do you reopen a merge request? Is this possible? If not, maybe you could merge into master and issue a pull request?

stephenprater commented 12 years ago

I haven't forgotten about this - I just wanted to use it for a while before I resubmitted to make sure there's not any other little gotchas like that.