I'm trying to map ctrl+click event to generic navigation for java types using YouCompleteMe plugin. There's plugin command to do that:
:YcmCompleter GoTo it navigates to "most sensible" place for type under cursor: https://github.com/ycm-core/YouCompleteMe#the-goto-subcommand:
This command tries to perform the "most sensible" GoTo operation it can
This is my
nnoremap <buffer> <C-LeftMouse> :YcmCompleter GoTo<CR>
It's working but with one exception: it doesn't change cursor position before performing
GoTo command, e.g. if the cursor is located on one type and I'm clicking another type, it will open first type. It seems that I'm doing something wrong here. I need first move cursor to clicking position and then execute the command, or maybe I'm doing something wrong here and vim has another way to implement such feature. How to implement it correctly?