         if args.length == 1 then args[0] else args[...2]
 
     # Perform the movement.
-    # We use the pseudo-granularity "vimword" to implement vim's "w" movement (which is not supported
-    # natively).
-    if movement[1] == "vimword" and movement[0] == forward
-      x = @nextCharacter()
-      if /\s/.test @nextCharacter()
+    if movement[1] == vimword and movement[0] == forward
+      if @nextCharacterIsWordCharacter()
+        @runMovements [ forward, "word" ], [ forward, vimword ]
+      else
         @runMovements [ forward, "word" ], [ backward, "word" ]
-      else
-        @runMovements [ forward, "word" ], [ forward, vimword ]
-
-    else if movement[1] == "vimword"
+
+    else if movement[1] == vimword
       @selection.modify @alterMethod, backward, "word"
 
     else

  # When visual mode starts and there's no existing selection, we launch CaretMode and try to establish a
  # selection.  As a heuristic, we pick the first non-whitespace character of the first visible text node
  # which seems to be long enough to be interesting.
  establishInitialSelection: ->
    nodes = document.createTreeWalker document.body, NodeFilter.SHOW_TEXT
    while node = nodes.nextNode()
      # Don't pick really short texts; they're likely to be part of a banner.
      if node.nodeType == 3 and 50 <= node.data.trim().length
        element = node.parentElement
        if DomUtils.getVisibleClientRect(element) and not DomUtils.isEditable element
          offset = node.data.length - node.data.replace(/^\s+/, "").length
          range = document.createRange()
          range.setStart node, offset
          range.setEnd node, offset+1
          @selectRange range
          return true
    false

  extendSelection: ->
    initialDirection = @getDirection()
    for direction in [ initialDirection, @opposite[initialDirection] ]
      @runMovement direction, lineboundary
      @reverseSelection()

class CaretMode extends Movement
