Introduction
Introduction Statistics Contact Development Disclaimer Help
config: add emacs word-movement keybind (alt+f, alt+b) - sob - simple output bar
git clone git://git.codemadness.org/sob
Log
Files
Refs
README
LICENSE
---
commit 86488a280037b6fe03a9311ca34ad9ccff3a1814
parent 74da8c1cfc20e7ea947d7d6fb1c97258a3e65b21
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 31 Oct 2014 13:36:43 +0000
config: add emacs word-movement keybind (alt+f, alt+b)
Diffstat:
M config.def.h | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/config.def.h b/config.def.h
@@ -25,6 +25,7 @@ complete_nick(void)
}
#define CONTROL(ch) ((ch)^0x40)
+#define ALT(ch) '\x1b',ch,'\0'
#define KEY_HOME "\x1b\x5b\x31\x7e"
#define KEY_END "\x1b\x5b\x34\x7e"
@@ -57,6 +58,8 @@ static struct keybind {
{ { CONTROL('F') }, line_cursor_next },
{ { KEY_RIGHT }, line_cursor_next },
{ { KEY_CSI_RIGHT }, line_cursor_next },
+ { { ALT('b') }, line_cursor_wordprev },
+ { { ALT('f') }, line_cursor_wordnext },
{ { KEY_CTRL_LEFT }, line_cursor_wordprev },
{ { KEY_CTRL_RIGHT }, line_cursor_wordnext },
{ { CONTROL('W') }, line_delwordprev },
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.