Created
January 4, 2017 00:57
-
-
Save flarn2006/294e51853a6f07de9964f9a89cef095f to your computer and use it in GitHub Desktop.
Patch to add vim-like cursor movement to hexedit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- interact.c_ 2016-11-03 16:19:44.646114334 -0400 | |
+++ interact.c 2016-11-03 16:15:20.402249954 -0400 | |
@@ -339,6 +339,25 @@ | |
oldbase = base; | |
/*printf("*******%d******\n", key);*/ | |
+ if (hexOrAscii) { | |
+ /* Hex-mode-only key binds */ | |
+ switch (key) | |
+ { | |
+ case 'l': | |
+ forward_char(); | |
+ return TRUE; | |
+ case 'h': | |
+ backward_char(); | |
+ return TRUE; | |
+ case 'j': | |
+ next_line(); | |
+ return TRUE; | |
+ case 'k': | |
+ previous_line(); | |
+ return TRUE; | |
+ } | |
+ } | |
+ | |
switch (key) | |
{ | |
case KEY_RIGHT: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment