On 24-Oct-2012 02:25:58 +0200, Ben Schmidt wrote:

> I think E163 could do with some rewording, or perhaps another error
> could be created. It seems E163 is used when there are less than two
> arguments, and E165 or E164 when there are two or more. However, the
> case when there are zero arguments is confusing. E.g.
> 
> vim -u NONE
> :n
> E163: There is only one file to edit
> :prev
> E163: There is only one file to edit
> :argu
> E163: There is only one file to edit
> 
> When there is one argument, it makes more sense:
> 
> vim -u NONE file
> :n
> E163: There is only one file to edit
> :prev
> E163: There is only one file to edit
> :argu
> (no error)
> 
> And when there is more than one, E164 and E165 are used instead, and
> make sense:
> 
> vim -u NONE file1 file2
> :prev
> E164: Cannot go before first file
> :n
> :n
> E165: Cannot go beyond last file
> :argu 0
> Zero count
> :argu 3
> E165: Cannot go beyond last file
> 
> Perhaps a new error could be created for the zero-argument case which
> says something like "There are no files to edit".
> 
> Just a thought, because I got confused by this error today.

Even when Vim is launched with no arguments, an empty buffer ("[No Name]"
representing a (so far unnamed) file is created. I guess this is meant by the
"There is only one file". When you consider buffers that have not yet been
persisted to disk as files, too, it all hopefully makes sense.

-- regards, ingo

-- 
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

Raspunde prin e-mail lui