zed
zed copied to clipboard
Expand `log` to `console.log()`
Check for existing issues
- [X] Completed
Is your feature request related to a problem?
In JetBrains’ tooling, in JS and TS, you can type log
then hit tab
and it will expand to console.log()
. It’s a small thing, but it’s so nice. We should see if we can add this feature. Maybe this calls for some generic system that allows you to define, per language, maps that link some input text into an expanded form.
Describe the solution you'd like
https://user-images.githubusercontent.com/19867440/205404075-3ebdb865-7651-41e8-81cb-019fee3f87d6.mov
If applicable, add mockups / screenshots to help present your vision of the feature
No response
It is called "Live Templates" in IntellJ. Really useful thing, need it in zed
We need generalized version of this. So each user can add their own shortcut to boost productivity 🚀
yep, live templates and postfixes are amazing features from the intellij platform, and if zed would implement something similar that would be an amazing productivity boost
I'm attaching a couple screenshots from both live templates, which can be invoked directly, or if there is a $SELECTION$
block they can also be used to wrap code in refactors; and postfix expressions, which allows configuring custom templates to replace the code when invoking .expression
@ushankax @Pringlers it would be nice to 👍🏻 this issue if you think this is a nice feature 🙂
It might be possible to achieve this already with an LSP snippet, similar to https://github.com/zed-industries/feedback/issues/566#issuecomment-1273791513
Bumping as this is one little thing that makes me miss VSCode. It's just muscle memory but such a time saver!
bumping this.