vim在命令行下安装

对于像我这样刚开始接触FreeBSD的新手来说,可能用不习惯FreeBSD下的VI.今天我就说一下,如何在FreeBSD下安装像Linux一样的VI(VIM)

首先我们从ports安装!

whereis vim
vim: /usr/ports/editors/vim
由于是终端上,VIM默认是装上XORG,但是这个根本就不需要,所以要运行
make -DWITHOUT_X11 install


这样就把X11去掉了,就不会装上了

具体可以通过
grep define Makefile 查看

这样一会就安装好了!

然后:

mv /usr/bin/vi /usr/bin/vi.bak
cp /usr/local/bin/vim /usr/bin/vi

如果需要修改 .cshrc

然后再
/usr/local/share/vim/vim70/里有一个vimrc_xxx的文件,你把它cp到/usr/local/share/vim/,改名为vimrc

关于 Timo
XNIX SA & MYSQL DBA

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: