           @copy @selection.toString()
           @selection.deleteFromDocument()
 
+      # If the input is empty, then enter insert mode immediately
+      unless @element.isContentEditable
+        if @element.value.trim() == ""
+          enterInsertMode()
+          HUD.showForDuration "Input empty, entered insert mode directly.", 3500
+
   enterVisualMode: (options = {}) ->
     defaults =
       underEditMode: true


  # An approximation of the vim "w" movement.
  moveForwardWord: (direction) ->
    # This is broken:
    # - On the very last word in the text.
    # - When the next character is not a word character.
    # However, it works well for the common cases, and the additional complexity of fixing these broken cases
    # is probably unwarranted right now (smblott, 2015/1/25).
    movements = [ "forward word", "forward word", "backward word" ]
    @runMovement movement for movement in movements

  movements:
    "l": "forward character"


enterInsertMode = ->
  new InsertMode { badge: "I", blurOnEscape: false }
