 
     YANK:
       display: 'Yank (operator)'
-      key: 'y'
     PASTE_AFTER:
       display: 'Paste after cursor'
-      key: 'p'
       fn: () ->
         do @view.pasteAfter
     PASTE_BEFORE:
       display: 'Paste before cursor'
-      key: 'P'
       fn: () ->
         do @view.pasteBefore
 
     INDENT_RIGHT:
       display: 'Indent right'
-      key: '>'
-      alternateKeys: ['tab']
       fn: () ->
         @view.indentLine {}
     INDENT_LEFT:
       display: 'Indent left'
-      key: '<'
-      alternateKeys: ['shift+tab']
       fn: () ->
         @view.unindentLine {}
     INDENT_BLOCK_RIGHT:
       display: 'Indent block right'
-      key: ']'
       fn: () ->
         @view.indentBlock {recursive: true}
     INDENT_BLOCK_LEFT:
       display: 'Indent block left'
-      key: '['
       fn: () ->
         @view.unindentBlock {recursive: true}
     TOGGLE_FOLD:
       display: 'Toggle whether a block is folded'
-      key: 'z'
       fn: () ->
         do @view.toggleCurBlock
     SCROLL_DOWN:
       display: 'Scroll half window down'
-      key: 'ctrl+d'
       drop: true
       fn: () ->
         @view.scrollPages 0.5
     SCROLL_UP:
       display: 'Scroll half window down'
-      key: 'ctrl+u'
       drop: true
       fn: () ->
         @view.scrollPages -0.5
+
+  MODES =
+    NORMAL: 0
+    INSERT: 1
+    EX: 2
+
+  defaultVimKeyBindings =
+    '?': 'HELP'
+    'i': 'INSERT'
+    'a': 'INSERT_AFTER'
+    'I': 'INSERT_HOME'
+    'A': 'INSERT_END'
+    'o': 'INSERT_LINE_BELOW'
+    'O': 'INSERT_LINE_ABOVE'
+    'r': 'REPLACE'
+    ':': 'EX'
+    'u': 'UNDO'
+    'ctrl+r': 'REDO'
+    '.': 'REPEAT'
+    'h': 'LEFT'
+    'left': 'LEFT'
+    'l': 'RIGHT'
+    'right': 'RIGHT'
+    'k': 'UP'
+    'up': 'UP'
+    'j': 'DOWN'
+    'down': 'DOWN'
+    '0': 'HOME'
+    '^': 'HOME'
+    '$': 'END'
+    'b': 'BEGINNING_WORD'
+    'e': 'END_WORD'
+    'w': 'NEXT_WORD'
+    'B': 'BEGINNING_BLOCK'
+    'E': 'END_BLOCK'
+    'W': 'NEXT_BLOCK'
+    'f': 'FIND_NEXT_CHAR'
+    'F': 'FIND_PREV_CHAR'
+    't': 'TO_NEXT_CHAR'
+    'T': 'TO_PREV_CHAR'
+    'g': 'GO'
+    'G': 'GO_END'
+    'd': 'DELETE'
+    'c': 'CHANGE'
+    'x': 'DELETE_CHAR'
+    'X': 'DELETE_LAST_CHAR'
+    's': 'CHANGE_CHAR'
+    'y': 'YANK'
+    'p': 'PASTE_AFTER'
+    'P': 'PASTE_BEFORE'
+    '>': 'INDENT_RIGHT'
+    'tab': 'INDENT_RIGHT'
+    '<': 'INDENT_LEFT'
+    'shift+tab': 'INDENT_LEFT'
+    ']': 'INDENT_BLOCK_RIGHT'
+    '[': 'INDENT_BLOCK_LEFT'
+    'z': 'TOGGLE_FOLD'
+    'ctrl+d': 'SCROLL_DOWN'
+    'ctrl+u': 'SCROLL_UP'
 
   SEQUENCE = {
     # wait for more keys

        do @view.render
    DELETE:
      display: 'Delete (operator)'
      key: 'd'
    CHANGE:
      display: 'Change (operator)'
      key: 'c'
    DELETE_CHAR:
      display: 'Delete character'
      key: 'x'
      fn: () ->
        @view.delCharsAfterCursor @repeat, {yank: true}
        do @view.moveCursorBackIfNeeded
    DELETE_LAST_CHAR:
      display: 'Delete last character'
      key: 'X'
      fn: () ->
        num = Math.min @view.cursor.col, @repeat
        if num > 0
          @view.delCharsBeforeCursor num, {yank: true}
    CHANGE_CHAR:
      display: 'Change character'
      key: 's'
      insert: true
      fn: () ->
        @view.delCharsAfterCursor 1, {cursor: 'pastEnd'}, {yank: true}

    for k,v of @bindings
      row = $('<tr>')
      row.append $('<td>').text v.display
      row.append $('<td>').text v.keys[0]
      # row.append $('<td>').text v.keys.join(' OR ')
      table.append row

    @keybindingsDiv.empty().append(table)

  setMode: (mode) ->
    @mode = mode
