diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-09-26 19:56:43 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-09-26 19:56:43 +0530 |
commit | d7ce06b10b4c90ff07120ff5ad8f2291971c94fd (patch) | |
tree | 5e8ab331e1fdd6725ca2c16619f9745a69387f47 /src | |
parent | ce8e6a8791710f3327ffc2d1091c08903cb9a619 (diff) | |
download | nnn-d7ce06b10b4c90ff07120ff5ad8f2291971c94fd.tar.gz |
Add plugin to take quick notes
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 26 | ||||
-rw-r--r-- | src/nnn.h | 3 |
2 files changed, 5 insertions, 24 deletions
@@ -401,10 +401,9 @@ static const char * const messages[] = { #define NNN_CONTEXT_COLORS 2 #define NNN_IDLE_TIMEOUT 3 #define NNN_COPIER 4 -#define NNN_NOTE 5 -#define NNNLVL 6 /* strings end here */ -#define NNN_USE_EDITOR 7 /* flags begin here */ -#define NNN_TRASH 8 +#define NNNLVL 5 /* strings end here */ +#define NNN_USE_EDITOR 6 /* flags begin here */ +#define NNN_TRASH 7 static const char * const env_cfg[] = { "NNN_BMS", @@ -412,7 +411,6 @@ static const char * const env_cfg[] = { "NNN_CONTEXT_COLORS", "NNN_IDLE_TIMEOUT", "NNN_COPIER", - "NNN_NOTE", "NNNLVL", "NNN_USE_EDITOR", "NNN_TRASH", @@ -2852,10 +2850,10 @@ static bool show_help(const char *path) "cS du A Apparent du\n" "cs Size E Extn t Time modified\n" "1MISC\n" - "9! ^] Shell ^N Note L Lock \n" + "9! ^] Shell = Launcher\n" "9R ^V Pick plugin :K xK Run plugin key K\n" "cc SSHFS mount u Unmount\n" - "b^P Prompt/run expr = Launcher\n"}; + "b^P Prompt/run expr L Lock\n"}; fd = create_tmp_file(); if (fd == -1) @@ -3994,7 +3992,6 @@ nochange: case SEL_REDRAW: // fallthrough case SEL_RENAMEALL: // fallthrough case SEL_HELP: // fallthrough - case SEL_NOTE: // fallthrough case SEL_LOCK: { if (ndents) @@ -4027,19 +4024,6 @@ nochange: case SEL_RUNPAGE: spawn(pager, dents[cur].name, NULL, path, F_CLI); break; - case SEL_NOTE: - { - static char *notepath; - - notepath = notepath ? notepath : getenv(env_cfg[NNN_NOTE]); - if (!notepath) { - printwait("set NNN_NOTE", &presel); - goto nochange; - } - - spawn(editor, notepath, NULL, path, F_CLI); - break; - } default: /* SEL_LOCK */ lock_terminal(); break; @@ -96,7 +96,6 @@ enum action { SEL_RUNCMD, SEL_RUNEDIT, SEL_RUNPAGE, - SEL_NOTE, SEL_LOCK, SEL_QUITCTX, SEL_QUITCD, @@ -246,8 +245,6 @@ static struct key bindings[] = { /* Open in EDITOR or PAGER */ { 'e', SEL_RUNEDIT }, { 'p', SEL_RUNPAGE }, - /* Open notes file */ - { CONTROL('N'), SEL_NOTE }, /* Lock screen */ { 'L', SEL_LOCK }, /* Quit a context */ |