Skip to content
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

Expand log to console.log() #5096

Closed
1 task done
JosephTLyons opened this issue Dec 2, 2022 · 12 comments
Closed
1 task done

Expand log to console.log() #5096

JosephTLyons opened this issue Dec 2, 2022 · 12 comments
Labels
feature [core label] javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support

Comments

@JosephTLyons
Copy link
Collaborator

JosephTLyons commented Dec 2, 2022

Check for existing issues

  • 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

Screen.Recording.2022-12-02.at.6.03.26.PM.mov

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@JosephTLyons JosephTLyons added feature [core label] typescript TypeScript programming language support javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors labels Dec 2, 2022
@ushankax
Copy link

It is called "Live Templates" in IntellJ. Really useful thing, need it in zed

@Pringlers
Copy link

We need generalized version of this. So each user can add their own shortcut to boost productivity 🚀

@aexvir
Copy link
Contributor

aexvir commented Dec 14, 2022

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 🙂

capture-20221214093358
capture-20221214093304

@rkusa
Copy link

rkusa commented Dec 16, 2022

It might be possible to achieve this already with an LSP snippet, similar to https://github.com/zed-industries/feedback/issues/566#issuecomment-1273791513

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@mediabeastnz
Copy link

Bumping as this is one little thing that makes me miss VSCode. It's just muscle memory but such a time saver!

@plato-creative

This comment was marked as spam.

@monarcode
Copy link

Waiting desperately for snippet support

@jhoonyKorolkov
Copy link

This little thing still doesn’t work, come on guys, we’re really looking forward to it)

@SomeoneToIgnore
Copy link
Contributor

This is a part of #4611 actually and not sure how hard, but somebody have to work on this.

@SomeoneToIgnore SomeoneToIgnore closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
@JosephTLyons
Copy link
Collaborator Author

This week's release mentions how to configure this in the release notes for snippet support!

https://zed.dev/releases/stable/0.140.5

@bearfriend
Copy link

For anyone coming across this, the release notes are gone, but the Snippets docs have this exact request covered

@JosephTLyons
Copy link
Collaborator Author

Here are the release notes attached to the GitHub release: Zed.dev only goes back so far with the release history, but everything can be found in GitHub releases:

https://github.com/zed-industries/zed/releases/tag/v0.140.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature [core label] javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests