Ctrl+Q stay fixed on selected item?

So Ctrl+Q either gives a popup, or opens a new tab describing the struct, interface etc of the what was selected when Ctrl+Q was pressed. What I'm wondering is if there's a way for this documentation to stay fixed to that struct/interface, unless I tell it otherwise (i.e. by pressing Ctrl+Q on a different struct/interface)?

Right now the default behavior is to automatically change to the documentation of whatever is clicked. This makes filling in structs really annoying when you want to make reference to the names, types etc of a struct (because as soon as I start typing about a component of the struct I want to be reading about, it starts giving me the details of the component I'm typing in).

2 comments
Comment actions Permalink

From the looks of it, you are trying to fill in a structure fields. The IDE can do that automatically by invoking Alt+Enter inside the variable, e.g. ` v := myStruct{<caret>}`. Move the cursor at `<caret>` position then press Alt+Enter, and select `Fill Struct` or `Fill Struct Recursively`.

From 2019.2 (now in EAP), you'll also be able to select which fields you want to fill, see the blog post of the announcement.

Does this solve the problem you had with the quick documentation?

0
Comment actions Permalink

You can open quick documentation as a tool window and disable the `Auto-update from Source` option (it is shown if you click on the gear in the quick documentation tool window).

0

Please sign in to leave a comment.