我刚刚在本地目录中构建了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
这是后退)
我该怎么做才能正确设置?
答案 0 :(得分:2)
以下是完整的说明
#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
答案 1 :(得分:1)
运行./configure
时,您需要包含参数--prefix=path/to/install/location
。编译完成后再运行make install
,这会将所有文件放在所需的位置。
这将允许您进行自定义vim安装。
总结:
./configure --prefix=path/to/install/location
。make
。make install
。