delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/17/04:41:41

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <17393e3e0807170141v6dcc5088kc1d23ab59653a24e@mail.gmail.com>
Date: Thu, 17 Jul 2008 04:41:15 -0400
From: "Matt Wozniski" <godlygeek AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: un-indenting doesn't work with vim
In-Reply-To: <g5mm98$sl4$1@ger.gmane.org>
MIME-Version: 1.0
References: <f68d89470807110553k2bc71311p799af2cc02e99af8 AT mail DOT gmail DOT com> <20080711130135 DOT GO24644 AT calimero DOT vinschen DOT de> <f68d89470807160249t7ccd06e5o90e0ff5a606819df AT mail DOT gmail DOT com> <g5l5cg$doi$1 AT ger DOT gmane DOT org> <20080716155746 DOT GR24644 AT calimero DOT vinschen DOT de> <g5mm98$sl4$1 AT ger DOT gmane DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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!

Respectful.

> 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
them on.

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.

~Matt

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019