summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Main.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index 2a29fb2..470d7fa 100644
--- a/Main.hs
+++ b/Main.hs
@@ -345,13 +345,22 @@ charToCode c = "\\x" ++ showIntAtBase 16 intToDigit (ord c) ""
nmap =
[ ("i", ChangeMode InsertMode)
+ , ("a", ChangeMode InsertMode <> MotionCommand (GotoRight 1))
+ , ("I", ChangeMode InsertMode <> MotionCommand GotoFirstChar)
+ , ("A", ChangeMode InsertMode <> MotionCommand GotoEndOfLine)
, ("0", MotionCommand GotoFirstChar)
, ("$", MotionCommand GotoEndOfLine)
+ , ("h", MotionCommand $ GotoLeft 1)
+ , ("l", MotionCommand $ GotoRight 1)
+ , ("b", MotionCommand $ WordsBackward 1)
+ , ("w", MotionCommand $ WordsForward 1)
+ , ("\x0a", ExecuteInputBuffer)
]
+ ++ [unboundSequence "\x1b" "<Escape>"]
imap =
- [ ("\x1b", ChangeMode NormalMode)
+ [ ("\x1b", ChangeMode NormalMode <> MotionCommand (GotoLeft 1))
, ("\x01", MotionCommand GotoFirstChar)
, ("\x05", MotionCommand GotoEndOfLine)
, ("\x1b[3~", KillNextChar)