aboutsummaryrefslogtreecommitdiff
path: root/vis-core.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-31 12:20:17 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-03-31 12:31:23 +0200
commit6f44057d09b865e9c7e443cd7d7adb8e541121db (patch)
tree85306ea233bcf9acb62fbe95f7f050ab59344880 /vis-core.h
parent9c48a188a51a971d65a6ce764733745fd163f017 (diff)
downloadvis-6f44057d09b865e9c7e443cd7d7adb8e541121db.tar.gz
vis-6f44057d09b865e9c7e443cd7d7adb8e541121db.tar.xz
vis: add non-default actions for vi compatible n/N motions
The following key mappings should result in the vi behavior: :map! normal n <vis-motion-search-repeat> :map! normal N <vis-motion-search-repeat-reverse> The default remains unchanged, that is `n` (`N`) always searches towards the end (start) of the file. Fix #470
Diffstat (limited to 'vis-core.h')
-rw-r--r--vis-core.h1
1 files changed, 1 insertions, 0 deletions
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 */