Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing key bindings for toggling options in the find/replace panels #1447

Open
mattst opened this issue Oct 9, 2016 · 1 comment
Open

Comments

@mattst
Copy link

mattst commented Oct 9, 2016

Enhancement

The existing Default (OS).sublime-keymap files have key bindings to toggle the following options in the find/replace panels:

Toggle Regex:              Command: toggle_regex
Toggle Case Sensitive:     Command: toggle_case_sensitive
Toggle Whole Word:         Command: toggle_whole_word
Toggle Preserve Case:      Command: toggle_preserve_case

However there are no key bindings to toggle the following options in the find/replace panels.

There is no documentation (official or unofficial) about them at all, as far as I can tell, and no mention of them anywhere (toggle_in_selection excepted) apart from the posts I have made about them in the Sublime Text forum and in an issue on the Sublime Text Unofficial Documentation Github repository.

I only managed to find them by guessing the command names with a trial-and-error approach.

Find/Replace Panel Options - Not Documented Anywhere AFAICT
-----------------------------------------------------------
Toggle Wrap:               Command: toggle_wrap
Toggle In Selection:       Command: toggle_in_selection
Toggle Highlight Matches:  Command: toggle_highlight
Toggle Show Context:       Command: toggle_show_context
Toggle Use Buffer:         Command: toggle_use_buffer

I suggest key bindings are added for all of these options to the existing Default (OS).sublime-keymap files.

For example:

// Key bindings for toggling wrap in find / replace panels.
{ "keys": ["alt+p"], "command": "toggle_wrap", "context":
    [
        { "key": "setting.is_widget", "operator": "equal", "operand": true }
    ]
},

// Key bindings for toggling in selection in find / replace panels.
{ "keys": ["alt+s"], "command": "toggle_in_selection", "context":
    [
        { "key": "setting.is_widget", "operator": "equal", "operand": true }
    ]
},

// Key bindings for toggling highlight matches in find / replace panels.
{ "keys": ["alt+h"], "command": "toggle_highlight", "context":
    [
        { "key": "setting.is_widget", "operator": "equal", "operand": true }
    ]
},

// Key bindings for toggling show context in find / replace in files panel.
{ "keys": ["alt+t"], "command": "toggle_show_context", "context":
    [
        { "key": "setting.is_widget", "operator": "equal", "operand": true }
    ]
},

// Key bindings for toggling use buffer in find / replace in files panel.
{ "keys": ["alt+b"], "command": "toggle_use_buffer", "context":
    [
        { "key": "setting.is_widget", "operator": "equal", "operand": true }
    ]
},

Hope this helps.

@mattst
Copy link
Author

mattst commented Jun 7, 2017

Please note that I have written a ST (version 2 and 3) plugin to add the key bindings, see: Missing Find Panel Keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants