diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2018-01-09 14:21:09 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2018-01-09 14:21:09 +0530 |
commit | 34b650aac876e87a08a78e86d10e74c9b9c278f3 (patch) | |
tree | 709097407a303a47d2ae0043fea80fffe90d0703 | |
parent | 827f7fd662265631b07189c5dd389efb9a3e7c41 (diff) | |
download | nnn-34b650aac876e87a08a78e86d10e74c9b9c278f3.tar.gz |
Remap ^S and ^Q.
The replacement keys are:
^J - toggle du mode
^Y - quit
The change is done because ^S, ^Q keybinds are lost in the following case:
- start nnn
- navigate to a different directory
- spawn a shell
- exit the shell
The issue happens only with the 'special' keybinds like ^S, ^Q, ^Z... which get
their original shell interpretation back.
So we are replacing these 2 keybinds with 2 'non-special' combinations.
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | nnn.1 | 4 | ||||
-rw-r--r-- | nnn.c | 8 | ||||
-rw-r--r-- | nnn.h | 4 |
4 files changed, 10 insertions, 10 deletions
@@ -237,7 +237,7 @@ optional arguments: n | Create new ^R | Rename entry s | Toggle sort by size - S, ^S | Toggle du mode + S, ^J | Toggle du mode t | Toggle sort by mtime ! | Spawn SHELL in dir e | Edit entry in EDITOR @@ -249,7 +249,7 @@ optional arguments: ^L | Redraw, clear prompt ? | Help, settings Q | Quit and cd - q, ^Q | Quit + q, ^Y | Quit ``` Help & settings, file details, media info and archive listing are shown in the PAGER. Please use the PAGER-specific keys in these screens. @@ -84,7 +84,7 @@ Create a new file or directory Rename selected entry .It Ic s Toggle sort by file size -.It Ic S, ^S +.It Ic S, ^J Toggle disk usage analyzer mode .It Ic t Toggle sort by time modified @@ -108,7 +108,7 @@ Force a redraw, clear rename or filter prompt Toggle help and settings screen .It Ic Q Quit and change directory -.It Ic q, ^Q +.It Ic q, ^Y Quit .El .Pp @@ -988,9 +988,9 @@ filterentries(char *path) case CONTROL('O'): // fallthrough case CONTROL('B'): // fallthrough case CONTROL('V'): // fallthrough - case CONTROL('S'): // fallthrough + case CONTROL('J'): // fallthrough case CONTROL('X'): // fallthrough - case CONTROL('Q'): + case CONTROL('Y'): goto end; default: /* Reset cur in case it's a repeat search */ @@ -1717,7 +1717,7 @@ show_help(char *path) "en | Create new\n" "d^R | Rename entry\n" "es | Toggle sort by size\n" - "aS, ^S | Toggle du mode\n" + "aS, ^J | Toggle du mode\n" "et | Toggle sort by mtime\n" "e! | Spawn SHELL in dir\n" "ee | Edit entry in EDITOR\n" @@ -1729,7 +1729,7 @@ show_help(char *path) "d^L | Redraw, clear prompt\n" "e? | Help, settings\n" "eQ | Quit and cd\n" - "aq, ^Q | Quit\n\n"); + "aq, ^Y | Quit\n\n"); if (fd == -1) return -1; @@ -137,7 +137,7 @@ static struct key bindings[] = { { 's', SEL_FSIZE, "", "" }, /* Sort by total block count including dir contents */ { 'S', SEL_BSIZE, "", "" }, - { CONTROL('S'), SEL_BSIZE, "", "" }, + { CONTROL('J'), SEL_BSIZE, "", "" }, /* Toggle sort by time */ { 't', SEL_MTIME, "", "" }, /* Redraw window */ @@ -163,5 +163,5 @@ static struct key bindings[] = { { 'Q', SEL_CDQUIT, "", "" }, /* Quit */ { 'q', SEL_QUIT, "", "" }, - { CONTROL('Q'), SEL_QUIT, "", "" }, + { CONTROL('Y'), SEL_QUIT, "", "" }, }; |