From 8b0f423d4d95aaa165b687a687b4651401040986 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Mon, 24 Oct 2022 18:42:31 +0300 Subject: [PATCH] (mini.ai) Update docs to consistently use `'prev'` search method. --- doc/mini-ai.txt | 14 +++++++------- lua/mini/ai.lua | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/mini-ai.txt b/doc/mini-ai.txt index f3104689..1c38755c 100644 --- a/doc/mini-ai.txt +++ b/doc/mini-ai.txt @@ -404,7 +404,7 @@ Default values: -- How to search for object (first inside current line, then inside -- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev', - -- 'cover_or_nearest', 'next', 'previous', 'nearest'. + -- 'cover_or_nearest', 'next', 'prev', 'nearest'. search_method = 'cover_or_next', } < @@ -466,16 +466,16 @@ Possible values are: - `'cover_or_prev'` - use covering match. If not found, use previous. - `'cover_or_nearest'` - use covering match. If not found, use nearest. - `'next'` - use next match. -- `'previous'` - use previous match. +- `'prev'` - use previous match. - `'nearest'` - use nearest match. Note: search is first performed on the reference region lines and only after failure - on the whole neighborhood defined by `config.n_lines`. This -means that with `config.search_method` not equal to `'cover'`, "previous" -or "next" textobject will end up as search result if they are found on -first stage although covering match might be found in bigger, whole -neighborhood. This design is based on observation that most of the time -operation is done within reference region lines (usually cursor line). +means that with `config.search_method` not equal to `'cover'`, "prev" or +"next" textobject will end up as search result if they are found on first +stage although covering match might be found in bigger, whole neighborhood. +This design is based on observation that most of the time operation is done +within reference region lines (usually cursor line). Here is an example of what `a)` textobject is based on a value of `'config.search_method'` when cursor is inside `bbb` word: diff --git a/lua/mini/ai.lua b/lua/mini/ai.lua index e49a3947..4a998100 100644 --- a/lua/mini/ai.lua +++ b/lua/mini/ai.lua @@ -443,16 +443,16 @@ end --- - `'cover_or_prev'` - use covering match. If not found, use previous. --- - `'cover_or_nearest'` - use covering match. If not found, use nearest. --- - `'next'` - use next match. ---- - `'previous'` - use previous match. +--- - `'prev'` - use previous match. --- - `'nearest'` - use nearest match. --- --- Note: search is first performed on the reference region lines and only --- after failure - on the whole neighborhood defined by `config.n_lines`. This ---- means that with `config.search_method` not equal to `'cover'`, "previous" ---- or "next" textobject will end up as search result if they are found on ---- first stage although covering match might be found in bigger, whole ---- neighborhood. This design is based on observation that most of the time ---- operation is done within reference region lines (usually cursor line). +--- means that with `config.search_method` not equal to `'cover'`, "prev" or +--- "next" textobject will end up as search result if they are found on first +--- stage although covering match might be found in bigger, whole neighborhood. +--- This design is based on observation that most of the time operation is done +--- within reference region lines (usually cursor line). --- --- Here is an example of what `a)` textobject is based on a value of --- `'config.search_method'` when cursor is inside `bbb` word: @@ -497,7 +497,7 @@ MiniAi.config = { -- How to search for object (first inside current line, then inside -- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev', - -- 'cover_or_nearest', 'next', 'previous', 'nearest'. + -- 'cover_or_nearest', 'next', 'prev', 'nearest'. search_method = 'cover_or_next', } --minidoc_afterlines_end