Let's say I have the text:
foo bar baz
With the cursor on z, I would expect :normal! lb to move the cursor to the first letter of baz. In actual fact the cursor does not move.
However typing :normal! l and then :normal! b does move the cursor as expected.
The docs for :normal! state:
Execution stops when an error is encountered.
Is this why :normal! lb doesn't do what I expect? The l cannot move to the right and so it is treated as a (silent) error?
Thanks in advance!
lerroring and canceling the question is the reason. – statox Dec 07 '17 at 17:06lwould be a no-op but evidently not. – Andy Stewart Dec 08 '17 at 09:42norm! lproduces an error when it is on the last character of a line: you ask Vim to move the cursor to the right, by default l can't change line so Vim tries to move the cursor and can't do it so it is an error. – statox Dec 08 '17 at 09:59