From 6f44057d09b865e9c7e443cd7d7adb8e541121db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 31 Mar 2017 12:20:17 +0200 Subject: vis: add non-default actions for vi compatible n/N motions The following key mappings should result in the vi behavior: :map! normal n :map! normal N The default remains unchanged, that is `n` (`N`) always searches towards the end (start) of the file. Fix #470 --- vis-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 9cc26f3..e50a788 100644 --- a/vis-core.h +++ b/vis-core.h @@ -169,6 +169,7 @@ struct Vis { Mode *mode_before_prompt; /* user mode which was active before entering prompt */ char search_char[8]; /* last used character to search for via 'f', 'F', 't', 'T' */ int last_totill; /* last to/till movement used for ';' and ',' */ + int search_direction; /* used for `n` and `N` */ int tabwidth; /* how many spaces should be used to display a tab */ bool expandtab; /* whether typed tabs should be converted to spaces */ bool autoindent; /* whether indentation should be copied from previous line on newline */ -- cgit v1.2.3