Vim-go: Jump to definition

Created on 18 Sep 2015  路  2Comments  路  Source: fatih/vim-go

With gd I'm able to jump to the definition and it's awesome. I'm used to use ], CTRL-W_] etc when working in C. Would it make sense to instruct vim to behave similar with Go and also eg ] as gd etc?

Most helpful comment

Hi @op

You can do it yourself very easily :) We have already mappings, so just create your own custom mappings. For example the following example is from the README:

au FileType go nmap <Leader>ds <Plug>(go-def-split)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>dt <Plug>(go-def-tab)

We also have <Plug>(go-def) which opens it in the current window. So just assign your custom mapping for it.

All 2 comments

Hi @op

You can do it yourself very easily :) We have already mappings, so just create your own custom mappings. For example the following example is from the README:

au FileType go nmap <Leader>ds <Plug>(go-def-split)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>dt <Plug>(go-def-tab)

We also have <Plug>(go-def) which opens it in the current window. So just assign your custom mapping for it.

Btw if you think there is a bug, we can reopen the issue and discuss it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MattFlower picture MattFlower  路  4Comments

preslavmihaylov picture preslavmihaylov  路  3Comments

smontazeran picture smontazeran  路  4Comments

cassiobotaro picture cassiobotaro  路  3Comments

joeblubaugh picture joeblubaugh  路  3Comments