From 9e53e005524a87b1c92a19c5972beb269a17d60a Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 22 Jun 2017 12:43:46 +0300 Subject: [PATCH 1/2] doc: Mention the proper environment variable for pagers --- doc/manpages/faq.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manpages/faq.asciidoc b/doc/manpages/faq.asciidoc index fbf6ea99..ed724d86 100644 --- a/doc/manpages/faq.asciidoc +++ b/doc/manpages/faq.asciidoc @@ -46,7 +46,7 @@ report the issue on the bug tracker). Can I use Kakoune as a pager ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Kakoune can be used as a pager, either by setting the `EDITOR` environment +Kakoune can be used as a pager, either by setting the `PAGER` environment variable to `kak`, or by writing data directly to its standard input using a shell pipeline. However, since the program relies on several heavy dynamic libraries (`boost` being one of them), it will be slightly less practical From f57a4e589e873ff75b058b7cff38a2bc128b8487 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 22 Jun 2017 12:44:47 +0300 Subject: [PATCH 2/2] doc: Explain why `a` modifies the selection and `i` doesn't --- doc/manpages/faq.asciidoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/manpages/faq.asciidoc b/doc/manpages/faq.asciidoc index ed724d86..d80ffa6d 100644 --- a/doc/manpages/faq.asciidoc +++ b/doc/manpages/faq.asciidoc @@ -191,3 +191,16 @@ In order to open buffers in the same window simultaneously using `tmux` (or one of the supported multiplexers), run Kakoune in a `tmux` session, and simply use the `:new` command to spawn new clients as you would have otherwise in an X11 environment. + +Why does `a` extend the current selection, but `i` leaves it untouched ? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Selections are ranges of characters whose delimiters are an "anchor" and +a "cursor", and inserting characters is always done before the cursor in +insert mode. + +Consequently, using the append primitive (`a`) nudges the cursor forward to +make room for characters, effectively extending the current selection since +the anchor remains immobile, even when the anchor and the cursor are at the +same location. By opposition, using the insert primitive (`i`) merely adds +characters before the cursor, which never modifies the current selection.