-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Snippet wrap #94
Snippet wrap #94
Conversation
src/actions/wrap.py
Outdated
wrapper_snippets = { | ||
"else state": "cursorless.wrapper.ifElseStatementElseBranch", | ||
"if else": "cursorless.wrapper.ifElseStatementIfBranch", | ||
"if state": "cursorless.wrapper.ifStatement", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this term is configured independently from "if state" the scope type. Could be surprising to users but I wasn't sure of the right approach here because there are multiple ways to wrap something with an if statement and I could see people wanting to wrap differently from how they refer to scope type maybe? Also, fwiw, I have configured this to "if" for myself, because I think I can get away with shorter name than when it's used for a scope type
src/actions/wrap.py
Outdated
"else": "ifElseStatement/alternative", | ||
"if else": "ifElseStatement/consequence", | ||
"if": "ifStatement/consequence", | ||
"try": "tryCatchStatement/body", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the new <snippet name>/<variable name>
syntax here
See also cursorless-dev/cursorless#296