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

backspace not working

Expand Messages
  • Alexander Dietz
    Hi, I have a problem with vim I could not solve after extensive googling and trying out. I am using vi on a xterm and whenever I try to use backspace to delete
    Message 1 of 9 , Feb 1, 2010
    • 0 Attachment
      Hi,

      I have a problem with vim I could not solve after extensive googling and trying out. I am using vi on a xterm and whenever I try to use backspace to delete the character LEFT of the cursor, the RIGHT character is deleted. There is no difference between the backspace and delete key. How can I change to the desired behaviour?
      I tried a lot, including:

      fixdel
       set backspace=indent,eol,start
       set nocompatible
       set smartindent
       imap backspace <C-h>
       map! backspace <C-h>
       set backspace=2
       set bs=2
       set t_kb=<C-H>
       set backspace=^h

      and combinations of it. Nothing works, and sometimes I get the ^? sequence instead.
      Also now I even cannot mark any text with my mouse in vi. I guess I have changed something in the .vimrc which I should not have. Any ideas how to fix my .vimrc? I have pastes the actual version below:


      Thanks
        Alexander


      " copy from here start of .vimrc
      " comment: <press CTRL+V><press backspace> mean you must to press these keys in that order

      "set t_kb=<press CTRL+V><press backspace>
      "fixdel

      set nocompatible
      "set backspace=indent,eol,start
      ":set backspace=2
      " to have mouse enabled in normal mode
      set mouse=n

          " enter spaces when tab is pressed:
          set expandtab
          " do not break lines when line lenght increases
          set textwidth=0
          " user 4 spaces to represent a tab
          set tabstop=4
          set softtabstop=4
          " number of space to use for auto indent
          " you can use >> or << keys to indent current line or selection
          " in normal mode.
          set shiftwidth=4
          " Copy indent from current line when starting a new line.
          set autoindent
          " makes backspace key more powerful.
          "set backspace=indent,eol,start
          " shows the match while typing
          set incsearch
          " case insensitive search
          set ignorecase
          " show line and column number
          set ruler
          " show some autocomplete options in status bar
          set wildmenu

          " automatically save and restore folds
          au BufWinLeave * mkview
          au BufWinEnter * silent loadview

          syntax on

          " this lets us put the marker in the file so that
          " it can be shared across and stored in version control.
          set foldmethod=marker
          " this is for python, put
          " # name for the folded text # {{{
          " to begin marker and
          " # }}}
          " close to end it.
          set commentstring=\ #\ %s
          " default fold level, all open, set it 200 or something
          " to make it all closed.
          set foldlevel=0

          " share clipboard with windows clipboard
          set clipboard+=unnamed

          " set viminfo='100,f1
          " minibufexplorer settings:j
          let g:miniBufExplMapWindowNavArrows = 1
          let g:miniBufExplMapCTabSwitchWindows = 1

          fixdel
          "set backspace=indent,eol,start
          "set nocompatible
          "set smartindent
          imap backspace <C-h>
          "#map! backspace <C-h>
          set nocompatible
          set backspace=2
          set bs=2
          "set t_kb=<C-H>
          "set backspace=^h

      " copy to here end of .vimrc



      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • bill lam
      Perhaps it is the setting of xterm, search for backarrowKey inside this webpage. http://invisible-island.net/xterm/xterm.faq.html -- regards,
      Message 2 of 9 , Feb 1, 2010
      • 0 Attachment
        Perhaps it is the setting of xterm, search for 'backarrowKey' inside
        this webpage.

        http://invisible-island.net/xterm/xterm.faq.html

        --
        regards,
        ====================================================
        GPG key 1024D/4434BAB3 2008-08-24
        gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Bee
        ... Try stating with your vimrc disabled: vim -u NONE Does it work ok? -- Bill Santa Cruz, California -- You received this message from the vim_use maillist.
        Message 3 of 9 , Feb 1, 2010
        • 0 Attachment
          Alexander Dietz wrote:
          > I have a problem with vim I could not solve after extensive googling and
          > trying out. I am using vi on a xterm and whenever I try to use backspace to
          > delete the character LEFT of the cursor, the RIGHT character is deleted.
          > There is no difference between the backspace and delete key. How can I
          > change to the desired behaviour?

          Try stating with your vimrc disabled:

          vim -u NONE

          Does it work ok?

          --
          Bill
          Santa Cruz, California

          --
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • Alexander Dietz
          Hi, ... absolutely not, its worse than before. I get ^? characters (for backspace) and I cannot navigate using the arrow keys anymore. Cheers Alex ... -- You
          Message 4 of 9 , Feb 1, 2010
          • 0 Attachment
            Hi,

            On Tue, Feb 2, 2010 at 06:53, Bee <200309@...> wrote:
            Alexander Dietz wrote:
            > I have a problem with vim I could not solve after extensive googling and
            > trying out. I am using vi on a xterm and whenever I try to use backspace to
            > delete the character LEFT of the cursor, the RIGHT character is deleted.
            > There is no difference between the backspace and delete key. How can I
            > change to the desired behaviour?

            Try stating with your vimrc disabled:

            vim -u NONE

            Does it work ok?

            absolutely not, its worse than before. I get ^? characters (for backspace) and I cannot navigate using the arrow keys anymore.
             

            Cheers
              Alex


            --
            Bill
            Santa Cruz, California

            --
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php

            --
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Alexander Dietz
            Hi, is this page showing some configuration settings I can try to change? Which file are they in? Its the .bashrc or .cshrc? I cannot see any file mentioned in
            Message 5 of 9 , Feb 1, 2010
            • 0 Attachment
              Hi,

              is this page showing some configuration settings I can try to change? Which file are they in? Its the .bashrc or .cshrc? I cannot see any file mentioned in this entry.

              Alex


              On Tue, Feb 2, 2010 at 01:00, bill lam <cbill.lam@...> wrote:
               Perhaps it is the setting of xterm, search for 'backarrowKey' inside
               this webpage.

               http://invisible-island.net/xterm/xterm.faq.html

              --
              regards,
              ====================================================
              GPG key 1024D/4434BAB3 2008-08-24
              gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

              --
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php

              --
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • Benjamin R. Haskell
              ... I just ran into the same problem on a virtual host. The following worked for me inside my .vimrc: set t_kb=^? (where the ^? was entered by typing Ctrl+V
              Message 6 of 9 , Feb 1, 2010
              • 0 Attachment
                On Tue, 2 Feb 2010, Alexander Dietz wrote:

                > Hi,
                >
                > On Tue, Feb 2, 2010 at 06:53, Bee <200309@...> wrote:
                >
                > > Alexander Dietz wrote:
                > > > I have a problem with vim I could not solve after extensive
                > > > googling and trying out. I am using vi on a xterm and whenever I
                > > > try to use backspace to delete the character LEFT of the cursor,
                > > > the RIGHT character is deleted. There is no difference between
                > > > the backspace and delete key. How can I change to the desired
                > > > behaviour?
                > >
                > > Try stating with your vimrc disabled:
                > >
                > > vim -u NONE
                > >
                > > Does it work ok?
                > >
                >
                > absolutely not, its worse than before. I get ^? characters (for
                > backspace) and I cannot navigate using the arrow keys anymore.
                >

                I just ran into the same problem on a virtual host. The following
                worked for me inside my .vimrc:

                set t_kb=^?
                (where the '^?' was entered by typing Ctrl+V Backspace in insert mode.
                NOT circumflex + question mark -- see :help i_CTRL-V )

                In your .vimrc that you included in your earlier message, you appeared
                to not type (in insert mode) Ctrl+V Backspace, but rather had the
                literal text (^) followed by (h), which seems backwards from what you
                want anyway. (If you're getting ^? when you type 'Backspace', you
                should set t_kb to that value... but using the literal terminal
                characters.)

                --
                Best,
                Ben

                --
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
              • Benjamin R. Haskell
                ... They are X11 resources. You can often put them in $HOME/.Xdefaults and they might get sourced by your window manager. If not, you can manually run: xrdb
                Message 7 of 9 , Feb 1, 2010
                • 0 Attachment
                  > On Tue, 2 Feb 2010, Alexander Dietz wrote:
                  >
                  > > On Tue, Feb 2, 2010 at 01:00, bill lam <cbill.lam@...> wrote:
                  > > Perhaps it is the setting of xterm, search for 'backarrowKey' inside
                  > > this webpage.
                  > >
                  > > http://invisible-island.net/xterm/xterm.faq.html
                  > >
                  >
                  > is this page showing some configuration settings I can try to change?
                  > Which file are they in? Its the .bashrc or .cshrc? I cannot see any
                  > file mentioned in this entry.
                  >

                  They are X11 resources. You can often put them in $HOME/.Xdefaults and
                  they might get sourced by your window manager. If not, you can manually
                  run:

                  xrdb < ~/.Xdefaults

                  or add that line to your $HOME/.xinitrc

                  In ~/.Xdefaults itself, you might have the following, for example:

                  *backarrowKey: false

                  But, there's a lot of info on that page, and *backarrowKey is only one
                  possibility.

                  --
                  Best,
                  Ben

                  --
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                • Christian Brabandt
                  ... When I had problems like that (which occured usually also in the terminal, I fixed that using stty: stty erase ^? where the last part is typed literally
                  Message 8 of 9 , Feb 1, 2010
                  • 0 Attachment
                    On Tue, February 2, 2010 8:00 am, Benjamin R. Haskell wrote:
                    > I just ran into the same problem on a virtual host. The following
                    > worked for me inside my .vimrc:
                    >
                    > set t_kb=^?
                    > (where the '^?' was entered by typing Ctrl+V Backspace in insert mode.
                    > NOT circumflex + question mark -- see :help i_CTRL-V )
                    >
                    > In your .vimrc that you included in your earlier message, you appeared
                    > to not type (in insert mode) Ctrl+V Backspace, but rather had the
                    > literal text (^) followed by (h), which seems backwards from what you
                    > want anyway. (If you're getting ^? when you type 'Backspace', you
                    > should set t_kb to that value... but using the literal terminal
                    > characters.)

                    When I had problems like that (which occured usually also in the
                    terminal, I fixed that using stty:
                    stty erase ^?
                    where the last part is typed literally (e.g. by pressing
                    <Ctrl-V><BS> so ^? is only one character).

                    Afterwards, vi/vim was working as I expected it.

                    regards,
                    Christian

                    --
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                  • Alexander Dietz
                    Hi, ... it seems that this works! I have no idea why, but it really seem to work. Thanks a lot! Cheers Alex ... -- You received this message from the vim_use
                    Message 9 of 9 , Feb 2, 2010
                    • 0 Attachment
                      Hi,

                      On Tue, Feb 2, 2010 at 08:00, Benjamin R. Haskell <vim@...> wrote:
                      On Tue, 2 Feb 2010, Alexander Dietz wrote:



                      I just ran into the same problem on a virtual host.  The following
                      worked for me inside my .vimrc:

                      set t_kb=^?
                      (where the '^?' was entered by typing Ctrl+V Backspace in insert mode.
                      NOT circumflex + question mark -- see :help i_CTRL-V )

                      it seems that this works! I have no idea why, but it really seem to work. Thanks a lot!


                      Cheers
                        Alex

                       

                      In your .vimrc that you included in your earlier message, you appeared
                      to not type (in insert mode) Ctrl+V Backspace, but rather had the
                      literal text (^) followed by (h), which seems backwards from what you
                      want anyway.  (If you're getting ^? when you type 'Backspace', you
                      should set t_kb to that value... but using the literal terminal
                      characters.)

                      --
                      Best,
                      Ben

                      --
                      You received this message from the "vim_use" maillist.
                      For more information, visit http://www.vim.org/maillist.php

                      --
                      You received this message from the "vim_use" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                    Your message has been successfully submitted and would be delivered to recipients shortly.