allow {py} or {} instead of {python} in .qmd files #9177
dfolch
started this conversation in
Show and Tell
Replies: 2 comments
-
This is a really slick trick! Let me warn people here that we haven't tested this, and it might break some functionality (such as autocompletion in IDEs, code highlighting in rendering, etc). Maybe some of it works (by a happy accident), but if you're going to do that, we can't guarantee that all built-in Python functionality will work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you use VS Code, you can also use a custom snippet to safe on keystrokes
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
The new inline code feature added in 1.4 is amazing. However, typing out
{python}
all the time in.qmd
files can get annoying.Add the following to the YAML to create a
py
alias for python.This will allow the following syntax to work.
You can use the following if you want to shorten the syntax to
{}
. Note: this only works for code chunks, not inline code within Markdown.Beta Was this translation helpful? Give feedback.
All reactions