Espanso: An inconsistent issue in VSCode's integrated terminal

Created on 20 Oct 2020  路  3Comments  路  Source: federico-terzi/espanso

Kapture 2020-10-20 at 08 27 31

My shortcut should expand from :git to git add . && git commit -m ""

As it's demonstrated in the GIF, the 1st and 2nd attempts work fine but the 3rd doesn't.

OS version: macOS 10.15.7
VSCode version: 1.50.1

It's worth mentioning that this issue doesn't happen when I'm using Espanso outside VSCode's terminal.

MacOS bug

All 3 comments

Hey @hos4m,
Thanks for reporting this issue! Could you try adding force_clipboard: true to your match and see if that helps?

  - trigger: ":git"
    force_clipboard: true
    replace: "git add . && git commit -m \"$|$\""

It seems like VSCode is not able to process espanso input fast enough, so this method should help.
Let me know if that improves the situation

Cheers :)

I added that and it seems like it fixes the issue.

Can I know more details about the force_clipboard attribute and if there is a way to enable it to all the shortcuts then if it will make replacing faster?

Thanks for the quick response!

Glad that worked out!

Can I know more details about the force_clipboard

Basically, that tells espanso to use the clipboard to inject the content instead of the default injection mechanism.

if there is a way to enable it to all the shortcuts then if it will make replacing faster?

Yes, you can enable the backend: Clipboard on a per-application basis, so only for VSCode. To do so, you need to create an app-specific configuration and there set:

filter_exec: "Visual Studio Code.app"

backend: Clipboard

Keep in mind that you may need to adjust those filters accordingly, and the docs explain how you can do that.
Let me know if you have other problems, for now I'm closing the issue.

Cheers :)

Was this page helpful?
0 / 5 - 0 ratings