 
 # Todo:
-# Fix word movement, particularly for "a word".
 # Konami code?
 # Use find as a mode.
-
-# This prevents printable characters from being passed through to underlying page.  It should, however, allow
-# through chrome keyboard shortcuts.  It's a keyboard-event backstop for all of the following modes.
+# Refactor visual/movement modes.
+
+# This prevents printable characters from being passed through to the underlying page.  It should, however,
+# allow through chrome keyboard shortcuts.  It's a keyboard-event backstop for visual mode and edit mode.
 class SuppressPrintable extends Mode
-  constructor: (options) ->
+  constructor: (options = {}) ->
     handler = (event) =>
       if KeyboardUtils.isPrintable event
         if event.type == "keydown"

          return
      when "Caret"
        # Try to start with a visible selection.
        @moveInDirection(forward) or @moveInDirection backward unless options.editModeParent
        @scrollIntoView() if @selection.type == "Range"

    defaults =

      "P": -> @pasteClipboard backward
      "v": -> @launchSubMode VisualMode

      "Y": -> @enterVisualModeForMovement singleMovementOnly: "Y"
      "x": -> @enterVisualModeForMovement singleMovementOnly: "h", deleteFromDocument: true
      "y": -> @enterVisualModeForMovement yYanksLine: true
      "d": -> @enterVisualModeForMovement deleteFromDocument: true, dYanksLine: true
      "c": -> @enterVisualModeForMovement deleteFromDocument: true, onYank: => @enterInsertMode()

      "D": -> @enterVisualModeForMovement singleMovementOnly: "$", deleteFromDocument: true
      "C": -> @enterVisualModeForMovement singleMovementOnly: "$", deleteFromDocument: true, onYank: => @enterInsertMode()

      # Disabled as potentially confusing.
      # # If the input is empty, then enter insert mode immediately
