Skip to content
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

Removing marks seems broken #101

Closed
alexlafroscia opened this issue Nov 14, 2015 · 24 comments
Closed

Removing marks seems broken #101

alexlafroscia opened this issue Nov 14, 2015 · 24 comments
Assignees
Labels

Comments

@alexlafroscia
Copy link

I can place a mark using, for example, me (which is just part of the default Vim behavior). However, deleting a mark through dme does not work, it just moves to the end of the next word (like e normally would).

@kshenoy
Copy link
Owner

kshenoy commented Nov 15, 2015

That's weird. It works at my end. What is the output of :map dm?

Also, I moved some files around recently. Can you try completely uninstalling and reinstalling it and see if that helps.

@alexlafroscia
Copy link
Author

The output of :map dm is:

n dm * :<C-U>call signature#utils#Remove(v:count)<CR>

Also, I use vim-plug to handle plugins so I know that it's up to date.

@kshenoy
Copy link
Owner

kshenoy commented Nov 18, 2015

Ok, I'm unable to reproduce this.

Can you try starting vim with only Signature and see if the issue still exists? Try this gvim -Nu <(echo 'set rtp+=~/.vim/bundle/vim-signature/')

If yes, then tell me the output of echo b:sig_marks after you try place the mark me and also after you execute dme

@kshenoy kshenoy self-assigned this Nov 18, 2015
@alexlafroscia
Copy link
Author

After me:

{'5': 'e'}

After dme:

{}

It doesn't seem to have a problem when using just vim-signature. I wonder which other plugin is conflicting... I can start searching but it'll take a while.

@ilaipi
Copy link

ilaipi commented Dec 21, 2015

@alexlafroscia Hello, is it solved? I use https://github.com/wklken/k-vim and this trouble me too.

@alexlafroscia
Copy link
Author

No, I haven't dug into which other vim plugin is messing with things.

@lord
Copy link

lord commented Dec 26, 2015

Have this problem, too! Using neovim. Seems to occur when I don't have other plugins installed, but I just switched back to vim after ~3 years of sublime, so maybe I'm just doing something wrong. Also using vim-plug.

@kshenoy
Copy link
Owner

kshenoy commented Dec 28, 2015

@lord Do you get it even when Signature is the only thing installed? Test it with gvim -N u <(echo 'set rtp+=~/.vim/bundle/vim-signature') -U NONE

Replace ~/.vim/bundle/vim-signature with wherever you're installing plugins if you're not using the standard settings.

@nedbat
Copy link

nedbat commented Dec 28, 2015

Removing marks works for me (using mm to set and also mm to remove), until somehow it stops working. I wish I had more information for you.

@lord
Copy link

lord commented Jan 1, 2016

@kshenoy Hmm, like I said, using neovim, which doesn't appear to have -N or-U` flags, at least in the man page? I tried uninstalling all other plugins, and it was still happening.

@kshenoy
Copy link
Owner

kshenoy commented Jan 7, 2016

@lord Ah, ok. I'm not familiar with Neovim myself. If you guys could let me know how to reproduce this then I'd appreciate it but till then I can't help but sit here twiddling my thumbs

@nedbat
Copy link

nedbat commented Jan 7, 2016

@kshenoy it happened to me again, so I grabbed the output of ":map", then restarted vim, and got the output of ":map" again. The difference is that all of the vim-signature bindings are gone:

