vim plugin open definition in a split not buffer#248
Conversation
Seems nicer for me? Opens a vertical split instead of a new buffer for the definition after 'gd'
|
Hi @bengesoff, -Phil |
|
I think could be a nice feature. Would it be possible to have both ? gd
|
|
The behavior of Vim's standard This can be achieved though by adding your own mappings. This works for a vertical split: nnoremap <buffer> gd :vsplit<CR> :call RacerGoToDefinition()<CR>Do that via an Personally I'm a fan of using the preview window which doesn't take my cursor out of the original file and can be dismissed consistently from anywhere with nnoremap <buffer> <LocalLeader><C-w>] :split<CR> :call RacerGoToDefinition()<CR>
" No native Vim equivalents of these:
nnoremap <buffer> <LocalLeader><C-v>] :vsplit<CR> :call RacerGoToDefinition()<CR>
nnoremap <buffer> <LocalLeader><C-t>] :tab split<CR> :call RacerGoToDefinition()<CR>Preview window equivalents (e.g. If there's general interest I can send a PR for the Racer README showing a few suggested mappings that follow native analogs. I don't think actually adding them to the plugin proper is a good idea, because a prefix like |
|
Thanks @ches, this is excellent information. A README PR would be most welcome. |
Seems nicer for me? Opens a vertical split instead of a new buffer for the definition after 'gd'