-
Notifications
You must be signed in to change notification settings - Fork 76
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
Conflicts with NERDTree menu ('m' key) #3
Comments
Hey, I need to figure out how to disable the mapping of 'm' specifically in the NERDTree buffer. However, I'm really busy with school now and I don't know when I'll be able to do it. However, for the moment, you can set |
I looked how vim-showmarks did this as I recall them not having the issue (I ran it for a while but didn't like it as well as vim-signature). It appears it has a config variable I don't have a lot of time myself to try to fix and submit a pull request, but if you don't get time in the near future, I'll take a stab at it. Thanks for your reply. |
Hey, thanks for the tip. I'd come across that when first going through vim-showmarks but didn't feel a need for it so left it out. Anyway, implemented your suggestion and checked in as dev branch. Currently it only checks if buftype=nofile. Give it a try and let me know if it works properly. Will extend it for help and quickfix etc. if nothing is broken when I get some breathing space ;) |
I checked out dev and it fixed Nerdtree. Thanks for making the time to fix it. I'll let you know if I find any other conflicting window types. |
Hi, The fix introduced in this issue seems to be removed with this commit. Is there a way to disable vim-signature in NERDTree buffer to avoid having a delay on the |
Haha, that was almost 2 years ago :D Anyway, can you give it a try now? |
Awesome! It works now, thanks. :) |
Oh well… when opening, closing, and opening again NERDTree, I have the following error:
Patched it like this, what do you think? (Added diff --git a/plugin/signature.vim b/plugin/signature.vim
index 9d72002..04f0fa4 100644
--- a/plugin/signature.vim
+++ b/plugin/signature.vim
@@ -50,8 +50,8 @@ if has('autocmd')
autocmd!
autocmd BufEnter,CmdwinEnter * call signature#sign#Refresh()
autocmd CursorHold * if g:SignaturePeriodicRefresh | call signature#sign#Refresh() | endif
- autocmd BufEnter,FileType * if (&filetype ==? 'nerdtree') | call signature#utils#Maps('remove') | endif
- autocmd BufLeave * if (&filetype ==? 'nerdtree') | call signature#utils#Maps('create') | endif
+ autocmd BufEnter,FileType * if (&filetype ==? 'nerdtree') | silent! call signature#utils#Maps('remove') | endif
+ autocmd BufLeave * if (&filetype ==? 'nerdtree') | silent! call signature#utils#Maps('create') | endif
augroup END
endif |
Oops, forgot a |
Perfect! |
Here to reproduce the problem I met:
|
@chenhouwu Hi, I'm able to reproduce this at my end too. Thanks for helping me get to the bottom of this. Looks like when you press That is what I use to recreate maps for Signature upon leaving the NerdTree buffer. And the only reason to create and remove maps is because of the conflicting If yes, add the following to your .vimrc:
and delete the following lines from vim-signature/plugin/signature.vim:
This should at least help you avoid this issue. |
I like this solution. Simple and effective. But modify the source code is not optimal, because I want to keep up with the latest codes, and local modification will prevent it if without additional care. Is it possible to delete them in the official repository and describe this solution on the README? |
I just traced the events using the following codes.
and found: 1). I open vim without open any file, I input on item
2). I then navigate to the
3). I then navigate to the
|
I'd like to think about it a little more before I go down this route. Thanks for expanding and describing the two cases. I was wondering why this wasn't seen earlier. I guess it's pretty rare that someone would do something like you described in case 1 i.e. open NERDTree and jump back to the same buffer using NERDTree itself. It sounds like a bug in NERDTree since any behavior that depends on BufLeave will not get triggered. Please report it there; they might be interested in knowing about it. |
@chenhouwu, I read your this reply and wanted to make sure that I understood you correctly. Are you seeing both |
@kshenoy I furtherly traced the event in a more verbose way, and updated this comment |
Hi @chenhouwu I deleted that code in cfa6452 since I haven't heard back from NERDTree yet. |
When vim-signature is installed, I am unable to toggled NERDTree's menu (m key). I tried setting g:SignatureDefaultMappings = 0, but that didn't work.
The text was updated successfully, but these errors were encountered: