CentOS 6 x 下安裝配置 gvim

2021-07-04 08:02:29 字數 3377 閱讀 5811

wget
2. 使用tar解壓bz2檔案

tar -jxvf vim-7.4.tar.bz2
3. 進入解壓後的vim74目錄,進行配置和安裝

cd vim74

./configure --enable-gui=auto --enable-cscope --enable-multibyte --enable-xim --enable-fontset --with-features=huge --with-x --prefix=/opt/vim74

make

make install

4. 配置和安裝過程並沒有報錯,但是安裝好後卻發現只有vim,沒有gvim。

5. 使用vim --version或者在vim視窗輸入:version,檢視

/opt/vim74/bin/vim --version

--or--

/opt/vim74/bin/vim

:version

可以看到如下圖的輸出,發現giu沒有安裝,進一步發現「feature not included"中包括x11。(見圖中紅框部分)

6. 回過頭去查剛才configure的輸出,發現了如下的輸出:

checking if x11 header files can be found... no

checking --enable-gui argument... no gui support

checking x11/sm/smlib.h usability... no

checking x11/sm/smlib.h presence... no

checking for x11/sm/smlib.h... no

no gui selected; xim has been disabled

no gui selected; fontset has been disabled

7. 繼續上網查資料,經過排查,發現是libxt-dev和gtk2-devel包沒有安裝,使用yum進行安裝

yum install libxt-devel gtk2-devel
8. 刪除剛才的安裝並清空編譯的中間檔案

cd vim74

make uninstall

make clean

rm -f src/auto/config.cache

9. 重新執行命令進行編譯和安裝

cd vim74

./configure --enable-gui=auto --enable-cscope --enable-multibyte --enable-xim --enable-fontset --with-features=huge --with-x --prefix=/opt/vim74

make

make install

10. 這次

configure的輸出中包括了giu配置,並且gvim被成功的編譯和安裝。[1]

checking if x11 header files can be found... yes

checking for _xdmcpauthdoit in -lxdmcp... yes

checking for iceopenconnection in -lice... yes

checking for xpmcreatepixmapfromdata in -lxpm... yes

checking if x11 header files implicitly declare return values... no

checking size of wchar_t is 2 bytes... no

checking --enable-gui argument... yes/auto - automatic gui support

checking whether or not to look for gtk+ 2... yes

checking whether or not to look for gnome... no

checking whether or not to look for motif... yes

checking whether or not to look for athena... yes

checking whether or not to look for nextaw... yes

checking whether or not to look for carbon... yes

11. 執行以下命令進行鏈結以便識別vim命令

cd /usr/bin

mv vim vim72

ln -s /opt/vim74/bin/vim /usr/bin/vim

ln -s /opt/vim74/bin/gvim /usr/bin/gvim

12. 在~/.vimrc中為gvim進行基本配置

syn on

"set guifont=luxi/ mono/ 9 "

set guifont=courier\ 10\ pitch\ 11

set tabstop=4

set shiftwidth=4

set autoindent

set backspace=2

set smartindent

set ai!

set ic

set scs

set nu!

set showmatch

set ruler

set incsearch

set nocp

set hls

set backspace=indent,eol,start

set et

set smarttab

set whichwrap=b,s,,[,]

1. centos 6.4 編譯安裝vim7.4,解決沒有gvim的問題

2. 原始碼安裝vim74--開啟系統剪下版功能--以及clipboard

3. building gvim 7.4 on centos 6.4

4. 初學者vim配置(.vimrc for beginners)

5. 曬曬我的vimrc配置【不定期更新】

CentOS 6 X 網路配置

centos 6.x 最新的版本安裝後,網路不會自動啟用了 做如下配置 1,vi etc sysconfig network scripts ifcfg eth0 device eth0 網路裝置名稱 name eth0 名稱 type ethernet 網路型別 onboot yes 裝置啟用 b...

Centos6 x 網絡卡配置

臨時生效 ifconfig eth0 要設定的ip位址 設定ip位址和子網掩碼 臨時生效 例1 ifconfig eth0 192.168.100.10 24 例2 ifconfig eth0 192.168.100.10 netmask 255.255.255.0 例3 給網絡卡設定子網絡卡 if...

Centos 6 X 安裝Mysql及簡單配置

wget 新增yum源 yum localinstall mysql57 community release el6 11.noarch.rpm 安裝yum install mysql community server yum install mysql devel 啟動mysql服務 servic...