自编译 vim 在 Fedora 21 上找不到 syntax.vim
Self-compiled vim not finding syntax.vim on Fedora 21
我刚刚在本地目录中构建了 vim,因此它是自包含的。
一切顺利,我可以开始 vim/gvim 等等...
但是当我开始 vim 时,我收到以下消息:
[statquant@localhost BuildFromSources]$ ./myOwnVim/usr/bin/vim
Error detected while processing /home/statquant/.vimrc:
line 85:
E484: Can't open file /usr/share/vim/syntax/syntax.vim
Press ENTER or type command to continue
出于某种原因,我认为它不知道 $VIM
是什么。
设置后确实如此
$VIM=$HOME/BuildFromSources/myOwnVim/usr/share/vim
在 .bashrc
中获取它,它不会拾取它(在 vim 中执行 :echo
给出 /usr/share/vim
这是回退)
我应该怎么做才能正确设置它?
当 运行ning ./configure
时,您需要包含参数 --prefix=path/to/install/location
。编译后你然后 运行 make install
,这将把所有文件放在所需的位置。
这将允许您进行自定义 vim 安装。
总结:
./configure --prefix=path/to/install/location
.
make
.
make install
.
这是完整的说明
#install all packages
sudo yum install -y ruby ruby-devel \
lua lua-devel luajit luajit-devel \
ctags mercurial tcl-devel \
python python-devel python3 python3-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
需要此步骤来纠正 Fedora 20 如何安装 XSubPP 的问题
#symlink xsubpp (perl) from /usr/bin to the perl dir
sudo ln -s /usr/bin/xsubpp /usr/share/perl5/ExtUtils/xsubpp
可通过 mercurial 获取资源
#download the sources in $HOME/Sources
mkdir $HOME/Sources
cd $HOME/Sources
hg clone https://code.google.com/p/vim/
cd vim
我们构建的vim应该具备所有功能
#configure the install, vim will be located at $HOME/Build/vim
mkdir $HOME/Build/vim
./configure --with-features=huge \
--enable-fail-if-missing \
--enable-luainterp=yes \
--enable-mzschemeinterp \
--enable-perlinterp \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib64/python2.7/config \
--enable-python3interp=yes \
--enable-tclinterp=yes \
--enable-rubyinterp=yes \
--enable-cscope \
--enable-multibyte \
--enable-gui=gtk2 \
--prefix=$HOME/Build/vim \
--with-compiledby=YOU
然后安装
#install
make install
它应该是这样的
#check the install
[statquant@localhost vim]$ tree -L 3 $HOME/Build/vim/
home/statquant/Build/vim
├── bin
│ ├── eview -> vim
│ ├── evim -> vim
│ ├── ex -> vim
│ ├── gview -> vim
│ ├── gvim -> vim
│ ├── gvimdiff -> vim
│ ├── gvimtutor
│ ├── rgview -> vim
│ ├── rgvim -> vim
│ ├── rview -> vim
│ ├── rvim -> vim
│ ├── view -> vim
│ ├── vim
│ ├── vimdiff -> vim
│ ├── vimtutor
│ └── xxd
└── share
├── man
│ ├── fr
│ ├── fr.ISO8859-1
│ ├── fr.UTF-8
│ ├── it
│ ├── it.ISO8859-1
│ ├── it.UTF-8
│ ├── ja
│ ├── man1
│ ├── pl
│ ├── pl.ISO8859-2
│ ├── pl.UTF-8
│ ├── ru.KOI8-R
│ └── ru.UTF-8
└── vim
└── vim74
最后一个:
#change ~/.bashrc so you can call vim/gvim...
PATH=$PATH:$HOME/Build/vim/bin
#source your bashrc
source ~/.bashrc
#to uninstall
cd $HOME/Sources/vim
make uninstall
这就是你得到的:
[statquant@localhost vim]$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 19 2015 16:16:44)
Included patches: 1-703
Compiled by statquant
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
+balloon_eval +float +mouse_urxvt -tag_any_white
+browse +folding +mouse_xterm +tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
+clientserver -hangul_input +netbeans_intg +title
+clipboard +iconv +path_extra +toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent +python3/dyn +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con_gui +lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind +X11
+dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent +xim
+emacs_tags +mouseshape -sniff +xsmp_interact
+eval +mouse_dec +startuptime +xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop +xpm
我刚刚在本地目录中构建了 vim,因此它是自包含的。 一切顺利,我可以开始 vim/gvim 等等...
但是当我开始 vim 时,我收到以下消息:
[statquant@localhost BuildFromSources]$ ./myOwnVim/usr/bin/vim
Error detected while processing /home/statquant/.vimrc:
line 85:
E484: Can't open file /usr/share/vim/syntax/syntax.vim
Press ENTER or type command to continue
出于某种原因,我认为它不知道 $VIM
是什么。
设置后确实如此
$VIM=$HOME/BuildFromSources/myOwnVim/usr/share/vim
在 .bashrc
中获取它,它不会拾取它(在 vim 中执行 :echo
给出 /usr/share/vim
这是回退)
我应该怎么做才能正确设置它?
当 运行ning ./configure
时,您需要包含参数 --prefix=path/to/install/location
。编译后你然后 运行 make install
,这将把所有文件放在所需的位置。
这将允许您进行自定义 vim 安装。
总结:
./configure --prefix=path/to/install/location
.make
.make install
.
这是完整的说明
#install all packages
sudo yum install -y ruby ruby-devel \
lua lua-devel luajit luajit-devel \
ctags mercurial tcl-devel \
python python-devel python3 python3-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
需要此步骤来纠正 Fedora 20 如何安装 XSubPP 的问题
#symlink xsubpp (perl) from /usr/bin to the perl dir
sudo ln -s /usr/bin/xsubpp /usr/share/perl5/ExtUtils/xsubpp
可通过 mercurial 获取资源
#download the sources in $HOME/Sources
mkdir $HOME/Sources
cd $HOME/Sources
hg clone https://code.google.com/p/vim/
cd vim
我们构建的vim应该具备所有功能
#configure the install, vim will be located at $HOME/Build/vim
mkdir $HOME/Build/vim
./configure --with-features=huge \
--enable-fail-if-missing \
--enable-luainterp=yes \
--enable-mzschemeinterp \
--enable-perlinterp \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib64/python2.7/config \
--enable-python3interp=yes \
--enable-tclinterp=yes \
--enable-rubyinterp=yes \
--enable-cscope \
--enable-multibyte \
--enable-gui=gtk2 \
--prefix=$HOME/Build/vim \
--with-compiledby=YOU
然后安装
#install
make install
它应该是这样的
#check the install
[statquant@localhost vim]$ tree -L 3 $HOME/Build/vim/
home/statquant/Build/vim
├── bin
│ ├── eview -> vim
│ ├── evim -> vim
│ ├── ex -> vim
│ ├── gview -> vim
│ ├── gvim -> vim
│ ├── gvimdiff -> vim
│ ├── gvimtutor
│ ├── rgview -> vim
│ ├── rgvim -> vim
│ ├── rview -> vim
│ ├── rvim -> vim
│ ├── view -> vim
│ ├── vim
│ ├── vimdiff -> vim
│ ├── vimtutor
│ └── xxd
└── share
├── man
│ ├── fr
│ ├── fr.ISO8859-1
│ ├── fr.UTF-8
│ ├── it
│ ├── it.ISO8859-1
│ ├── it.UTF-8
│ ├── ja
│ ├── man1
│ ├── pl
│ ├── pl.ISO8859-2
│ ├── pl.UTF-8
│ ├── ru.KOI8-R
│ └── ru.UTF-8
└── vim
└── vim74
最后一个:
#change ~/.bashrc so you can call vim/gvim...
PATH=$PATH:$HOME/Build/vim/bin
#source your bashrc
source ~/.bashrc
#to uninstall
cd $HOME/Sources/vim
make uninstall
这就是你得到的:
[statquant@localhost vim]$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 19 2015 16:16:44)
Included patches: 1-703
Compiled by statquant
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
+balloon_eval +float +mouse_urxvt -tag_any_white
+browse +folding +mouse_xterm +tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
+clientserver -hangul_input +netbeans_intg +title
+clipboard +iconv +path_extra +toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent +python3/dyn +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con_gui +lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind +X11
+dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent +xim
+emacs_tags +mouseshape -sniff +xsmp_interact
+eval +mouse_dec +startuptime +xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop +xpm