Loading ...
Sorry, an error occurred while loading the content.

weird backspace behaviour on macbook

Expand Messages
  • Achim Staebler
    hi list, i have a weird problem with the backspace key on my macbook pro, which only occurs in graphical mode - i.e. console vi is fine. when in insert mode,
    Message 1 of 5 , Jul 6, 2006
    • 0 Attachment
      hi list,

      i have a weird problem with the backspace key on my macbook pro, which
      only occurs in graphical mode - i.e. console vi is fine.

      when in insert mode, pressing backspace yields the following: the
      current word is deleted {at least that's what if figured out) and an 'h'
      is inserted.

      situation before backspace is pressed (_ indicates cursor):
      abcd ef_
      after backspace:
      abcd h_

      pressing backspace again has no effect whatsoever. only escaping to
      command mode and x-ing the h removes it.

      h - ctrl-h, that's what i thought at first. i searched the web for some
      days, read the documentation and believe my settings are correct. they are:

      achim@macbook:~ $ gvim --version|head -n 1
      VIM - Vi IMproved 7.0 (2006 May 7, compiled May 8 2006 12:56:43)

      achim@macbook:~ $ stty -a
      speed 9600 baud; 60 rows; 110 columns;
      lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
      -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
      -extproc
      iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
      brkint -inpck -ignpar -parmrk
      oflags: opost onlcr -oxtabs -onocr -onlret
      cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
      -dtrflow -mdmbuf
      cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
      eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
      min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
      stop = ^S; susp = ^Z; time = 0; werase = ^W;

      settings unchanged, i.e. provided by apple. setting erase to ^H does not
      help.

      achim@macbook:~ $ echo $TERM
      xterm-color

      again, terminfo provided by apple.

      relevant window settings of my terminal ([ ] = unchecked)

      emulation:
      [ ] Escape non-ASCII
      [ ] Strict VT-100 keypad behaviour

      display:
      [ ] Wide glyphs for Japanese/Chinese/etc.
      [ ] Wide glyphs count as 2 columns
      character set encoding: Unicode (UTF-8)

      keyboard:
      (standard key mappings provided by apple), among them:
      del (forward delete) maps to \033[3~
      [ ] delete key sends backspace
      [ ] use option key as meta key

      my input settings are set to US extended keymap (i.e. Unicode script)

      .vimrc is the default one provided by the mac os x package, containing
      the lines
      set nocompatible
      set backspace=indent,eol,start

      i added
      set encoding=utf-8
      set termenconding=utf-8

      and that's where i'm out of clues. any hints on how to fix my backspace key?

      thanks,
      achim.
    • Benji Fisher
      ... [snip] Can you delete characters normally using CTRL-H? What do you get if you type (not literally!) in Insert mode? Just in case, how
      Message 2 of 5 , Jul 7, 2006
      • 0 Attachment
        On Fri, Jul 07, 2006 at 12:54:19AM +0200, Achim Staebler wrote:
        > hi list,
        >
        > i have a weird problem with the backspace key on my macbook pro, which
        > only occurs in graphical mode - i.e. console vi is fine.
        >
        > when in insert mode, pressing backspace yields the following: the
        > current word is deleted {at least that's what if figured out) and an 'h'
        > is inserted.
        >
        > situation before backspace is pressed (_ indicates cursor):
        > abcd ef_
        > after backspace:
        > abcd h_
        >
        > pressing backspace again has no effect whatsoever. only escaping to
        > command mode and x-ing the h removes it.
        >
        > h - ctrl-h, that's what i thought at first. i searched the web for some
        > days, read the documentation and believe my settings are correct. they are:
        >
        > achim@macbook:~ $ gvim --version|head -n 1
        > VIM - Vi IMproved 7.0 (2006 May 7, compiled May 8 2006 12:56:43)
        [snip]

        Can you delete characters normally using CTRL-H? What do you get
        if you type <C-V><Backspace> (not literally!) in Insert mode? Just in
        case, how about

        :imap <C-V><Backspace>

        HTH --Benji Fisher
      • Achim Staebler
        ... No i can t. CTRL-H shows the same strange behaviour. produces ^H in insert mode. So it seems that C-H isn t working as it should. Perhaps
        Message 3 of 5 , Jul 8, 2006
        • 0 Attachment
          Benji Fisher wrote:

          > Can you delete characters normally using CTRL-H? What do you get
          > if you type <C-V><Backspace> (not literally!) in Insert mode?
          No i can't. CTRL-H shows the same strange behaviour. <C-V><Backspace>
          produces ^H in insert mode. So it seems that C-H isn't working as it
          should. Perhaps it has something to do with the missing delete key on
          the macbook? You can produce delete key behaviour with Fn-Backspace.

          Achim.
        • Benji Fisher
          ... Please answer the last question. It does not seem very likely, but I would like to rule out the unlikely, easy reasons before straining my brain to come
          Message 4 of 5 , Jul 8, 2006
          • 0 Attachment
            On Fri, Jul 07, 2006 at 02:57:49PM -0400, Benji Fisher wrote:
            >
            > Can you delete characters normally using CTRL-H? What do you get
            > if you type <C-V><Backspace> (not literally!) in Insert mode? Just in
            > case, how about
            >
            > :imap <C-V><Backspace>
            >
            > HTH --Benji Fisher

            On Sun, Jul 09, 2006 at 01:22:51AM +0200, Achim Staebler wrote:
            > Benji Fisher wrote:
            >
            > > Can you delete characters normally using CTRL-H? What do you get
            > >if you type <C-V><Backspace> (not literally!) in Insert mode?
            > No i can't. CTRL-H shows the same strange behaviour. <C-V><Backspace>
            > produces ^H in insert mode. So it seems that C-H isn't working as it
            > should. Perhaps it has something to do with the missing delete key on
            > the macbook? You can produce delete key behaviour with Fn-Backspace.
            >
            > Achim.

            Please answer the last question. It does not seem very likely, but
            I would like to rule out the unlikely, easy reasons before straining my
            brain to come up with something more likely. I do not have a MacBook
            Pro, and I cannot reproduce this behavior on my old PowerBook. You
            might also try the variant

            :imap <C-V><C-H>

            Another idea: one of the many ideas suggested under

            :help :fixdel

            may be appropriate.

            HTH --Benji Fisher
          • Achim Staebler
            ... sorry, must have mist the last one. i am glad you asked again, since this was the cause of the problem: i used to have a mapping from C-H to C-W h.
            Message 5 of 5 , Jul 9, 2006
            • 0 Attachment
              Benji Fisher wrote:

              > Please answer the last question. It does not seem very likely, but
              > I would like to rule out the unlikely, easy reasons before straining my
              > brain to come up with something more likely.
              sorry, must have mist the last one. i am glad you asked again, since
              this was the cause of the problem: i used to have a mapping from C-H to
              C-W h. definitely worked on my desktop machine, but i can do without it
              in exchange for a working backspace key :)

              thanks again for your help.

              achim.
            Your message has been successfully submitted and would be delivered to recipients shortly.