Nakrule
Nakrule

Reputation: 609

Can't delete character in Vim

I have the following problem with Vim: When I open a file, I can't delete any char/word if I'm in insert mode except what was not already written before opening the file.

In normal mode, every word/char delete command like x or dw work.

My .vimrc:

" Vundle configuration
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" ck the engine.
Plugin 'SirVer/ultisnips'

" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'

" colorsheme theme
Bundle 'altercation/vim-colors-solarized'

" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<S-tab>"

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal

set history=100
set number
set tabstop=3
set expandtab "use space instead of tab
set shiftwidth=3 "number of space char inserted for identation
syntax on
set background=dark
let g:solarized_termcolors = 256 
colorscheme solarized

"Build Latex
autocmd FileType tex setlocal makeprg=pdflatex\ --shell-escape\ '%' 

function CompileXeTex()
    let oldCompileRule=g:Tex_CompileRule_pdf
    let g:Tex_CompileRule_pdf = 'xelatex -aux-directory=F:/Vim/my_latex_doc/temp --synctex=-1 -src-specials -interaction=nonstopmode $*'
    call Tex_RunLaTeX()
    let g:Tex_CompileRule_pdf=oldCompileRule
endfunction
map <Leader>lx :<C-U>call CompileXeTex()<CR>

" Use fd as escape
:imap fd <Esc>

Thank you in advance for your help.

Upvotes: 5

Views: 5128

Answers (1)

zhenguoli
zhenguoli

Reputation: 2308

From Vim help manual, backspace default is "":

When the value is empty, Vi compatible backspacing is used.

Vi compatible backspacing works like <Left>. So set backspace:

" set the backspace to delete normally
set backspace=indent,eol,start

Upvotes: 11

Related Questions