Sunday, March 07, 2010

FreeBSD Del/Backspace Problem

Though it has been discussed over and over, here's the solution I used right now to solve all delete/backspace key issues in FreeBSD csh (and in screen/vim as well)

Add to ~/.cshrc

bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word

Add to ~/.vimrc

set nocompatible
set backspace=start "some said set bs=2 would also work, but I didn't try it