Monday, February 1, 2010

backspace not working

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

No comments: