
我正在使用vim
並安裝了 Pathogen 和 vim-fugative,但是當在 github.com 上的源代碼控制下編輯文件時,我使用了該命令:Gbrowse
,但沒有任何反應。
我已經嘗試了在網路上可以找到的有關在網路上設定特定瀏覽器的大部分建議,但都不起作用。因此,我嘗試查看嘗試啟動瀏覽器的腳本(因此我已從 中刪除了有關瀏覽器的引用.gitconfig
)。
所以我找到了 shell 腳本:git-web--browse
並修改它以將日誌語句產生到日誌檔案中(看看我是否可以弄清楚發生了什麼)。
但是當我使用時,:Gbrowse
我沒有得到任何日誌語句(所以看起來 vim 甚至沒有呼叫這個腳本)。
有什麼想法我做錯了嗎?
資訊
系統 Mac OS X (10.9.5)
$ uname -a
Darwin Martins-MacBook-Pro.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
$ which vim
/usr/bin/vim
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 24 2013 18:58:47)
Compiled by [email protected]
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 -osfiletype
+path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn
-python3 +quickfix +reltime -rightleft +ruby/dyn +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/share/vim"
Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses
我已經安裝了 Pathogen 並且在~/.vimrc
:
19 ¬
20 ¬
21 execute pathogen#infect()¬
在~/.vim/bundle
:
$ ls -l ~/.vim/bundle/
total 0
drwxr-xr-x 13 Loki staff 442 Oct 4 15:18 gundo.vim
drwxr-xr-x 9 Loki staff 306 Oct 4 14:08 tabular
drwxr-xr-x 8 Loki staff 272 Oct 26 2012 vim-colors-solarized
drwxr-xr-x 8 Loki staff 272 Oct 4 17:59 vim-fugitive
drwxr-xr-x 7 Loki staff 238 Oct 4 13:43 vim-unimpaired
答案1
這似乎是OSX自帶的vim版本的問題。
你最好從 homebrew 安裝更新版本的 vim
brew install vim
如果您使用的是 RVM,請注意,如果您針對系統 Ruby 以外的任何內容進行編譯,Ruby 外掛程式可能會出現段錯誤。如果您使用 RVM,最好這樣做。
rvm use system; brew install vim
您還應該發現自製 vim 具有有用的功能,例如 +剪貼簿支援等。