diff --git a/README.md b/README.md index 339a1e0b..0a1bf95d 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ Press ? in `nnn` to see the list anytime. →, ↵, l, ^M Open file/enter dir . Toggle show hidden / Filter Ins, ^I Toggle nav-as-you-type b Pin current dir ^V Go to pinned dir - ^B Leader key LeaderN Switch to context N + `, ^/ Leader key LeaderN Switch to context N Esc Exit prompt ^L Redraw, clear prompt ^G Quit and cd q Quit context Q, ^Q Quit ? Help, settings @@ -245,7 +245,7 @@ Help & settings, file details, media info and archive listing are shown in the P #### Leader key -The Leader key ^B provides a powerful multi-functional navigation mechanism. It is case-sensitive and understands contexts, bookmarks and handy location shortcuts. +The Leader key (` or ^/) provides a powerful multi-functional navigation mechanism. It is case-sensitive and understands contexts, bookmarks and handy location shortcuts. | Key | Function | |:---:| --- | @@ -266,6 +266,8 @@ Contexts serve the purpose of exploring multiple directories simultaneously. 4 c - other used contexts are underlined - rest are unused +To switch to a context press the Leader key followed by the context number (1-4). + The first time a context is entered, it copies the state of the last visited context. Each context remembers its start directory and last visited directory. When a context is quit, the next active context is selected. If the last active context is quit, the program quits. diff --git a/nnn.1 b/nnn.1 index 4ebb392e..b07a134f 100644 --- a/nnn.1 +++ b/nnn.1 @@ -63,7 +63,7 @@ Toggle navigate-as-you-type mode Pin current directory .It Ic ^V Visit pinned directory -.It Ic ^B +.It Ic `, ^/ Leader key .It Ic LeaderN Switch to context N @@ -199,8 +199,8 @@ to change to the last visited directory on quit requires shell integration in a few easy steps. Please visit the project page (linked below) for the instructions. .Sh CONTEXTS -Contexts (aka \fItabs\fR aka \fIworkspaces\fR) serve the purpose of exploring multiple directories -simultaneously. 4 contexts are available. The status of the contexts are shown in the top left corner: +Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts +are available. The status of the contexts are shown in the top left corner: .Pp - the current context is in reverse .br @@ -208,7 +208,7 @@ simultaneously. 4 contexts are available. The status of the contexts are shown i .br - rest are unused .Pp -The key prompt understands contexts. To switch contexts press \fI^B\fR and enter the context number (1-4). +To switch to a context press the Leader key followed by the context number (1-4). .Pp The first time a context is entered, it copies the state of the last visited context. Each context remembers its start directory and last visited directory. .Pp diff --git a/src/nnn.c b/src/nnn.c index 03b421cf..bcc54b22 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1371,7 +1371,7 @@ static int parsebmstr() ++bms; /* - * Use single-char keys to use ^B like vim Leader key. + * Use single-char keys to combine with Leader key. * Fail here to ensure keys are single char. * To support multiple char keys remove the return * and add appropriate check to enable smart-detect. @@ -1976,7 +1976,7 @@ static int show_help(char *path) "4→, ↵, l, ^M Open file/enter dir . Toggle show hidden\n" "e/ Filter Ins, ^I Toggle nav-as-you-type\n" "eb Pin current dir ^V Go to pinned dir\n" - "d^B Leader key LeaderN Switch to context N\n" + "a`, ^/ Leader key LeaderN Switch to context N\n" "cEsc Exit prompt ^L Redraw, clear prompt\n" "d^G Quit and cd q Quit context\n" "aQ, ^Q Quit ? Help, settings\n" diff --git a/src/nnn.h b/src/nnn.h index b98592d8..9e2ce902 100644 --- a/src/nnn.h +++ b/src/nnn.h @@ -150,7 +150,8 @@ static struct key bindings[] = { /* Last visited dir */ { '-', SEL_CDLAST, "", "" }, /* Leader key */ - { CONTROL('B'), SEL_LEADER, "", "" }, + { CONTROL('_'), SEL_LEADER, "", "" }, + { '`', SEL_LEADER, "", "" }, /* Mark a path to visit later */ { 'b', SEL_PIN, "", "" }, /* Visit marked directory */