Debian
$VIM 的回退無效
我正在直接在開發伺服器上工作,並且想建構自己的
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"
看起來你忘記跑步了
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