Coc.nvim: Question about coc-rename

Created on 16 Apr 2020  路  2Comments  路  Source: neoclide/coc.nvim

Hi! I'm loving coc so far, thought I'm a bit new to Neovim/VimScript. I see in the docs it suggests this remapping for coc-rename:

" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)

However, when I type comma+r+n in normal mode (comma is my ), Vim replaces the character under my cursor with n instead of prompting me to rename the symbol.

Can someone help me figure out what I'm doing wrong? I doubt this is any sort if issue with coc, but thought I'd ask anyway. Thanks in advance!

Most helpful comment

@dylanirlbeck Hey I was facing the same issue, and in my case it turned out that I hadn't defined my leader early enough in my file so it was using the old value of the leader key, not the new one I set (at the bottom of my file). :verbose nmap didn't show the mapping, so I was confused as to why this was happening. I just moved my leader key to the top of my config file.

Either that or another plugin is superseding the mapping.

Hope this helps!

All 2 comments

:verbose nmap

@dylanirlbeck Hey I was facing the same issue, and in my case it turned out that I hadn't defined my leader early enough in my file so it was using the old value of the leader key, not the new one I set (at the bottom of my file). :verbose nmap didn't show the mapping, so I was confused as to why this was happening. I just moved my leader key to the top of my config file.

Either that or another plugin is superseding the mapping.

Hope this helps!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaskRay picture MaskRay  路  3Comments

lanox picture lanox  路  3Comments

andys8 picture andys8  路  3Comments

skylite21 picture skylite21  路  3Comments

svenstaro picture svenstaro  路  4Comments