1
noremap <leader>gdf :YcmCompleter\ GoToDefinition<cr>
noremap <leader>gdc :YcmCompleter\ GoToDeClaration<cr>
noremap <leader>gi :YcmCompleter\ GoToInclude<cr>
noremap <leader>gs :YcmCompleter\ GoToSymbol<cr>
noremap <leader>gt :YcmCompleter\ GoToType<cr>
noremap <leader>gr :YcmCompleter\ GoToReferences<cr>

None of them works. I get this error message:

ValueError: Supported commands are:
GetDoc
GetType
GoTo

I ran python3 install.py --clangd-completer. The command :YcmCompleter GoToInclude does work in a c source file. But the keymap I set does not work. So I think it is not due to an incomplete installation.

2
  • 7
    Do you really need the \ in the right hand side of your mapping? Usually you don't need to escape spaces there and that might be the cause of the issue. Also have a look at how to debug a mapping maybe you'll find something interesting. And finally you should use mode specific map commands like nnoremap it will save you some troubles in the long run.
    – statox
    Feb 18, 2021 at 15:52
  • 1
    Welcome to Vi and Vim!
    – filbranden
    Feb 18, 2021 at 17:02

1 Answer 1

1

As @statox says, I remove the \, then it works.

Not the answer you're looking for? Browse other questions tagged or ask your own question.