138313AW: compatibility with Sun's original vi for command :su
- Jun 26, 2013Bram wrote:
> The POSIX spec has a bug: it says that :s means :substitute, which meansThe compatibility mode tries to emulate the behaviour of original Sun's vi,
> anything starting with :s means :substitute, including :su. But then
> :suspend can be abbreviated to :su, that's a conflict.
even if it is a bug there. Vim does this at several places.
With a new cpo flag, the user would have a choice to configure vim to personal
habits. (I have been using original Sun vi for 10 years, typing :su, not
considering that I am using a bug. Now I am used to it.)
> cnoreabbrev <expr> suThanks Tony, this works 100% great!
> \ ((getcmdtype() == ':' && getcmdpos() <= 3)? 'suspend' : 'su')
In case you developer guys don't want a new cpo flag, maybe you want to add
Tony's line to the help page.
(see :help Y for an example of such a line in the help)
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic