Closed dusty-phillips closed 4 years ago
Rather than creating another command to remember why not handle the behavior based on context.
redo = ContextAction(default=Key("c-y"), actions=[
# Use cs-z for rstudio
(AppContext(executable="rstudio"), Key("cs-z")),
])
I'm not sure how that would work in this case. In most editors, I want both behaviours available -- for example, in VS code's commit editor, "shock" inserts a new line, but "stun" submits the commit. That's how github's comment editor works on the web as well. On the other hand, in my company's chat program, "shock" submits a single line by default, but if you want to insert a new line, use "stun".
On the other hand, some programs, like slack, use shift+enter
to insert a new line where enter
submits the message by default. So are you proposing a "submit" command that would be set to ctrl+enter in vscode, enter in slack, and ctrl+enter in chrome if visiting the github page, wherease a "newline" command would be set to "enter" by default, but "shift+enter" in slack and "ctrl+enter" in if visiting facebook in chrome?
On the other hand, some programs, like slack, use
shift+enter
to insert a new line whereenter
submits the message by default. So are you proposing a "submit" command that would be set to ctrl+enter in vscode, enter in slack, and ctrl+enter in chrome if visiting the github page, wherease a "newline" command would be set to "enter" by default, but "shift+enter" in slack and "ctrl+enter" in if visiting facebook in chrome?
Yes
I believe this one is already handled by fly shock
. We need to have a really good reason to introduce single syllable specs as they are notorious for misrecognition. Please close if you don't disagree.
I wasn't aware that fly worked with shock. now that I see how the modifier choices work, I realize a lot of my own custom commands could be covered by them. Thanks.
@dusty-phillips the docs may not yet reflect the modifiers works that @alexboche did. If that's the case, please feel free to work on it!
stun
command for control enterDescription
Insert a ctrl+enter into the editor.
Motivation and Context
Several applications and web sites use ctrl+enter for inserting a new line without submitting a form or for submitting a form instead of a newline (go figure). I use it in the VSCode commit editor, github input boxes, facebook, and my work chat application.
I chose
stun
for it's analogy toshock
How Has This Been Tested
I've been using it for a while in several applications.
Types of changes
Checklist
Note: I didn't update the documentation because "shock" is only seen in the cheat sheet, and I'm reluctant to change the layout in a LaTeX document.
Maintainer/Reviewer Checklist