summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Main.hs22
1 files changed, 12 insertions, 10 deletions
diff --git a/Main.hs b/Main.hs
index b244de1..df6da8d 100644
--- a/Main.hs
+++ b/Main.hs
@@ -292,7 +292,6 @@ charToCode c = "\\x" ++ showIntAtBase 16 intToDigit (ord c) ""
--- TODO pressing ESC, then F11 etc. is ugly
nmap =
[ ("\x01", MotionCommand GotoFirstChar)
, ("\x05", MotionCommand GotoEndOfLine)
@@ -304,12 +303,6 @@ nmap =
, ("\x0a", ExecuteInputBuffer)
, ("\x7f", KillLastChar) -- Delete
, ("\x08", KillLastChar) -- BackSpace
-
- -- TODO replace by backward-word
- -- forward-word
- -- OR
- -- [MotionCommand SkipSpaceRight, MotionCommand $ GotillFindRight 1 ' ']
- -- etc.
, ("\x1bOc", MotionCommand $ WordsForward 1)
, ("\x1bOd", MotionCommand $ WordsBackward 1)
]
@@ -360,12 +353,21 @@ nmap =
++ [unboundSequence "\x1b[21~" "<F10>"]
++ [unboundSequence "\x1b[23~" "<F11>"]
++ [unboundSequence "\x1b[24~" "<F12>"]
+ ++ [unboundSequence "\x1b\x1b[11~" "<M-F1>"]
+ ++ [unboundSequence "\x1b\x1b[12~" "<M-F2>"]
+ ++ [unboundSequence "\x1b\x1b[13~" "<M-F3>"]
+ ++ [unboundSequence "\x1b\x1b[14~" "<M-F4>"]
+ ++ [unboundSequence "\x1b\x1b[15~" "<M-F5>"]
+ ++ [unboundSequence "\x1b\x1b[17~" "<M-F6>"]
+ ++ [unboundSequence "\x1b\x1b[18~" "<M-F7>"]
+ ++ [unboundSequence "\x1b\x1b[19~" "<M-F8>"]
+ ++ [unboundSequence "\x1b\x1b[20~" "<M-F9>"]
+ ++ [unboundSequence "\x1b\x1b[21~" "<M-F10>"]
+ ++ [unboundSequence "\x1b\x1b[23~" "<M-F11>"]
+ ++ [unboundSequence "\x1b\x1b[24~" "<M-F12>"]
++ [unboundSequence "\x1b\x1b[2~" "<M-Insert>"]
++ [unboundSequence "\x1b\x1b[3~" "<M-Delete>"]
- ++ map (\ i -> unboundSequence ("\x1b\x1b[" ++ show i ++ "~")
- ("<M-F" ++ show i ++ ">"))
- [11..24]
++ [unboundSequence "\x1b\x7f" "<M-BackSpace>"]
++ [unboundSequence "\x1b\x0a" "<M-Return>"]