On Tue, Jun 25, 2013 at 1:16 PM, Tony Mechelynck
<[email protected]> wrote:
> Looks like a feature, not a bug, to me. Vim does not always follow what the
> POSIX pundits decreed from their high thrones that vi “must” do, especially
> not in 'nocompatible' mode but not even in 'compatible' mode, unless
> $VIM_POSIX is set (or the individual POSIX flags are set in addition to the
> 'compatible' ones).
>
> The Vim documentation clearly specifies :s[ubstitute], :sus[pend], st[op],
> which, in the notation used in Vim help files, means that:
> :s
> :su
> :sub
> :subs
> :subst
> :substi
> :substit
> :substitu
> :substitut
> :substitute
>         all mean the same,
>
> and (since :stop and :suspend are synonymous not only in Vim but also in vi
> and ex):
> :sus
> :susp
> :suspe
> :suspen
> :suspend
> :st
> :sto
> :stop
>         also all mean the same.
>
> IMHO the mention of s[ubstitute] and su[spend] in the POSIX manual is where
> the bug lies, since it implies that :su would mean _both_ :suspend and
> :substitute. Since the popular :s command is a well-known abbreviation for
> :substitute, it follows (by analogy with all other ex-commands used in Vim)
> that :su, :sub, :subs, etc. mean the same. An additional letter must be used
> for :sus[pend] to avoid ambiguity, or people who want to press as few keys
> as possible, :st[op] comes to the rescue.
>
> To have :s = :substitute, :su = :suspend, :sub = :substitute would be
> illogical and would add an element of surprise for people like me, who never
> used legacy vi.

Here's another way of looking at it. If by abbreviating a command you
mean to save on keystrokes then the POSIX behaviour is indeed optimal;
:s gives :substitute, :su gives :suspend. Now the POSIX behaviour
becomes a feature: maximum efficiency, minimum keystrokes.

Anyway, I'd be surprised if somebody preferred :su over :s to abbreviate
:substitute.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui