Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to map Ctrl + mouse click to a command:
nnoremap <C-???> :YcmCompleter GoTo<CR>
Is it possible to do that using nnoremap? What symbol should I use for that?
You are looking for this which I found at the bottom of :h keycodes:
nnoremap <C-LeftMouse> :echom 'Foo'<CR>
And according to :h <LeftMouse> you also need to check that set mouse contains a or n
This would work:
nnoremap <C-LeftMouse> <LeftMouse>:YcmCompleter GoTo<CR>
Add another <CR> at the end to go to the first result
Required, but never shown