summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-07-28 00:28:58 +0200
committertv <tv@shackspace.de>2014-07-28 00:28:58 +0200
commitd59175ab186d2c8d63ae75d4a13cad91a1933c4d (patch)
treeec1cbc786985b966f05c69ba91b1ee3b8a0903cc
parent3c755e1c36139e5e8c64f8dd2b2bf9a93f1b9f05 (diff)
purge UnboundSequence & co.
-rw-r--r--Main.hs79
1 files changed, 1 insertions, 78 deletions
diff --git a/Main.hs b/Main.hs
index 2dccd90..a64ea2d 100644
--- a/Main.hs
+++ b/Main.hs
@@ -110,7 +110,6 @@ data Command
| KillLastChar
| KillNextChar
| ExecuteInputBuffer
- | UnboundSequence String String
| MotionCommand LeftRightMotion
| ChangeMode Mode
-- TODO Move Count Motion
@@ -127,8 +126,7 @@ instance Monoid Command where
data ExecError
- = UnboundSequenceError String String
- | UnhandledInputError String
+ = UnhandledInputError String
| OtherError String
instance Error ExecError where
@@ -138,9 +136,6 @@ prettyError :: ExecError -> String
prettyError e = rec e
where
color cc s = "\x1b[" ++ cc ++ "m" ++ s ++ "\x1b[m"
- rec (UnboundSequenceError s n) =
- color "31" $ "unbound sequence: <" ++ (pp "31;1" s) ++ "\x1b[;31m> "
- ++ (pp "31;1" n)
rec (UnhandledInputError s) =
color "31" $ "unhandled input: <" ++ (pp "31;1" s) ++ "\x1b[;31m>"
@@ -243,9 +238,6 @@ execCommand KillLastWord = do
execCommand (AlertBadInput s) =
throwError (UnhandledInputError s)
-execCommand (UnboundSequence s n) =
- throwError (UnboundSequenceError s n)
-
execCommand (Combine c1 c2) = do
q0 <- get
@@ -363,7 +355,6 @@ nmap =
, ("w", MotionCommand $ WordsForward 1)
, ("\x0a", ExecuteInputBuffer <> ChangeMode InsertMode)
]
- ++ [unboundSequence "\x1b" "<Escape>"]
imap =
@@ -381,74 +372,6 @@ imap =
, ("\x1bOc", MotionCommand $ WordsForward 1)
, ("\x1bOd", MotionCommand $ WordsBackward 1)
]
- ++ [unboundSequence "\x1b[2~" "<Insert>"]
- ++ [unboundSequence "\x1b[5~" "<Prior>"] -- page up
- ++ [unboundSequence "\x1b[6~" "<Next>"] -- page dn
- ++ [unboundSequence "\x1b[7~" "<Home>"]
- ++ [unboundSequence "\x1b[8~" "<End>"]
- ++ [unboundSequence "\x1b[2$" "<S-Insert>"]
- ++ [unboundSequence "\x1b[5$" "<S-Prior>"] -- page up
- ++ [unboundSequence "\x1b[6$" "<S-Next>"] -- page dn
- ++ [unboundSequence "\x1b[7$" "<S-Home>"]
- ++ [unboundSequence "\x1b[8$" "<S-End>"]
- ++ [unboundSequence "\x1b\x1b[2$" "<S-M-Insert>"]
- ++ [unboundSequence "\x1b\x1b[5$" "<S-M-Prior>"] -- page up
- ++ [unboundSequence "\x1b\x1b[6$" "<S-M-Next>"] -- page dn
- ++ [unboundSequence "\x1b\x1b[7$" "<S-M-Home>"]
- ++ [unboundSequence "\x1b\x1b[8$" "<S-M-End>"]
- ++ [unboundSequence "\x1b\x1b[A" "<M-Up>"]
- ++ [unboundSequence "\x1b\x1b[B" "<M-Down>"]
- ++ [unboundSequence "\x1b\x1b[C" "<M-Right>"]
- ++ [unboundSequence "\x1b\x1b[D" "<M-Left>"]
- ++ [unboundSequence "\x1b\x1b[a" "<S-M-Up>"]
- ++ [unboundSequence "\x1b\x1b[b" "<S-M-Down>"]
- ++ [unboundSequence "\x1b\x1b[c" "<S-M-Right>"]
- ++ [unboundSequence "\x1b\x1b[d" "<S-M-Left>"]
- ++ [unboundSequence "\x1b[a" "<S-Up>"]
- ++ [unboundSequence "\x1b[b" "<S-Down>"]
- ++ [unboundSequence "\x1b[c" "<S-Right>"]
- ++ [unboundSequence "\x1b[d" "<S-Left>"]
- ++ [unboundSequence "\x1bOa" "<C-Up>"]
- ++ [unboundSequence "\x1bOb" "<C-Down>"]
- ++ [unboundSequence "\x1bOc" "<C-Right>"]
- ++ [unboundSequence "\x1bOd" "<C-Left>"]
- ++ [unboundSequence "\x1b\x1bOa" "<C-M-Up>"]
- ++ [unboundSequence "\x1b\x1bOb" "<C-M-Down>"]
- ++ [unboundSequence "\x1b\x1bOc" "<C-M-Right>"]
- ++ [unboundSequence "\x1b\x1bOd" "<C-M-Left>"]
- ++ [unboundSequence "\x1b[11~" "<F1>"]
- ++ [unboundSequence "\x1b[12~" "<F2>"]
- ++ [unboundSequence "\x1b[13~" "<F3>"]
- ++ [unboundSequence "\x1b[14~" "<F4>"]
- ++ [unboundSequence "\x1b[15~" "<F5>"]
- ++ [unboundSequence "\x1b[17~" "<F6>"]
- ++ [unboundSequence "\x1b[18~" "<F7>"]
- ++ [unboundSequence "\x1b[19~" "<F8>"]
- ++ [unboundSequence "\x1b[20~" "<F9>"]
- ++ [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>"]
- ++ [unboundSequence "\x1b\x7f" "<M-BackSpace>"]
- ++ [unboundSequence "\x1b\x0a" "<M-Return>"]
-
-
-unboundSequence seq name =
- (seq, UnboundSequence seq name)
type Keymap = [(String, Command)]