On 2007-05-18, David Pike <[EMAIL PROTECTED]> wrote:
> Uh oh... I spoke slightly too soon. Although the up/down/delete
> functions that I first asked about now behave normally, the
>
> vim -N -u NONE -i NONE
>
> option now results in "999 d<space>" deleting 999 characters,
> often well beyond those of the present line. I had been used
> to this deleting up to 999 characters, but only up to the end
> of the present line. It appears that the "set compatible"
> option had been helping me to get the desired 'this line only'
> functionality, but the "-N" option above now overrides that.
As others have written, there are more efficient ways to get the
motion you want than to use a 999 prefix. Nevertheless, I know how
it is when your fingers are used to certain ways of doing things and
besides, it ought to work right.
You said in your first post that you were using vim, so I assumed
you had been using it in non-compatible mode. Since the 999 prefix
used to work for you, and since it works for me in non-compatible
mode, I think that is a safe assumption.
I just tried another experiment and think I found the answer. I
invoked vim as "vim -u NONE" which puts it into compatible mode.
When I tried those commands, e.g., 999<down> and 999dd, I got a beep
and no cursor motion! So your new installation of vim appears to be
putting you in compatible mode whereas your previous installation
put you in non-compatible mode. Now the question is, why.
Take a look at
:help compatible-default
:help compatible
and see if you can figure out from that what might have changed with
this new installation. One way to make sure that vim starts in
non-compatible mode is to make sure you have a .vimrc file in your
HOME directory, even if the file is empty.
You may also want to have a talk with the person who performed your
vim upgrade and see if he can explain how and why the new
configuration differs from the old one. He may appreciate knowing
that something appears to have gone wrong and having the opportunity
to fix it at the system level so that each user doesn't have to fix
it for himself. This would also save you from troubleshooting this
and possibly continuing to find things that no longer work as they
used to.
As for the 999d<space> deleting characters beyond the current line,
that behavior is affected by the 'whichwrap' option. If you get the
'compatible' thing fixed and 999d<space> still deletes beyond the
current line, put this in your ~/.vimrc file:
set whichwrap-=s
See
:help whichwrap
Regards,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Mobile Broadband Division
| Spokane, Washington, USA