Getting YcmCompleter RefactorRename shortcut to work properly

126 views Asked by At

I would like to add shortcut for YcmCompleter RefactorRename command. Here is what I have so far:

nmap <leader>yrn :exe 'YcmCompleter RefactorRename '.input('refactor \"'.expand('<cword>').'\" to:')<cr>"

When I press shortcut, I see input prompt, but after I enter new name, operation fails with RuntimeError: Cannot rename the symbol under cursor.

If I run YcmCompleter RefactorRename newname in the same place, it works just fine. There seems to be a problem with my script

How do I get this to work?

0

There are 0 answers