Giter VIP home page Giter VIP logo

Comments (5)

bmalehorn avatar bmalehorn commented on August 22, 2024 2

Ah yep, good catch. I've now updated it to fix Python, Ruby, and Erb files.

Closing out this issue since the feature is now available.

from vscode-print-it.

bmalehorn avatar bmalehorn commented on August 22, 2024

I think this is a reasonable idea - I figure people will want to customize the function.

I want to make it general enough that people could put :, =, or whatever they want after the variable. And they should be able to change the logging function. What would you think of templating settings like this?

"print-it.javascriptreact.template": "console.log('{{escaped}} :', {{raw}});"

The templating language would probably use micromustache: https://github.com/userpixel/micromustache

Would you like a setting like that?

from vscode-print-it.

yalin avatar yalin commented on August 22, 2024

Sounds like a great way of doing it. It will also allow people not to strained with : or =.
Moreover, it can be added to other languages on request too.
Thanks for the modification though.

from vscode-print-it.

bmalehorn avatar bmalehorn commented on August 22, 2024

Alright, it's now live! The above config should work, and see https://github.com/bmalehorn/vscode-print-it#templating for more documentation.

Does it work as expected?

from vscode-print-it.

yalin avatar yalin commented on August 22, 2024

image

Javascript works perfectly, thank you!
But there is a problem with Python (I tested, brackets are forgotten by default. I put the brackets and it worked) and Ruby I guess (I don't know Ruby)
FYI

from vscode-print-it.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.