sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
811 stars 39 forks source link

[Documentation] Update the key bindings docs to include new context keys introduced in 4xxx builds. #4063

Open UltraInstinct05 opened 3 years ago

UltraInstinct05 commented 3 years ago

Problem description

The key bindings docs over at https://www.sublimetext.com/docs/key_bindings.html don't yet cover the new context keys introduced in 4xxx builds.

Preferred solution

Add the new context keys to the docs. Here's a summary of them

Key Operand Operators Match All Description Added in
"overlay_has_focus" boolean equality no Whether the overlay currently open, has focus. 4082
"overlay_name" string equality no The name of the overlay. Valid values are "goto" & "command_palette" 4082
"group_has_multiselect" boolean equality no Whether the currently focused group has multi selected tabs. 4050
"group_has_transient_sheet" boolean equality no Whether the currently focused group has a transient sheet. 4050
"has_snippet" boolean equality no Whether the immediate word before the cursor can be expanded to a snippet. 4050
"is_javadoc" boolean equality yes 4050

Alternatives

None

Additional Information (optional)

ST Version: ST Build 4101 (dev) OS: Windows 10 Build 10.0.19041 Architecture: 64bit Processor: Intel64 Family 6 Model 126 Stepping 5, GenuineIntel

deathaxe commented 3 years ago

is_javadoc is supported by core??? Interesting.

UltraInstinct05 commented 3 years ago

@deathaxe Yes image

deathaxe commented 3 years ago

I don't think multiline block comments are related to javadoc by nature. Even Java distinghuishes them.

No JavaDoc

/*
 *
 */

JavaDoc

/**
 *
 */

In both one might want to add the leading * on each line, Or it being deleted once the line is joined with the previous one :-)

Without double checking it, I'd say the preceding_text pattern together with selector should be enough.

UltraInstinct05 commented 3 years ago

The only reference I have to what the is_javadoc context key probably does is this https://discord.com/channels/280102180189634562/280157083356233728/780449702482542612