About the quickpanel
Hi everyone,
I am getting confused with the new quickpanel (C-r) to access sections and labels. I have mostly two questions:
-
When I open the "goto anything" panel with
C-r, I would expect to see only the current sections and paragraph, in the file I am currently editing. If I want to see all of them, I would just use the project-wide search with^C-R. It seems to me this behavior is something that has changed recently, can you confirm? -
When I open the panel with
C-rto access labels in the project, I need to manually enable the "Show Labels" toggle. But I don't see an option in the config file to show them by default. Did I miss something? Is it possible to do so?
Cheers.
- Yes there is a new panel to overwrite
C-r#779. You can disable this behavior in the settings, but still access this panel viaC-l, C-r. I personally like that more than the usualC-randC-shift-r, because it fits better to the document structure (correct section ordering, only sections inside the document, ...). - This is currently not possible, but it would be easy to add a keybinding argument.
- I like the new panel as well, but I would have liked to have "two" versions of it. One that shows the sections of the current file only (useful to navigate quickly within a file), and one "global" to the project that allows to navigate between the files (and which would override
C-shift-r). - Might I suggest also to provide a "quickpanel" for the references only? E.g. to quickly jump to a figure or a table, I just want to navigate through the list of labels. Right now it's kinda "mixed" together with the sections and I feel that these should be separate entities.
-
You could just disable it to use the default locally and map this to
C-shift-r:{ "keys": ["ctrl+shift+r"], "command": "latex_toc_quickpanel", "context": [ { "key": "selector", "operator": "equal", "operand": "text.tex" } ] }, -
There is already a function to search for arbitrary commands. Press
ctrl+shift+pand writeLaTeXTools: Search for commands in documentafterwards provide a comma separated list of commands. This will open a similar navigation panel. You could also bind it to a keybinding and pass commands, e.g.:{ "keys": ["ctrl+l", "ctrl+s"], "command": "latex_search_command", "args": { "commands": ["label", "ref", "autoref", "cite"] }, "context": [ { "key": "selector", "operator": "equal", "operand": "text.tex.latex" } ] },
- Good idea! The default quickpanel mixes sections and labels by defaults now, so it's not ideal either, but still better fits my needs.
- Hmm this doesn't have the same feeling. Using the
latex_search_command, I need to know the exact name of the reference, figure or table I want to jump to. I cannot use fuzzy search, preview the surrounding latex code, etc. I was simply suggesting an option to "hide" the section from your new quickpanel, to show only the labels and navigate between them.
The latex_search_command also jumps to the command in the document and you can also use fuzzy search. In fact it just shows a little different item text and is missing the toggles. I actually just wrote it to demonstrate the navigation quickpanel used for the C-r command.

Ok, I missed this because I was typing the name of the label directly (fig:), and it was not showing any result. If I type the command label instead, it indeed opens the quickpanel as you showed. This is super useful, thank for pointing that out!
Hi,
I think after a while that neither the new C-r panel nor the sublime default fits my need. I would like to quickly navigate between the section of my currently open file. With the C-r panel provided by LaTeXTools, I can do that but globally, i.e. across my different .tex files. With the sublime default C-r panel, I see not only the sections of the current file, but also all the labels defined in this file (including figures and so on).
I can workaround a little bit using the latex_search_command you showed above, to search for "section", "subsection", ..., but the results doesn't look as nice as the C-r panel provided by LaTeXTools.
I was wondering if it would be possible to provide an option or a command to have the LaTeXTools C-r panel hide sections which do not belong to the currently opened file?
Adding an option to the command to limit it to the current file should be possible and reasonable.