Backspace in Vim

One of the things I like to have in VIM is the backspace key working just like in all the other editors. I like the backspace key to delete the characters in in the right-to-left direction and delete also the line breaks when it gets to the beginning of a line. However, most of default vimrc files I find don’t have this enabled. Sometimes the backspace doesn’t delete at all, other times it doe not delete the line breaks…. arghh…

To have the backspace key in VIM behaving just like in all the other text editors,  just add the following line to your vimrc file:

set backspace=indent,eol,start 

Popularity: 25% [?]

Tags: , , , . 

Related Entries:
  • No related posts


  • 7 Responses to “Backspace in Vim”

    1. Marco Rodrigues Says:

      És adepto do Sporting? Estas cores do blog “ferem” um bocado os olhos..

      Esse trick já vem como default em Ubuntu =) pelo menos no Edgy já lá tenho isso!

    2. vitor Says:

      Sou sportinguista sou :-)
      Ainda ando ha procura do theme ideal. Para agora, vai ficar este mais simples.
      Quanto ao VIM, lembro-me que no ubuntu vinha como “default”, mas no RedHat e Suse nao. Sempre que trabalho num novo servidor (a grande maioria sao redhat) e preciso de usar o VIM, la vou eu ao google procurar como se faz para por o backspace a funcionar. Agora ao menos sempre encontro a dica mais depressa :-)

    3. José Says:

      Acabaste de me salvar a vida! :)

    4. vitor Says:

      Ainda bem :-) Foi mesmo por isso que eu decidi escrever o artigo. Ja estava cheio de procurar na net de cada vez que encontrava um VIM “manhoso” :-)

    5. jmuzz Says:

      Thanks, you saved the day.

    6. Ben Spaulding Says:

      En algunos casos he tenido que añadir “:fixdel“ además de “set backspace=indent,eol,start“ a mi vimrc.

    7. artur Says:

      this solution also implemented (at least in my vim-7.1 port) in vimrc_example.vim: one just can add “source $VIMRUNTIME/vimrc_example.vim” into rc

    Leave a Reply


    Close
    E-mail It