sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

mainline.diff (4279B)


      1 # Description: Change key bindings for comfortable use with Colemak keyboard
      2 #              layout. This diff was made in 4.7 release version of nnn.
      3 #
      4 # Author: github.com/jacmoe
      5 diff --git a/src/nnn.c b/src/nnn.c
      6 index ecedee43..fdf5a80e 100644
      7 --- a/src/nnn.c
      8 +++ b/src/nnn.c
      9 @@ -5098,32 +5098,32 @@ static void show_help(const char *path)
     10  	"2(___n))\n"
     11  	"0\n"
     12  	"1NAVIGATION\n"
     13 -	       "9Up k  Up%16PgUp ^U  Page up\n"
     14 -	       "9Dn j  Down%14PgDn ^D  Page down\n"
     15 +	       "9Up e  Up%16PgUp ^U  Page up\n"
     16 +	       "9Dn n  Down%14PgDn ^D  Page down\n"
     17  	       "9Lt h  Parent%12~ ` @ -  ~, /, start, prev\n"
     18 -	   "5Ret Rt l  Open%20'  First file/match\n"
     19 -	       "9g ^A  Top%21J  Jump to entry/offset\n"
     20 -	       "9G ^E  End%20^J  Toggle auto-advance on open\n"
     21 +	   "5Ret Rt i  Open%20'  First file/match\n"
     22 +	       "9g ^E  Top%21J  Jump to entry/offset\n"
     23 +	       "9G ^N  End%20^J  Toggle auto-advance on open\n"
     24  	      "8B (,)  Book(mark)%11b ^/  Select bookmark\n"
     25  		"a1-4  Context%11(Sh)Tab  Cycle/new context\n"
     26  	    "62Esc ^Q  Quit%20q  Quit context\n"
     27  		 "b^G  QuitCD%18Q  Pick/err, quit\n"
     28  	"0\n"
     29  	"1FILTER & PROMPT\n"
     30 -		  "c/  Filter%17^N  Toggle type-to-nav\n"
     31 +		  "c/  Filter%17^M  Toggle type-to-nav\n"
     32  		"aEsc  Exit prompt%12^L  Toggle last filter\n"
     33  		  "c.  Toggle hidden%05Alt+Esc  Unfilter, quit context\n"
     34  	"0\n"
     35  	"1FILES\n"
     36 -	       "9o ^O  Open with%15n  Create new/link\n"
     37 +	       "9o ^O  Open with%15c  Create new/link\n"
     38  	       "9f ^F  File stats%14d  Detail mode toggle\n"
     39  		 "b^R  Rename/dup%14r  Batch rename\n"
     40 -		  "cz  Archive%17e  Edit file\n"
     41 +		  "cz  Archive%17y  Edit file\n"
     42  		  "c*  Toggle exe%14>  Export list\n"
     43  	    "6Space +  (Un)select%12m-m  Select range/clear\n"
     44  	          "ca  Select all%14A  Invert sel\n"
     45  	       "9p ^P  Copy here%12w ^W  Cp/mv sel as\n"
     46 -	       "9v ^V  Move here%15E  Edit sel list\n"
     47 +	       "9v ^V  Move here%15l  Edit sel list\n"
     48  	       "9x ^X  Delete%18S  Listed sel size\n"
     49  		"aEsc  Send to FIFO\n"
     50  	"0\n"
     51 diff --git a/src/nnn.h b/src/nnn.h
     52 index 3e4ea19c..b0eb7cdb 100644
     53 --- a/src/nnn.h
     54 +++ b/src/nnn.h
     55 @@ -137,12 +137,12 @@ static struct key bindings[] = {
     56  	{ '\r',           SEL_OPEN },
     57  	/* Pure navigate inside */
     58  	{ KEY_RIGHT,      SEL_NAV_IN },
     59 -	{ 'l',            SEL_NAV_IN },
     60 +	{ 'i',            SEL_NAV_IN },
     61  	/* Next */
     62 -	{ 'j',            SEL_NEXT },
     63 +	{ 'n',            SEL_NEXT },
     64  	{ KEY_DOWN,       SEL_NEXT },
     65  	/* Previous */
     66 -	{ 'k',            SEL_PREV },
     67 +	{ 'e',            SEL_PREV },
     68  	{ KEY_UP,         SEL_PREV },
     69  	/* Page down */
     70  	{ KEY_NPAGE,      SEL_PGDN },
     71 @@ -155,11 +155,11 @@ static struct key bindings[] = {
     72  	/* First entry */
     73  	{ KEY_HOME,       SEL_HOME },
     74  	{ 'g',            SEL_HOME },
     75 -	{ CONTROL('A'),   SEL_HOME },
     76 +	{ CONTROL('E'),   SEL_HOME },
     77  	/* Last entry */
     78  	{ KEY_END,        SEL_END },
     79  	{ 'G',            SEL_END },
     80 -	{ CONTROL('E'),   SEL_END },
     81 +	{ CONTROL('N'),   SEL_END },
     82  	/* Go to first file */
     83  	{ '\'',           SEL_FIRST },
     84  	/* Jump to an entry number/offset */
     85 @@ -199,7 +199,7 @@ static struct key bindings[] = {
     86  	/* Filter */
     87  	{ '/',            SEL_FLTR },
     88  	/* Toggle filter mode */
     89 -	{ CONTROL('N'),   SEL_MFLTR },
     90 +	{ CONTROL('M'),   SEL_MFLTR },
     91  	/* Toggle hide .dot files */
     92  	{ '.',            SEL_HIDDEN },
     93  	/* Detailed listing */
     94 @@ -226,7 +226,7 @@ static struct key bindings[] = {
     95  	/* Invert selection in current dir */
     96  	{ 'A',            SEL_SELINV },
     97  	/* List, edit selection */
     98 -	{ 'E',            SEL_SELEDIT },
     99 +	{ 'l',            SEL_SELEDIT },
    100  	/* Copy from selection buffer */
    101  	{ 'p',            SEL_CP },
    102  	{ CONTROL('P'),   SEL_CP },
    103 @@ -243,7 +243,7 @@ static struct key bindings[] = {
    104  	{ 'o',            SEL_OPENWITH },
    105  	{ CONTROL('O'),   SEL_OPENWITH },
    106  	/* Create a new file */
    107 -	{ 'n',            SEL_NEW },
    108 +	{ 'c',            SEL_NEW },
    109  	/* Show rename prompt */
    110  	{ CONTROL('R'),   SEL_RENAME },
    111  	/* Rename contents of current dir */
    112 @@ -255,7 +255,7 @@ static struct key bindings[] = {
    113  	/* Toggle auto-advance on file open */
    114  	{ CONTROL('J'),   SEL_AUTONEXT },
    115  	/* Edit in EDITOR */
    116 -	{ 'e',            SEL_EDIT },
    117 +	{ 'y',            SEL_EDIT },
    118  	/* Run a plugin */
    119  	{ ';',            SEL_PLUGIN },
    120  	/* Show total size of listed selection */