From 14573244d41677b1b84d7fe75def2e393a820b62 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Wed, 1 Jul 2020 23:47:06 +1000 Subject: [PATCH] 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. --- doc/pages/expansions.asciidoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/pages/expansions.asciidoc b/doc/pages/expansions.asciidoc index f64a7caed..67e0f55a3 100644 --- a/doc/pages/expansions.asciidoc +++ b/doc/pages/expansions.asciidoc @@ -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 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 Expansions with the type `val` give access to Kakoune internal data that is