expansions.asciidoc: Add an example of file expansion.
Properly speaking, all expansions are of the form "%abc{}" where "abc" is the expansion type. All expansion types are listed in the documentation, as they should be. However, when searching through the documentation, a keyword like "file" is likely to hit a lot of false-positives, so a smart user is likely to search for the more-unique "%file" instead. Unfortunately, unlike every other expansion-type, file-expansions did not include an example, so a search for "%file" resulted in no hits, potentially leading people to believe it was undocumented. Now there's an example, so people searching for "%file" will find what they're looking for.
This commit is contained in:
parent
d79b005323
commit
14573244d4
|
@ -171,6 +171,13 @@ Kakoune uses a shell command, such as the `|`, `!` or `$` normal mode commands
|
||||||
Expansions with the type `file` will expand to the content of the filename
|
Expansions with the type `file` will expand to the content of the filename
|
||||||
given in argument as read from the host filesystem.
|
given in argument as read from the host filesystem.
|
||||||
|
|
||||||
|
For example, this command stores the entire content of `/etc/passwd` into the
|
||||||
|
`a` register.
|
||||||
|
|
||||||
|
----
|
||||||
|
set-register a %file{/etc/passwd}
|
||||||
|
----
|
||||||
|
|
||||||
== Value expansions
|
== Value expansions
|
||||||
|
|
||||||
Expansions with the type `val` give access to Kakoune internal data that is
|
Expansions with the type `val` give access to Kakoune internal data that is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user