Updating to 7.4 broke backspace

741 views
Skip to first unread message

Charlie Andrews

unread,
Aug 12, 2013, 8:37:35 AM8/12/13
to vim...@googlegroups.com
I built Vim 7.4 yesterday, and I am unable to backspace in Insert mode or delete (d) in Command mode. I rolled back to 7.3 and everything works fine. Is this a known issue?

A little info:

OS: OSX 10.8.4
Shell: zsh
Terminal Emulator: iTerm 2
Vim plugins:
- pathogen
- powerlin

Ben Fritz

unread,
Aug 12, 2013, 10:31:07 AM8/12/13
to vim...@googlegroups.com

Have you tried without any plugins or config, with "vim -N -u NONE -i NONE"?

I assume you know about backspace not being able to delete stuff you didn't just insert, unless you set the 'backspace' option to sane values. But you also mentioned the 'd' command which should always work.

Is 'modifiable' set to on? Does Vim give any sort of error message? What specific full command did you use for delete? E.g. dw, dap, dd, etc.

孟建

unread,
Aug 13, 2013, 2:01:40 AM8/13/13
to vim...@googlegroups.com
set backspace=2 " make backspace work like most other apps
checkout here:
http://vim.wikia.com/wiki/Backspace_and_delete_problems

Charlie Andrews

unread,
Aug 13, 2013, 8:35:19 AM8/13/13
to vim...@googlegroups.com

I actually didn't know about that change of backspace. I didn't find that on a cursory web search. Do you have any resources on this change or why they did it? I find it odd.

Thanks for the quick reply,
Charlie

Christian Brabandt

unread,
Aug 13, 2013, 9:10:51 AM8/13/13
to vim...@googlegroups.com
There was no such change. the backspace option has always been there
and if you started Vim in compatible mode, you would see this behaviour.

regards,
Christian

Charlie Andrews

unread,
Aug 13, 2013, 9:28:20 AM8/13/13
to vim...@googlegroups.com

Hmmm I never had the behavior before 7.4. I didn't change anything in my .vimrc either.

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/nYFinm0hTjY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Christian Brabandt

unread,
Aug 13, 2013, 10:01:49 AM8/13/13
to vim...@googlegroups.com
(Please don't top poste. Only quote the relevant part and put
your answer below it).

On Tue, August 13, 2013 15:28, Charlie Andrews wrote:
> Hmmm I never had the behavior before 7.4. I didn't change anything in my
> .vimrc either.

You either have it in your .vimrc already (and vim 7.4 didn't find
it and therefore starts in compatible mode) or some other
system vimrc must have included it.

You might want to check out the :version output to see, where vim
is looking for .vimrc files and use :scriptnames to find out,
which files have been loaded.

regards,
Christian

Charlie Andrews

unread,
Aug 13, 2013, 10:17:11 AM8/13/13
to vim...@googlegroups.com
(My phone automatically writes to the top on a reply, sorry)
Yeah I think it was a system .vimrc because I installed 7.3 from
homebrew for mac. Homebrew is always bringing in a ton of stuff.

Ben Fritz

unread,
Aug 13, 2013, 12:01:18 PM8/13/13
to vim...@googlegroups.com
On Tuesday, August 13, 2013 9:01:49 AM UTC-5, Christian Brabandt wrote:
> (Please don't top poste. Only quote the relevant part and put
>
> your answer below it).
>
>
>
> On Tue, August 13, 2013 15:28, Charlie Andrews wrote:
>
> > Hmmm I never had the behavior before 7.4. I didn't change anything in my
>
> > .vimrc either.
>
>
>
> You either have it in your .vimrc already (and vim 7.4 didn't find
>
> it and therefore starts in compatible mode) or some other
>
> system vimrc must have included it.
>
>

Actually 'backspace' defaults to an empty string even in nocompatible mode. You always need to set it to something not broken.

>
> You might want to check out the :version output to see, where vim
>
> is looking for .vimrc files and use :scriptnames to find out,
>
> which files have been loaded.
>

Also, regardless of the 'backspace' setting, using 'd' in normal mode ought to work.

Charlie...what exact normal-mode command did you use that didn't delete text?

Does the 'backspace' setting fix your problems in insert mode?

Charlie Andrews

unread,
Aug 13, 2013, 12:35:32 PM8/13/13
to vim...@googlegroups.com
All my command mode stuff was working fine and yes, setting 'backspace'
worked. I'm still curious as to why my backspace was working before. I
just checked and I have no other '.vimrc' file besides the one in my
home directory. Is there somewhere else settings are kept? Just curious,
at this point 7.4 is working with the 'set backspace=2'.

