You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm trying to define nice key bindings for LaTeX Workshop's various commands. The one I'm working on now is latex-workshop.wrap-env, which wraps the selection in \begin{}...\end{} and puts multiple cursors on the two }s so you can type the environment name. This is naturally an operation for Visual Mode, but afterwards I want to be in Insert Mode. The only way I know to do that is to type <Esc>i.
Describe the solution you'd like
I'd like to bind keys to execute a command and then simulate some keystrokes.
Describe alternatives you've considered
It seems that after keys are executed beforecommands instead of after, which is when I want these keys to execute. This is what I tried:
Probably both times to execute keys are useful, so in addition to after we could have another property (afterCommands?).
Additional context
I'm worried that the commands are executed asynchronously and it's not easy to know when they're done. But hopefully that isn't the case? I could try to implement this if you agree it's useful and could give some pointers on where this happens.
The text was updated successfully, but these errors were encountered:
Thank you! I didn't realize all these commands existed because they aren't listed in Ctrl-Shift-P. { "before": [ "\\", "b" ], "commands": [ "latex-workshop.wrap-env", "extension.vim_escape", "extension.vim_insert" ]} works well.
This seems like a pretty good solution, so perhaps we should just mention the existence of these commands in documentation.
Is your feature request related to a problem? Please describe.
I'm trying to define nice key bindings for LaTeX Workshop's various commands. The one I'm working on now is
latex-workshop.wrap-env
, which wraps the selection in\begin{}...\end{}
and puts multiple cursors on the two}
s so you can type the environment name. This is naturally an operation for Visual Mode, but afterwards I want to be in Insert Mode. The only way I know to do that is to type<Esc>i
.Describe the solution you'd like
I'd like to bind keys to execute a command and then simulate some keystrokes.
Describe alternatives you've considered
It seems that
after
keys are executed beforecommands
instead of after, which is when I want these keys to execute. This is what I tried:Probably both times to execute keys are useful, so in addition to
after
we could have another property (afterCommands
?).Additional context
I'm worried that the commands are executed asynchronously and it's not easy to know when they're done. But hopefully that isn't the case? I could try to implement this if you agree it's useful and could give some pointers on where this happens.
The text was updated successfully, but these errors were encountered: