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
VSCode issue on macOS #675
Comments
Additional finding that might be relevant: it seems to be dependent on the Language Mode of the current editor within VSCode. For Javascript files, the expansions work perfectly, as expected. Same goes for Plaintext. However, when setting the language mode to Markdown (or opening a .md file) the expansions seem to be partially interrupted. As an example, I have this config:
When typing :date in a plaintext file, I get the expected result:
However, when typing in a markdown file, I am left with this result:
Note: It does look like the full expansion flashes on the screen VERY briefly, after the trigger text, but is then truncated to the result above. Also, I have the Markdown All in One extension installed. Uninstalling it seems to fix this behavior but I'm hopeful that there is a way to have my cake and eat it too, and that the potential fix will also help the other users who originally reported this bug. Thanks for building and maintaining a great tool! |
Hey @trenaryja, Thanks for reporting this issue! Probably, that combination of language+extension is interfering with the way Espanso injects the replacements. In the meanwhile, could you please try with the global_vars:
- name: date
type: date
params:
format: "%F"
matches:
- trigger: ":date"
force_clipboard: true
replace: "{{date}}" Cheers :) |
Hey @federico-terzi! Thanks for the quick response! Sadly that didn't change the behavior. Thanks for giving it a shot though! I definitely understand how there's no easy and immediate solution since a VSCode extension could be doing who-knows-what under the hood. Creating an Espanso extension would be AMAZING though, definitely keeping my fingers crossed for that sometime in the future 😄. In the meantime, I simply trigger the match somewhere else and quick copy-paste it where I need it. Still ultra handy! |
@trenaryja Sounds good! Thank you :) |
MacOS Catalina / Visual Studio Code Version: 1.64.2 |
That totally worked for me, as well! Thanks for maintaining a great project. |
VSCode is the only place where I can't use espanso effectively, for the problems outlined about -- partial erasure of the trigger and a corresponding partial pasting of the replacement. @trenaryja 's observation about language mode seems to be right -- the language mode (and especially markdown) is my problem (and I write a lot of MD...). Confirmed that in the same setup, writing in a JS file, replacements work perfectly (although small test :-) ). Confirmed as well that espanso is brilliant -- I have a great setup and it is a huge productivity booster! |
Couldn't manage without Espanso - many thanks! |
Is this still a problem, or has it been fixed with |
@smeech: For me, it still seems to have some issues with or without these options (I am on M1 with Ventura 13.6.4 and VS Code 1.87.2). For example, here is my
Typing
or
Typing
However, in a
I am guessing that some internal processing of VS Code files (or my Python/Markdown config/plugins) affects all of it. For now, my typical workaround is to run the trigger in Sublime Text and copy the match from there, or at least run it in a new blank VS Code tab that does not have any selected language mode (like Python or Markdown). |
Thank you - that's helpful in clarifying the problem. The different behaviour depending on the FileType does tend to suggest the issue is more to do with the way VSCode formats its input, than Espanso per se. If the behaviour is consistent, it may be possible to format the replacement text to do what you want. E.g. you could try quoting the block-scalars to give you more control, with newlines etc.. |
Please note, |
Some users reported problems with VSCode on macOS:
See: #544 (comment) and #544 (comment)
The text was updated successfully, but these errors were encountered: