A new variable for current file's content #57
Replies: 4 comments 21 replies
-
My opinion is that:
|
Beta Was this translation helpful? Give feedback.
-
And for the actual topic: I think it's a good time to implement this new variable in Edit 2021-12-10: Postponed due to some problems, but will be implemented later. |
Beta Was this translation helpful? Give feedback.
-
I'm now using this command to copy cat "{{!file_path:relative}}" | sed -e '/^---$/,/^---$/d' -e '0,/^$/{//d}' |
Beta Was this translation helpful? Give feedback.
-
New variables for
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@FelipeRearden mentioned an idea about a new variable named
{{NoteContent}}
in a discussion about making{{selection}}
variable to select text automatically if nothing is selected.I have been thinking about this, too, but haven't so far made a decision about it. One reason why I did not yet see this so important, was the ability to use something like
cat {{file_path:absolute}}
(on Linux) to get access to the current file's content. But this approach has the YAML problem that you Felipe mentioned. So a YAMLless option is needed.Naming is also one big questionmark to me still. I'm considering the following options, but these are not any kind of decisions yet:
{{file_content}}
: Give the whole content, including YAML. Belongs to the same family with{{file_name}}
and{{file_path}}
.{{content}}
: Give content without YAML. Belongs to the same family with{{title}}
.{{yaml_content}}
: Give only YAML. Alternative ideas:{{frontmatter_content}}
,{{headers}}
. These would be more agnostic regarding the markup language as they do not mention YAML.{{yaml:variablename}}
: More on this idea in it's own discussion here: {{yaml_value:property_name}} variable #56 . I just mentioned it here because name collision should be avoided.Beta Was this translation helpful? Give feedback.
All reactions