This is the mail archive of the
mailing list for the Cygwin project.
Re: un-indenting doesn't work with vim
On Thu, Jul 17, 2008 at 1:45 AM, Andrew DeFaria wrote:
> Corinna Vinschen wrote:
>> WFM, but the behaviour is not identical to Ctrl-D. It doesn't use the
>> shiftwidth for one thing.
> English woman! English!
> Stated differently, on some versions of vim on some OSes, after hitting
> return while in insert mode with autoindent on I am indented. Now I know of
> Ctl-d. Still on some machines backspace backspaces and goes backward and on
> other machines, OSes, etc. while in vim and after hitting return in input
> mode after indenting by a tab, backspace does nothing but beep at me! This
> is yet another reason why I prefer Emacs over vi or vim.
Stated differently, if you didn't understand what Corinna said, you
should have looked it up.
> I must say, Unix/Linux or other such OSes, I have experienced the most times
> when hitting the frigging backspace space rarely goes backward by one
> character! Solaris/Sun's OSes are the worse culprit. Most Linux'es and
> Cygwin seem to "Do the right thing" most of the times. Rarely does backspace
> not perform a backspace on Windows.
> You dudes/dudettes need to get your S together WRT the frigging backspace
> key! How frigging hard is it?
Not very hard if you take the time to learn a bit about terminals.
<BS> on a UNIX keyboard either sends ^? or ^H. If you have "set
backspace=indent,eol,start" (or, equivalently, "set backspace=2") in
your ~/.vimrc, vim will correctly delete over automatically inserted
indentation when it recognizes that you've pressed the backspace key.
This option wasn't in the original vi, which can't be made to delete
over indentation. It's not turned on by default in vim, either,
because vim aims for vi compatibility out of the box, and assumes that
if you want vim behaviors rather than vi behaviors, then you know what
those behaviors are and can take the time to figure out how to turn
OTOH, if vim isn't recognizing your piece-of-plastic backspace key as
sending the backspace code it expects, be it ^? or ^H, then your
terminfo on the server is wrong for the terminal you connect to it
with, and one needs to be reconfigured for the correct backspace info.
Either way, the problem is with your setup, not a fundamental flaw
with the way the developers have designed things. It's no one's
problem but your own if you won't take the time to learn about things
you don't understand.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html