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

Visual mode isn’t working 😢 #407

Open
mikeal opened this issue Dec 12, 2019 · 6 comments
Open

Visual mode isn’t working 😢 #407

mikeal opened this issue Dec 12, 2019 · 6 comments
Labels

Comments

@mikeal
Copy link

mikeal commented Dec 12, 2019

I’m pretty stumped on this one.

The plugin is installed and working fine in normal mode but not in visual mode. In visual mode the selected text is simply removed on typing the first c, presumably because it’s hitting the “change” command in visual mode even though it shouldn’t because I hit the leader key first.

I even checked :vmap and everything looks right.

x  ,cu           <Plug>NERDCommenterUncomment
x  ,cb           <Plug>NERDCommenterAlignBoth
x  ,cl           <Plug>NERDCommenterAlignLeft
x  ,cy           <Plug>NERDCommenterYank
x  ,cs           <Plug>NERDCommenterSexy
x  ,ci           <Plug>NERDCommenterInvert
x  ,cn           <Plug>NERDCommenterNested
x  ,cm           <Plug>NERDCommenterMinimal
x  ,c<Space>     <Plug>NERDCommenterToggle
x  ,cc           <Plug>NERDCommenterComment
v  gx            <Plug>NetrwBrowseXVis
x  <Plug>NERDCommenterUncomment * :call NERDComment("x", "Uncomment")<CR>
x  <Plug>NERDCommenterAlignBoth * :call NERDComment("x", "AlignBoth")<CR>
x  <Plug>NERDCommenterAlignLeft * :call NERDComment("x", "AlignLeft")<CR>
x  <Plug>NERDCommenterYank * :call NERDComment("x", "Yank")<CR>
x  <Plug>NERDCommenterSexy * :call NERDComment("x", "Sexy")<CR>
x  <Plug>NERDCommenterInvert * :call NERDComment("x", "Invert")<CR>
x  <Plug>NERDCommenterNested * :call NERDComment("x", "Nested")<CR>
x  <Plug>NERDCommenterMinimal * :call NERDComment("x", "Minimal")<CR>
x  <Plug>NERDCommenterToggle * :call NERDComment("x", "Toggle")<CR>
x  <Plug>NERDCommenterComment * :call NERDComment("x", "Comment")<CR>
v  <Plug>NetrwBrowseXVis * :<C-U>call netrw#BrowseXVis()<CR>
@mikeal
Copy link
Author

mikeal commented Dec 12, 2019

I removed my entire .vimrc and got it working with the default leader \ but if I just add the one line to set the leader I get the same problem. Being that it’s pretty common to bind , to the leader key I’m quite surprised I’m the only person seeing this issue though :/

@alerque alerque added the bug label Dec 13, 2019
@alerque
Copy link
Member

alerque commented Dec 13, 2019

Are you able to use your , leader with two-character mappings in visual mode that trigger other plugins? It does seem like it shouldn't matter what the leader is...that's kind of the point of having a leader key and not just hard coding a character.

@carlos-cabgj
Copy link

I'm having the same problem using GVIm 8

@alerque
Copy link
Member

alerque commented Jan 13, 2020

@carlos-cabgj Same question to you. I can't duplicate this issue yet...

@supikachu
Copy link

@mikeal You should keep holding the key in visual mode, When you press the c .

@Young1783
Copy link

@mikeal You should keep holding the key in visual mode, When you press the c .

That works for me. Thx a lot!!!

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

5 participants