我直接在开发服务器上工作,并希望vim
出于我的目的构建我自己的服务器,而不是为所有系统用户。构建场景是:
hg clone https://vim.googlecode.com/hg/ vim
cd vim/src
./configure --enable-rubyinterp --enable-multibyte
make
的结果./vim --version
是:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 22 2011 09:35:46)
Included patches: 1-230
Compiled by aeg@dev
Normal version without GUI. Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg +path_extra -perl
+persistent_undo +postscript +printer -profile -python -python3 +quickfix
+reltime -rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white
-tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands
+vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore
+wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard
-xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -L. -rdynamic -Wl,-export-dynamic -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -lnsl -lruby1.8 -lpthread -lrt -ldl -lcrypt -lm -L/usr/lib
当我打开刚刚构建的 vim 时,我得到以下信息:
Error detected while processing /home/aeg/.vimrc:
line 148:
E484: Can't open file /usr/local/share/vim/syntax/syntax.vim
问题是因为没有 /usr/local/share/vim。我有我的插件./vim
,我希望 vim 寻找这条路径。
它是 Debian,/usr/bin/vim
设置不同fall-back for $VIM: "/usr/share/vim"
答案1
看起来你忘了跑步make install
。
如果您确实运行了make install
,但在 下找不到任何 vim 文件/usr/local/share/vim
,则可能存在权限问题 - 也就是说,不允许您在那里安装文件。
如果后者是正确的,那么只需将安装位置设置为您可以控制的位置即可构建它:
$ cd vim/src
$ ./configure --enable-rubyinterp --enable-multibyte --prefix=/home/aeg/myvim
$ make
$ make install
$ export PATH=/home/aeg/myvim/bin:$PATH
$ vim