Vim 7.1 on Solaris with color syntax and functional backspace key

Compiling VIM
Fortunately vim is a breeze to compile on Solaris as doesn’t really depend on much. I got the source code from www.vim.org/download.php and did .configure && make and finally make install.

Color syntax highlighting
The real reason I wanted to install this new version of vim was to get color highlighting and I was a little disappointed when it turned out that it didn’t do color highlighting. The reason for this was the $TERM variable – in the colsole this was set to xterm which vim inherited, so to change this I altered .vimrc to include this line


set term=linux
set background=dark
syntax on

The backspace problem
Even more annoying was the backspace key. When I pressed backspace it wouldn’t delete one character back but instead inserted ^?. Again the solution was easy (after I figured it out). I altered .vimrc to include this line


set bs=2

As this problem also appeared in the normal console the solution was to alter .bashrc to contain the lines below. The command changes the terminal line settings:


stty intr
stty erase
stty echoe
  • Share/Bookmark
This entry was posted in Computer. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">