Friday, August 7, 2009

Bash and VIM issue with SFU

After BASH is running , I am facing issue with the key at BASH and VIM and facing delay when trying to launch VIM.

I found this http://www.suacommunity.com/forum/tm.aspx?m=7935.

1. Fix delete, home and end in bash

$HOME/.inputrc:
# Delete
"\e[3~": delete-char

# Home
"\e[1~": beginning-of-line

# End
"\e[4~": end-of-line



2. Fix home and end in vim

To get "^[[1~" you need to press , to get "^[[4~" you need to press .

$HOME/.exrc:
map ^[[1~ 0
map
! ^[[1~ ^[0i

map
^[[4~ $
map
! ^[[4~ ^[$a



3. Fix backspace and delete in vim

To get "^?" you need to press . The "I" at the end of shortmess disables the startup blurb.

$HOME/.vimrc:
:set t_kb=^?
:fixdel
:set shortmess=filnxtToOI



4. Alias vi and vim

The -X stops vim wasting 10 seconds trying to connect to a non-existant X server.

Appended to /etc/profile.lcl
alias vim="vim -X"
alias vi="vim -X"

Hope this will help to solve your problem.



---

No comments:

Post a Comment

Feel free to leave your question or comment here, we will reply you as soon as possible.