From 871685f7cafef26a17ad0d60d93bc3bdb152fcc8 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sun, 25 Aug 2019 05:25:29 +0530 Subject: [PATCH] New keys: F2 (rename) F5 (redraw) --- README.md | 4 ++-- src/nnn.c | 4 ++-- src/nnn.h | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eb4edc67..57d8effc 100644 --- a/README.md +++ b/README.md @@ -243,12 +243,12 @@ Press ? in `nnn` to see the list anytime. Tab ^I Next context d Toggle detail view , ^/ Lead key N LeadN Context N / Filter/Lead Ins ^T Toggle nav-as-you-type - Esc Exit prompt ^L Redraw/clear prompt + Esc Exit prompt ^L F5 Redraw/clear prompt q Quit context Lead' First file Q ^Q Quit ^G QuitCD ? Help, config FILES ^O Open with... n Create new/link - D File details ^R Rename/duplicate + D File detail ^R F2 Rename/duplicate ⎵ ^K / Y Select entry/all r Batch rename K ^Y Toggle selection y List selection P Copy selection X Delete selection diff --git a/src/nnn.c b/src/nnn.c index dec86810..6db57c50 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2829,12 +2829,12 @@ static bool show_help(const char *path) "7Tab ^I Next context d Toggle detail view\n" "9, ^/ Lead key N LeadN Context N\n" "c/ Filter/Lead Ins ^T Toggle nav-as-you-type\n" - "aEsc Exit prompt ^L Redraw/clear prompt\n" + "aEsc Exit prompt ^L F5 Redraw/clear prompt\n" "cq Quit context Lead' First file\n" "9Q ^Q Quit ^G QuitCD ? Help, config\n" "1FILES\n" "b^O Open with... n Create new/link\n" - "cD File details ^R Rename/duplicate\n" + "cD File detail ^R F2 Rename/duplicate\n" "5⎵ ^K / Y Select entry/all r Batch rename\n" "9K ^Y Toggle selection y List selection\n" "cP Copy selection X Delete selection\n" diff --git a/src/nnn.h b/src/nnn.h index e236e32e..c68893ac 100644 --- a/src/nnn.h +++ b/src/nnn.h @@ -200,6 +200,7 @@ static struct key bindings[] = { { 't', SEL_MTIME }, /* Redraw window */ { CONTROL('L'), SEL_REDRAW }, + { KEY_F(5), SEL_REDRAW }, /* Copy currently selected file path */ { CONTROL('K'), SEL_SEL }, { ' ', SEL_SEL }, @@ -224,7 +225,7 @@ static struct key bindings[] = { { 'n', SEL_NEW }, /* Show rename prompt */ { CONTROL('R'), SEL_RENAME }, - { KEY_F(2), SEL_RENAME }, // undocumented + { KEY_F(2), SEL_RENAME }, /* Rename contents of current dir */ { 'r', SEL_RENAMEALL }, /* Connect to server over SSHFS */