您的位置:首页 > 大数据 > 人工智能

AIX下VIM的安装

2014-04-13 16:11 375 查看
在AIX下安装vim有些需要注意的地方:

1.先从官网下载http://www.vim.org/ 最新的vim(截止2014-04-13
VIM的最新版本是7.4)
    如果懒得找就用我这个地址:http://ftp.tw.vim.org/pub/vim/unix/vim-7.4.tar.bz2
    其他版本可以在这里找到:http://ftp.tw.vim.org/pub/vim/unix/ 
2.下载下来之后,直接上传到主机上
    如果主机上没有安装bzip2可以在windows下解压之后再上传
bzip2 -d vim-7.4.tar.bz2 | tar xf - #解压文件


3.进入解压目录的源文件夹中:  
cd /home/css_app/vim/vim74/src


4.安装

    1)如果没有root权限可以先指定安装目录: 
 
export CC=gcc
export CFLAGS="-q64 -DOLDXAW" #64位处理器必须加上-q64选项,-DOLDXAW为了更好的兼容性
export LDFLAGS=-q64 #64位处理器必须加上此选项
export STRIP="strip -X64" #64位处理器必须加上此选项

./configure --prefix=/home/css_app/soft/ --enable-multibyte --disable-


 /home/css_app/soft/       #表示指定的安装目录
--enable-multibye            #使用VIM的encoding,fileecncodings等设置

准备工作如果没什么问题就可以编译了  
make                   #编译
make install           #安装

编译过程如果报错:
            ERROR: Undefined symbol: .Xutf8SetWMProperties
是因为在Xutf8SetWMProperties是linux函数库中的函数unix中没有,该函数在文件:os_unix.c中,可以将他们屏蔽

这个函数的作用是定义可以在这里查到:http://www.pps.univ-paris-diderot.fr/~jch/software/UTF8_STRING/
The XmbSetWMProperties and Xutf8SetWMProperties convenience functions provide a simple programming interface
for setting those essential window properties that are used for communicating with other clients (particularly window and session managers).
简而言之就是用来定义与其他客户端通信时的编码

5.将vim添加到环境变量中:
    vi ~/.bash_profile
    export PATH=/home/css_app/bin:$ORACLE_HOME/bin:/urs/ccs/bin:/bin:/usr/bin:$PATH:.
    :wq
    这时候已经可以使用vim。

6.如果需要vim的语法高亮功能,可以按照如下步骤进行配置:
    拷贝一份VIM的配置文件
    cp /home/css_app/share/vim/vim74/vimrc_example.vim ~/.vimrc
    修改文件:vim ~/.vimrc #在结尾添加:
if &term =~ "xterm" || &term =~ "vt100" || &term =~ "ansi"
if has("terminfo")
set t_Co=8
set t_Sf=^[[3%p1%dm
set t_Sb=^[[4%p1%dm
else
set t_Co=8
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
endif
syntax on
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  aix shell vim