2007-06-21

The importance of backspace

Update - 23/6/07: Turns out, screen doesn't like TERM=xterm-color. Setting TERM to xterm in my .bash_profile fixed everything - none of the hacks below is required! Incidentally, if you want unicode support for a particular language in irssi, you need to have the locales for that language installed - at least Chinese characters didn't work for me until I installed them on debian. Then restart irssi and the screen session it is running in for good measures.



Life is all about the small things. Whilst we have big things to occupy ourselves with, the small things is what make life worth living.



One of these small things is backspace. For me, backspace is important because I am the kind of person who needs to fix what I type a lot - be it code, messages, articles. When backspace doesn't work, my inner child cries.



When I switched to using iTerm, my backspace stopped working in irssi. Thankfully a kind soul posted the solution to this problem: modify the mapping for backspace in your keyboard profile (Bookmarks->Manage Profiles...) so it sends a hexadecimal 0x8.



Horrah!



Happiness, until I tried to edit something in vim. backspace deleted stuff in vim. Inner child sheds more tears. Googling revealed some recent changes to vim in version 4 which caused this. Solution is to append the following to vimrc:



inoremap ^? ^H
set t_kb=^H
set t_kD=^?


Happy inner child again.





Cheers,

Steve