2

Is there a way to disable all mappings for vim-go? So I can only have the mappings that I explicitly set myself?

2

Yes, there are settings for that, see :help go-settings for a list of all settings.

In particular, the ones you're probably interested in are:

let g:go_def_mapping_enabled = 0

Maybe also:

let g:go_doc_keywordprg_enabled = 0

And perhaps also:

let g:go_textobj_enabled = 0

(Not sure if these were the mappings you had in mind... Since they're essentially overriding default Vim keybindings in a way to make them more effective when editing Go source code.)

You can also check the Vimscript source code to check which mappings exactly are being set (controlled by these options) in case you want to create separate mappings using different key combinations for them.

  • 2
    I glanced at the docs and only saw the first one... i wish there was the standard g:go_maps_enabled to just disable them all. – D. Ben Knoble Sep 9 at 12:07
  • 1
    yeah @D.BenKnoble that's what I was looking for as well, I kinda wish this was standard practice with vim plugins - so you could only use the mapping that you explicitly set – lsimmons Sep 14 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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