-Charlie

Ben Fritz

unread,
Aug 13, 2013, 12:57:02 PM8/13/13
to vim...@googlegroups.com
On Tuesday, August 13, 2013 11:35:32 AM UTC-5, Charlie Andrews wrote:
>
> All my command mode stuff was working fine and yes, setting 'backspace'
>
> worked.

Good, I'm glad it's resolved.

> I'm still curious as to why my backspace was working before. I
>
> just checked and I have no other '.vimrc' file besides the one in my
>
> home directory. Is there somewhere else settings are kept? Just curious,
>
> at this point 7.4 is working with the 'set backspace=2'.
>

:version output tells where various vimrc and gvimrc files are checked. In particular on Windows, these files are checked outside of your $HOME directory (in addition to those in your $HOME and $HOME\vimfiles directories):

$VIM\vimrc
$VIM\_vimrc
$VIM\_exrc
$VIM\_exrc
$VIM\gvimrc
$VIM\_gvimrc

If you still have an old copy of Vim around that worked for you by default, check the output in that Vim of:

:verbose set backspace?

This should tell you not only what value it is set to, but also what script set it that way.

Ben Fritz

unread,
Aug 13, 2013, 12:58:35 PM8/13/13
to vim...@googlegroups.com
On Tuesday, August 13, 2013 11:57:02 AM UTC-5, Ben Fritz wrote:
> On Tuesday, August 13, 2013 11:35:32 AM UTC-5, Charlie Andrews wrote:
> >
> > All my command mode stuff was working fine and yes, setting 'backspace'
> >
> > worked.
>
> Good, I'm glad it's resolved.
>
> > I'm still curious as to why my backspace was working before. I
> >
> > just checked and I have no other '.vimrc' file besides the one in my
> >
> > home directory. Is there somewhere else settings are kept? Just curious,
> >
> > at this point 7.4 is working with the 'set backspace=2'.
> >
>
> :version output tells where various vimrc and gvimrc files are checked. In
> particular on Windows, these files are checked outside of your $HOME
> directory

I'm not sure why I thought you were on Windows, you said specifically OSX.

Still, the :version output will be helpful...but I don't know what it will tell you exactly. There will be a "system vimrc file" at least, and maybe some others.

Tony Mechelynck

unread,
Aug 13, 2013, 7:29:15 PM8/13/13
to vim...@googlegroups.com
On 13/08/13 18:35, Charlie Andrews wrote:
[...]
> All my command mode stuff was working fine and yes, setting 'backspace'
> worked. I'm still curious as to why my backspace was working before. I
> just checked and I have no other '.vimrc' file besides the one in my
> home directory. Is there somewhere else settings are kept? Just curious,
> at this point 7.4 is working with the 'set backspace=2'.
>
> -Charlie
>

The file $VIMRUNTIME/vimrc_example.vim contains a lot of useful
settings, and among them the line

set backspace=indent,eol,start

If your vimrc sourced it before and now doesn't, or if it still tries to
source it but at a location where it doesn't exist anymore (for
instance, the equivalent of $VIM/vim73 which would be the $VIMRUNTIME of
Vim 7.3 but not of Vim 7.4), that would explain why suddenly the
backspace key refused to go past a line break or past the start of
insert (whichever it meets first).

To find the vimrc_example.vim at the proper location for whichever
version of Vim you may be using, use one (and only one) of
:source $VIMRUNTIME/vimrc_example.vim
or
:runtime vimrc_example.vim
They are equivalent except in the rare case where you would have a file
of the same name in ~/.vim or in $VIM/vimfiles

I still see no explanation to your stated impossibility to delete with
the d command, however, unless you tried it in a file with
'nomodifiable' set on it, e.g. a helpfile. Ben repeatedly asked which
exact d{motion} command you used where, but you didn't answer.

See
:help 'backspace'
:help $VIMRUNTIME
:help :source
:help :runtime
:help 'modifiable'


Best regards;
Tony.
--
As the system comes up, the component builders will from time to time
appear,
bearing hot new versions of their pieces -- faster, smaller, more complete,
or putatively less buggy. The replacement of a working component by a new
version requires the same systematic testing procedure that adding a new
component does, although it should require less time, for more complete and
efficient test cases will usually be available.
-- Frederick Brooks Jr., "The Mythical Man Month"

Charlie Andrews

unread,
Aug 13, 2013, 8:04:00 PM8/13/13
to vim...@googlegroups.com
the 'd' command worked fine. I did not test fully. Also, I believe
everyone's assumptions were true that I was sourcing some other config
file. Thanks everyone!

-Charlie
Reply all
Reply to author
Forward
0 new messages