packages feed

yi-keymap-vim 0.15.0 → 0.16.0

raw patch · 4 files changed

+35/−8 lines, 4 files

Files

src/Yi/Keymap/Vim/InsertMap.hs view
@@ -229,10 +229,19 @@  cursorBinding :: VimBinding cursorBinding = VimBindingE f-    where f evs (VimState { vsMode = (Insert _) })-            | evs `elem` ["<Up>", "<Left>", "<Down>", "<Right>"]-            = WholeMatch $ do-                  let WholeMatch (Move _style _isJump move) = stringToMove evs-                  withCurrentBuffer $ move Nothing-                  return Continue-          f _ _ = NoMatch+    where+    f "<C-b>" (VimState { vsMode = (Insert _) })+        = WholeMatch $ do+            withCurrentBuffer $ moveXorSol 1+            return Continue+    f "<C-f>" (VimState { vsMode = (Insert _) })+        = WholeMatch $ do+            withCurrentBuffer $ moveXorEol 1+            return Continue+    f evs (VimState { vsMode = (Insert _) })+        | evs `elem` ["<Up>", "<Left>", "<Down>", "<Right>"]+        = WholeMatch $ do+              let WholeMatch (Move _style _isJump move) = stringToMove evs+              withCurrentBuffer $ move Nothing+              return Continue+    f _ _ = NoMatch
+ tests/vimtests/insertion/C-b.test view
@@ -0,0 +1,8 @@+-- Input+(1,1)+foo = +-- Output+(1,12)+foo = (2 + 3)+-- Events+A()<C-b>2 + 3<Esc>
+ tests/vimtests/insertion/C-f.test view
@@ -0,0 +1,8 @@+-- Input+(1,1)+Hi+-- Output+(1,4)+"Hi"+-- Events+i"<C-f><C-f>"<Esc>
yi-keymap-vim.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           yi-keymap-vim-version:        0.15.0+version:        0.16.0 synopsis:       Vim keymap for Yi editor category:       Yi homepage:       https://github.com/yi-editor/yi#readme@@ -155,6 +155,7 @@     tests/vimtests/insertion/a3.test     tests/vimtests/insertion/a4.test     tests/vimtests/insertion/a_on_empty_line.test+    tests/vimtests/insertion/C-b.test     tests/vimtests/insertion/C-c_0.test     tests/vimtests/insertion/C-c_1.test     tests/vimtests/insertion/C-c_10.test@@ -179,6 +180,7 @@     tests/vimtests/insertion/C-e_0.test     tests/vimtests/insertion/C-e_1.test     tests/vimtests/insertion/C-e_2.test+    tests/vimtests/insertion/C-f.test     tests/vimtests/insertion/C-h_0.test     tests/vimtests/insertion/C-h_1.test     tests/vimtests/insertion/C-h_2.test