14,15d13
< n  '[          * :<C-U>call signature#mark#Goto("prev", "line", "alpha")<CR>
< n  ']          * :<C-U>call signature#mark#Goto("next", "line", "alpha")<CR>
54,57d51
< n  [=          * :<C-U>call signature#marker#Goto("prev", "any",  v:count)<CR>
< n  [-          * :<C-U>call signature#marker#Goto("prev", "same", v:count)<CR>
< n  [`          * :<C-U>call signature#mark#Goto("prev", "spot", "pos")<CR>
< n  ['          * :<C-U>call signature#mark#Goto("prev", "line", "pos")<CR>
140,143d133
< n  ]=          * :<C-U>call signature#marker#Goto("next", "any",  v:count)<CR>
< n  ]-          * :<C-U>call signature#marker#Goto("next", "same", v:count)<CR>
< n  ]`          * :<C-U>call signature#mark#Goto("next", "spot", "pos")<CR>
< n  ]'          * :<C-U>call signature#mark#Goto("next", "line", "pos")<CR>
187,188d176
< n  `[          * :<C-U>call signature#mark#Goto("prev", "spot", "alpha")<CR>
< n  `]          * :<C-U>call signature#mark#Goto("next", "spot", "alpha")<CR>
216d203
< n  dm          * :<C-U>call signature#utils#Remove(v:count)<CR>
242,249d228
< n  m?          * :<C-U>call signature#marker#List()<CR>
< n  m/          * :<C-U>call signature#mark#List("buf_curr")<CR>
< n  m<BS>       * :<C-U>call signature#marker#Purge()<CR>
< n  m<Space>    * :<C-U>call signature#mark#Purge("all")<CR>
< n  m-          * :<C-U>call signature#mark#Purge("line")<CR>
< n  m.          * :<C-U>call signature#mark#ToggleAtLine()<CR>
< n  m,          * :<C-U>call signature#mark#Toggle("next")<CR>
< n  m           * :<C-U>call signature#utils#Input()<CR>

I don't know what makes it happen though.

@kshenoy
Copy link
Owner

kshenoy commented Jan 8, 2016

@nedbat Ok, the fact that the whole thing goes kaput helps. It looks like to avoid conflicts with NerdTree, I delete all mappings when entering a NerdTree pane and recreate upon exiting it. Are you doing anything of that sort?

EDIT: I tried loading vim with only Signature and NerdTree and tried switching back and forth between a regular and a nerdtree pane to see if I can shake something up which will prevent the mappings from getting recreated. However, I'm sad (happy?) to say that nothing of that sort happened : /

@nedbat
Copy link

nedbat commented Jan 8, 2016

I do use NerdTree. I can pay attention to what might be happening there.

@bcoady
Copy link

bcoady commented Feb 9, 2016

I too was having conflicts with NerdTree. I commented out these two lines in Signature.vim and it all seems to work well now.


"    autocmd BufEnter,FileType * if (&filetype ==? 'nerdtree') | call signature#utils#Maps('remove') | endif
"    autocmd BufLeave * if (&filetype ==? 'nerdtree') | call signature#utils#Maps('create') | endif

These lines were attempting to delete and recreate the mappings when entering and leaving NerdTree, except they didn't work when opening a new buffer from NerdTre

@nedbat
Copy link

nedbat commented Feb 10, 2016

@bcoady I'm trying to reproduce the problem using NerdTree, but I'm not seeing it. The behavior with a new buffer in a new gvim is the same as after I open a new buffer from NerdTree.

@Hans-Guenter
Copy link

There is an unbalance betweeen the autocommands for removing and creating the mappings.
The autocommand for removing acts on filetypes nerdtree and netrw while the latter only on the nerdtree one.
The corresponding autocommand should read:
autocmd BufLeave * if ( (&filetype ==? 'nerdtree')
\ || (&filetype ==? 'netrw')
\ )
| call signature#utils#Maps('create')
| endif

@kshenoy
Copy link
Owner

kshenoy commented Feb 19, 2016

@Hans-Guenter You're right. Thanks for spotting that :)

EDIT: Fixed in 8b7b400

@kshenoy kshenoy added the bug label Apr 9, 2016
@kshenoy
Copy link
Owner

kshenoy commented Apr 9, 2016

Closing this as I assume it's been dealt with. Feel free to reopen if required.

@kshenoy kshenoy closed this as completed Apr 9, 2016
@iscekic
Copy link

iscekic commented May 8, 2016

@kshenoy I'm having this issue while using vim-nerdtree-tabs, it goes away when I jump to the NerdTree buffer and then back to the file.

@kshenoy
Copy link
Owner

kshenoy commented May 11, 2016

Hey @Torwori I'm very busy with work now. I'll take a look at this during the weekend.

If you have a way to reproduce this every time, can you please elaborate?

@iscekic
Copy link

iscekic commented May 11, 2016

I've since removed nerdtree-tabs, but basically none of the expected
bindings (eg. dma) would work in a newly opened tab unless I entered and
exited the nerdtree buffer first.

On Wednesday, May 11, 2016, Kartik Shenoy [email protected] wrote:

Hey @Torwori https://github.com/Torwori I'm very busy with work now.
I'll take a look at this during the weekend.

If you have a way to reproduce this every time, can you please elaborate?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#101 (comment)

@laishulu
Copy link

laishulu commented May 30, 2016

the problem can be reproduced following my description in #3

@kshenoy
Copy link
Owner

kshenoy commented May 30, 2016

Please refer to my response for a workaround. I'm kind of tired of dancing around this issue and will probably just go down this path permanently since I can't think of a better way to deal with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants