Add h (move left) monvment to vimMode.

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-01-13 10:25:16 -08:00
parent 86d7a91dcd
commit d3d832a740
3 changed files with 19 additions and 1 deletions

View File

@@ -39,6 +39,16 @@ describe "VimMode", ->
expect(editor.buffer.getText()).toBe '1345'
expect(editor.getCursor()).toEqual(column: 1, row: 0)
describe "the h/j/k/l keybindings", ->
it "move the cursor left/up/down/right", ->
editor.buffer.setText("12345\nabcde\nABCDE")
editor.setCursor(column: 1, row: 1)
editor.trigger keydownEvent('h')
expect(editor.getCursor()).toEqual(column: 0, row: 1)
editor.trigger keydownEvent('h')
expect(editor.getCursor()).toEqual(column: 0, row: 1)
describe "numeric prefix binding", ->
it "repeats the following operation N times", ->
editor.buffer.setText("12345")