mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Use the term Leader key
This commit is contained in:
parent
81380ff8d4
commit
784ed6fefe
|
@ -218,7 +218,7 @@ Press <kbd>?</kbd> in `nnn` to see the list anytime.
|
||||||
→, ↵, l, ^M Open file/enter dir . Toggle show hidden
|
→, ↵, l, ^M Open file/enter dir . Toggle show hidden
|
||||||
/ Filter Ins, ^I Toggle nav-as-you-type
|
/ Filter Ins, ^I Toggle nav-as-you-type
|
||||||
b Pin current dir ^V Go to pinned dir
|
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
|
Esc Exit prompt ^L Redraw, clear prompt
|
||||||
^G Quit and cd q Quit context
|
^G Quit and cd q Quit context
|
||||||
Q, ^Q Quit ? Help, settings
|
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
|
#### Leader key
|
||||||
|
|
||||||
The Leader key <kbd>^B</kbd> provides a powerful multi-functional navigation mechanism. It is case-sensitive and understands contexts, bookmarks and handy location shortcuts.
|
The Leader key (<kbd>`</kbd> or <kbd>^/</kbd>) provides a powerful multi-functional navigation mechanism. It is case-sensitive and understands contexts, bookmarks and handy location shortcuts.
|
||||||
|
|
||||||
| Key | Function |
|
| Key | Function |
|
||||||
|:---:| --- |
|
|:---:| --- |
|
||||||
|
@ -266,6 +266,8 @@ Contexts serve the purpose of exploring multiple directories simultaneously. 4 c
|
||||||
- other used contexts are underlined
|
- other used contexts are underlined
|
||||||
- rest are unused
|
- 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.
|
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.
|
When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
|
||||||
|
|
8
nnn.1
8
nnn.1
|
@ -63,7 +63,7 @@ Toggle navigate-as-you-type mode
|
||||||
Pin current directory
|
Pin current directory
|
||||||
.It Ic ^V
|
.It Ic ^V
|
||||||
Visit pinned directory
|
Visit pinned directory
|
||||||
.It Ic ^B
|
.It Ic `, ^/
|
||||||
Leader key
|
Leader key
|
||||||
.It Ic LeaderN
|
.It Ic LeaderN
|
||||||
Switch to context N
|
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
|
few easy steps. Please visit the project page (linked below) for the
|
||||||
instructions.
|
instructions.
|
||||||
.Sh CONTEXTS
|
.Sh CONTEXTS
|
||||||
Contexts (aka \fItabs\fR aka \fIworkspaces\fR) serve the purpose of exploring multiple directories
|
Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
|
||||||
simultaneously. 4 contexts are available. The status of the contexts are shown in the top left corner:
|
are available. The status of the contexts are shown in the top left corner:
|
||||||
.Pp
|
.Pp
|
||||||
- the current context is in reverse
|
- the current context is in reverse
|
||||||
.br
|
.br
|
||||||
|
@ -208,7 +208,7 @@ simultaneously. 4 contexts are available. The status of the contexts are shown i
|
||||||
.br
|
.br
|
||||||
- rest are unused
|
- rest are unused
|
||||||
.Pp
|
.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
|
.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.
|
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
|
.Pp
|
||||||
|
|
|
@ -1371,7 +1371,7 @@ static int parsebmstr()
|
||||||
++bms;
|
++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.
|
* Fail here to ensure keys are single char.
|
||||||
* To support multiple char keys remove the return
|
* To support multiple char keys remove the return
|
||||||
* and add appropriate check to enable smart-detect.
|
* 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"
|
"4→, ↵, l, ^M Open file/enter dir . Toggle show hidden\n"
|
||||||
"e/ Filter Ins, ^I Toggle nav-as-you-type\n"
|
"e/ Filter Ins, ^I Toggle nav-as-you-type\n"
|
||||||
"eb Pin current dir ^V Go to pinned dir\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"
|
"cEsc Exit prompt ^L Redraw, clear prompt\n"
|
||||||
"d^G Quit and cd q Quit context\n"
|
"d^G Quit and cd q Quit context\n"
|
||||||
"aQ, ^Q Quit ? Help, settings\n"
|
"aQ, ^Q Quit ? Help, settings\n"
|
||||||
|
|
|
@ -150,7 +150,8 @@ static struct key bindings[] = {
|
||||||
/* Last visited dir */
|
/* Last visited dir */
|
||||||
{ '-', SEL_CDLAST, "", "" },
|
{ '-', SEL_CDLAST, "", "" },
|
||||||
/* Leader key */
|
/* Leader key */
|
||||||
{ CONTROL('B'), SEL_LEADER, "", "" },
|
{ CONTROL('_'), SEL_LEADER, "", "" },
|
||||||
|
{ '`', SEL_LEADER, "", "" },
|
||||||
/* Mark a path to visit later */
|
/* Mark a path to visit later */
|
||||||
{ 'b', SEL_PIN, "", "" },
|
{ 'b', SEL_PIN, "", "" },
|
||||||
/* Visit marked directory */
|
/* Visit marked directory */
|
||||||
|
|
Loading…
Reference in a new issue