+
+# Todo:
+# Fix word movement, particularly for "a word".
+# Konami code?
 
 # This prevents printable characters from being passed through to underlying page.  It should, however, allow
 # through chrome keyboard shortcuts.  It's a backstop for all of the modes following.

      alterMethod: "extend"
    super extend defaults, options

    extend @commands,
      "V": -> new VisualLineMode
      "y": ->
        # Special case: "yy" (the first from edit mode, and now the second).
        @selectLexicalEntity "lineboundary" if @options.yYanksLine and @keyPressCount == 1
        @yank()

    if @options.editModeParent and not @options.oneMovementOnly
      extend @commands,
        "c": -> @yank deleteFromDocument: true; @options.editModeParent.enterInsertMode()
        "x": -> @yank deleteFromDocument: true
        "d": ->
          # Special case: "dd" (the first from edit mode, and now the second).
          @selectLexicalEntity "lineboundary" if @options.dYanksLine and @keyPressCount == 1
          @yank deleteFromDocument: true

    if @options.oneMovementOnly
      extend @commands,
        "a": ->
          if @keyPressCount == 1
            for entity in [ "word", "sentence", "paragraph" ]
              do (entity) => @movements[entity.charAt 0] = -> @selectLexicalEntity entity

    unless @options.editModeParent
      @installFindMode()

      #     @enterInsertMode()
      #     HUD.showForDuration "Input empty, entered insert mode directly.", 3500

  enterVisualModeForMovement: (options = {}) ->
    @launchSubMode VisualMode, extend options,
      badge: "M"
      initialCount: @countPrefix
      oneMovementOnly: true
    @countPrefix = ""

  enterInsertMode: () ->
    @launchSubMode InsertMode,
