From: Michael D. Lowis Date: Thu, 1 Dec 2016 20:21:49 +0000 (-0500) Subject: Implemented two more unix shortcuts X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=18deec248d47042d3ba349cea83da856ae1c7413;p=projs%2Ftide.git Implemented two more unix shortcuts --- diff --git a/xedit.c b/xedit.c index 7351ace..793c088 100644 --- a/xedit.c +++ b/xedit.c @@ -25,6 +25,7 @@ static void redraw(int width, int height); // UI Callbacks static void delete(void); +static void del_to_bol(void); static void backspace(void); static void cursor_home(void); static void cursor_end(void); @@ -108,9 +109,9 @@ static KeyBinding Bindings[] = { //{ KEY_CTRL_F11, fullscreen }, /* Standard Unix Shortcuts */ - //{ KEY_CTRL_U, del_to_bol }, + { ModCtrl, 'u', del_to_bol }, //{ KEY_CTRL_W, del_to_bow }, - //{ KEY_CTRL_H, del_prev_char}, + { ModCtrl, 'h', backspace }, { ModCtrl, 'a', cursor_home }, { ModCtrl, 'e', cursor_end }, @@ -359,6 +360,11 @@ static void delete(void) { view_delete(currview(), RIGHT, byword); } +static void del_to_bol(void) { + view_bol(currview(), true); + delete(); +} + static void backspace(void) { bool byword = x11_keymodsset(ModCtrl); view_delete(currview(), LEFT, byword);