I noticed that the behavior in Sublime Text 4 seems to have changed in the latest release. Previously I could hit F12 to bring up all the definitions of a symbol with a little pop-up showing a list of all instances. I could preview them all using the arrow keys to navigate and then hit ESC to return from where I came. It seems that since the latest version, hitting escape lands me on whichever page I was previewing. Previously this would require me pressing "enter". Does anyone know if this is now a setting or how I can get the old functionality back?
I ended up finding one workaround based on koe's suggestion. It seems like if you switch tabs before hitting escape, Sublime exhibits the desired behavior. With this in mind I tried to bind a keystroke to switch tabs and the issue the "cancel" command and it worked.
I bound this command chain to the "escape" key and it has restored my workflow. I'm not sure if this will have implications for using escape in another context but I'll update if I find out anything else.
{ "keys": ["escape"],
"command": "chain",
"args": {
"commands": [
["next_view_in_stack"],
["cancel"],
]
}
},
EDIT: Above version doesn't handle ctrl+p followed by esc. Also doesn't allow find panel to be close by escape. Was able to modify it to be more targeted.
{ "keys": ["escape"],
"command": "chain",
"args": {
"commands": [
["next_view_in_stack"],
["prev_view_in_stack"],
["cancel"],
]
},
"context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "panel_has_focus", "operator": "equal", "operand": false }
]
},