-
Notifications
You must be signed in to change notification settings - Fork 267
Differences from Vi(m)
Below we list some deliberate differences in behavior compared to vi(m).
In vis newlines are directly addressable irrespective of the current mode like any other character of the underlying file.
$
moves the cursor over the new line (not the last character of the line).
As a consequence x
can be used to join lines.
Leaving insert mode does not move the cursor one character back. Repeatedly switching in and out of insert mode is idempotent with respect to the cursor position.
See also this related discussion.
In vim the range covered by certain motions can vary depending on whether
they are used in an operator context or not. Advancing to the next word
using w
starting from #
The brown fox jumps #ver
the lazy dog.
results in:
The brown fox jumps over
#he lazy dog.
but issuing dw
from the same starting position produces:
The brown fox jumps
the lazy dog.
These motions currently always search in forward (n
) and backward (N
)
directions irrespective on how the initial search was performed.
See also issue #470.
Instead we use sam's structural regular expressions based command language.