diff options
author | tv <tv@shackspace.de> | 2014-07-27 20:59:23 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-07-27 20:59:23 +0200 |
commit | 983f4007620c1c7c0d2c50892d08a367f7152c0a (patch) | |
tree | fd5021aceba16ab076dabfee91e61442bdfd6e3c | |
parent | 1be6510aa16cefe17438caf88aa0b74627ae90b6 (diff) |
nmap += aIAhlbw<Return><Escape>; imap<Escape> honors NormalMode constraints
-rw-r--r-- | Main.hs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) |