Support TAB to cycle contexts

This commit is contained in:
Arun Prakash Jana 2018-12-02 06:11:03 +05:30
parent d2c7a5a7cb
commit 8735f1691a
No known key found for this signature in database
GPG key ID: A75979F35C080412
4 changed files with 10 additions and 9 deletions

View file

@ -225,8 +225,8 @@ 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 ^W Go to pinned dir b Pin current dir ^W Go to pinned dir
d Toggle detail view ^T Next active context Tab, ^T Next active context d Toggle detail view
`, ^/ Leader key LeaderN Go to context N `, ^/ Leader key LeaderN Go to/create 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, config Q, ^Q Quit ? Help, config
@ -241,8 +241,8 @@ Press <kbd>?</kbd> in `nnn` to see the list anytime.
^F Extract archive m, M Brief/full media info ^F Extract archive m, M Brief/full media info
e Edit in EDITOR p Open in PAGER e Edit in EDITOR p Open in PAGER
ORDER ORDER
^J Toggle du mode S Toggle apparent size ^J Disk usage S Apparent du
s Toggle sort by size t Toggle sort by mtime s Size t Modification time
MISC MISC
o Launch GUI app !, ^] Spawn SHELL in dir o Launch GUI app !, ^] Spawn SHELL in dir
R Run custom script L Lock terminal R Run custom script L Lock terminal

2
nnn.1
View file

@ -66,7 +66,7 @@ Pin current directory
Visit pinned directory Visit pinned directory
.It Ic d .It Ic d
Toggle detail view Toggle detail view
.It Ic ^T .It Ic Tab, ^T
Next active context Next active context
.It Ic `, ^/ .It Ic `, ^/
Leader key Leader key

View file

@ -2049,8 +2049,8 @@ 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 ^W Go to pinned dir\n" "eb Pin current dir ^W Go to pinned dir\n"
"ed Toggle detail view ^T Next active context\n" "8Tab, ^T Next active context d Toggle detail view\n"
"a`, ^/ Leader key LeaderN Go to context N\n" "a`, ^/ Leader key LeaderN Go to/create 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, config\n" "aQ, ^Q Quit ? Help, config\n"
@ -2065,8 +2065,8 @@ static int show_help(char *path)
"d^F Extract archive m, M Brief/full media info\n" "d^F Extract archive m, M Brief/full media info\n"
"ee Edit in EDITOR p Open in PAGER\n" "ee Edit in EDITOR p Open in PAGER\n"
"1ORDER\n" "1ORDER\n"
"d^J Toggle du mode S Toggle apparent size\n" "d^J Disk usage S Apparent du\n"
"es Toggle sort by size t Toggle sort by mtime\n" "es Size t Modification time\n"
"1MISC\n" "1MISC\n"
"eo Launch GUI app !, ^] Spawn SHELL in dir\n" "eo Launch GUI app !, ^] Spawn SHELL in dir\n"
"eR Run custom script L Lock terminal\n"}; "eR Run custom script L Lock terminal\n"};

View file

@ -155,6 +155,7 @@ static struct key bindings[] = {
{ CONTROL('_'), SEL_LEADER, "", "" }, { CONTROL('_'), SEL_LEADER, "", "" },
{ '`', SEL_LEADER, "", "" }, { '`', SEL_LEADER, "", "" },
/* Cycle contexts in forward direction */ /* Cycle contexts in forward direction */
{ '\t', SEL_CYCLE, "", "" },
{ CONTROL('T'), SEL_CYCLE, "", "" }, { CONTROL('T'), SEL_CYCLE, "", "" },
/* Mark a path to visit later */ /* Mark a path to visit later */
{ 'b', SEL_PIN, "", "" }, { 'b', SEL_PIN, "", "" },