Question about strict vim compatibility
Wolfgang Jenkner
wjenkner at inode.at
Fri Jan 27 18:58:40 CET 2012
On Fri, Jan 27 2012, Frank Fischer wrote:
> On Thu, Jan 26, 2012 at 04:11:36PM +0000, Eric S Fraga wrote:
>> My query is related to something that has bothered me a long time in vi
>> (and descendents): 'de' and 'dw' behave differently from 'ce' and 'cw'
>> with respect to whitespace that may be present between the current word
>> and the next. It would be nice to have 'cw' behave analogously to 'dw'
>> and actually replace the whitespace as well...
> But I agree that this is an inconsistency within Vim itself (although
> documented).
This is actually what POSIX specifies (see vi(1p) or [1]), following the
traditional behaviour.
The vim documentation states
Vim interprets "cw" as change-word, and a word does not include the
following white space.
I think of "regions" in vi as more of an implementation detail, which
doesn't belong to the editing paradigm (contrary to vanilla emacs).
Wolfgang
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html
Search for `Move to Beginning of Word'
More information about the implementations-list
mailing list