You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
As a summary: I've got some scripting to execute shell inline and pull in the results.
{{{exec-raw echo foo
foo
}}}
This is kind of edge case - the docs just specify stuff after the {{{ as "extra information", and in practice the vimscript implementation just drops it into the HTML after escaping entities, while the vim plugin itself treats it (or the last word in it?) as a filetype hint for syntax highlighting. That is: This might be my problem to fix; I'm overloading ill-defined behavior to suit a customization.
Still, I'd probably expect a <pre> tag here, maybe just one with <pre class="exec-raw echo foo"> or something based on how it behaves for a simpler case like {{{php?
Input:
This sets up an index used by [[file:~/.vimrc]]'s `dictionary` option:
{{{exec-raw cd ~/notes && make indices
sqlite3 metadata.db 'SELECT page FROM pages WHERE page NOT LIKE "log/%" AND page NOT LIKE "diary/%"' > vimwiki-index
pinboard tags | sort > pinboard-tag-index
sort vimwiki-index pinboard-tag-index | uniq > tag-index
wc -l tag-index
5230 tag-index
}}}
Check:
{{{exec-raw cd ~/notes && sqlite3 ~/notes/metadata.db 'select count(*) from pages; select count(*) from links;'
4515
19540
}}}
vimwiki-rs output:
<p>This sets up an index used by <ahref="~/.vimrc.html">file:~/.vimrc</a>'s <code>dictionary</code> option:</p><p>{{{exec-raw cd ~/notes && make indices pinboard tags | sort > pinboard-tag-index sort vimwiki-index pinboard-tag-index | uniq > tag-index wc -l tag-index 5040 tag-index }}}</p><p>Check:</p><p>{{{exec-raw cd ~/notes && sqlite3 ~/notes/metadata.db 'select count(<spanid="scripts-) from pages; select count("></span><strong>) from pages; select count(</strong>) from links;' 3926 16531 }}}</p>
vimscript output:
<p>
This sets up an index used by <ahref="/home/brennen/.vimrc">file:~/.vimrc</a>'s <code>dictionary</code> option:
</p><preexec-rawcd~/notes && make indices>
pinboard tags | sort > pinboard-tag-index
sort vimwiki-index pinboard-tag-index | uniq > tag-index
wc -l tag-index
5040 tag-index
</pre><p>
Check:
</p><preexec-rawcd~/notes && sqlite3 ~/notes/metadata.db 'select count(*) from pages; select count(*) from links;'>
3926
16531
</pre>
The text was updated successfully, but these errors were encountered:
I wasn't aware that this was a format acceptable for vimwiki code blocks. The
reason it isn't outputting <pre> is because the parser doesn't recognize it
as such.
Not that this would make much sense to you, but this is the parser for the start of a code block. It assumes {{{lang?( key="value")*.
I wasn't aware that this was a format acceptable for vimwiki code blocks. The reason it isn't outputting <pre> is because the parser doesn't recognize it as such.
That's probably reasonable. The behavior could probably stand to be better defined in the plugin and docs, but I'm essentially just wedging something into a corner case of the implementation. (It's possible a few others are doing something similar following my example, but it's never been an official thing.) I wouldn't worry about this one much; I can adjust accordingly.
Anyway, something like
{{{language exec="foo"
}}}
...wouldn't be quite as concise, but it has the advantage of being more explicit.
At 5443ff1.
As a summary: I've got some scripting to execute shell inline and pull in the results.
This is kind of edge case - the docs just specify stuff after the
{{{
as "extra information", and in practice the vimscript implementation just drops it into the HTML after escaping entities, while the vim plugin itself treats it (or the last word in it?) as a filetype hint for syntax highlighting. That is: This might be my problem to fix; I'm overloading ill-defined behavior to suit a customization.Still, I'd probably expect a
<pre>
tag here, maybe just one with<pre class="exec-raw echo foo">
or something based on how it behaves for a simpler case like{{{php
?Input:
vimwiki-rs output:
vimscript output:
The text was updated successfully, but these errors were encountered: