dilluns, 10 d’agost del 2009

FreeBSD Install VIM Editor Without X11 GUI

You can easily build VIM without X11 under FreeBSD. First, update your ports tree, using portsnap command, enter: # portsnap fetch update Install vim without X11, enter: # cd /usr/ports/editors/vim && make WITHOUT_X11=yes install clean

To avoid install all X11 dependencies when upgrade via portupgrade, add this to /etc/make.conf:

$ vi /etc/make.conf

.if ${.CURDIR:M*/editors/vim*}
NO_GUI=yes
.endif

Optional: vim configuration

Copy /usr/local/share/vim/vimXY/vimrc_example.vim to /usr/local/share/vimrc, enter: # cp /usr/local/share/vim/vim72/vimrc_example.vim /usr/local/share/vimrc
Create your ~/.vimrc file, enter: $ vi ~/.vimrc
Add customization:
set nocompatible
filetype on
filetype indent on
filetype plugin on
set laststatus=2
syntax on
Save and close the file. Set bash alias, enter: $ echo "alias vi='vim'" >> ~/.bashrc
Setup INPUTRC for bash, enter: # echo 'export INPUTRC=/usr/local/etc/inputrc' >> /etc/profile
Finally, create /usr/local/etc/inputrc, enter: # cat >> /usr/local/etc/inputrc
Append config:
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

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

Fast-lane:

Cap comentari:

Publica un comentari a l'entrada