Comments (5)
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.
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.
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.
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.
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)
- Is it possible to develop support for Dart HOT 2
- new featrue want HOT 3
- command 'print-it.PrintIt' not found HOT 3
- how to escape curly braces `{` ? HOT 3
- It's not possible to set template for python with usuing f-string HOT 5
- Place PrintIt statement after multiline block not inside it. HOT 1
- [FEATURE REQUEST] use Python Icecream package instead, or optional HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-print-it.