Vim's Mac terminal will only use backspace if at the end of the line

There seems to be something strange with my Mac 10.6 terminal or with my .vimrc .

When I type backspace on the laptop keyboard, it only works when the cursor is at the end of the line. Trying to remove a string from inside does nothing. MacVim is working fine. Google did not help, because I can’t even figure out what to call this behavior.

All other backspace commands in my terminal work as expected, so I tend to be specific to Vim.

Here is the output of my mappings ~ / .vimrc, I don't see anything that would make Vim in the terminal like this:

 cflewis@coral-reef ~> egrep ".*map.*" ~/.vimrc "inoremap <expr> <CR> pumvisible() ? "\<Cy>" : "\<Cg>u\<CR>" let mapleader = "," map Q gq nmap <silent> <leader>s :set nolist!<CR> " extended '%' mapping for if/then/else/end etc map <S-Insert> <MiddleMouse> map! <S-Insert> <MiddleMouse> nmap <silent> <CN> :silent noh<CR> nmap <CE> :b#<CR> nmap <CP> :NERDTreeToggle<CR> nmap <leader>p :NERDTreeFind<CR> nmap <leader>/ :call NERDComment(0, "invert")<cr> vmap <leader>/ :call NERDComment(0, "invert")<cr> nmap <leader>t :TlistToggle<CR> nmap <leader>e :e **/ nmap <Leader>b :MiniBufExplorer<cr> nmap <Leader>sh :ConqueSplit bash<cr> nmap <Leader>r :ConqueSplit " map ,y to show the yankring nmap <leader>y :YRShow<cr> imap <silent> <Down> <Co>gj imap <silent> <Up> <Co>gk nmap <silent> <Down> gj nmap <silent> <Up> gk cmap w!! %!sudo tee > /dev/null % inoremap jj <Esc> nnoremap JJJJ <Nop> 

Any ideas would be appreciated. I tried to click the delete key to send ^ H or ^ ?, without any difference.

+43
vim terminal macos
Aug 20 '10 at 19:02
source share
2 answers

Most likely, the β€œproblem” you see is that you cannot delete anything that was not entered during the current insert mode session. This is due to the default setting for the 'backspace' parameter. Adding set backspace=indent,eol,start to your ~/.vimrc is the behavior you probably want.

+107
Aug 20 '10 at 19:12
source share

This is the only explicit backspace mapping that I have in my configuration. I don’t know if this will help your problem, but maybe it’s worth a try?

 " allow backspacing over everything in insert mode set backspace=indent,eol,start 
+12
Aug 20 '10 at 19:10
source share



All Articles