59
A
回答
65
你可以看到一切VIM被執行
:version
要查詢像Python的確切功能,您可以使用has()
功能與您正在尋找的功能編譯。下面的代碼將返回1,如果它具有該功能,則返回1,否則返回0。
:echo has('python')
有關功能的列表見:h feature-list
更多信息參見:
:h :version
:h has(
:h feature-list
3
用vi --version - 顯示編譯選項和編譯器命令
12
使用vim --version
。礦山顯示:
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)
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
相關問題
- 1. VIM csupport編譯選項
- 2. 如何查看glibc的編譯選項
- 3. Scons檢查編譯器選項
- 4. 使用「-Wcast-QUAL」選項檢查編譯
- 5. 如何檢查程序編譯的選項?
- 6. 如何檢查vim編譯的python版本?
- 7. COM:如何選擇編譯選項?
- 8. 用python編譯編譯vim
- 9. 如何檢測Apache 1.3的編譯時./configure選項?
- 10. GCC中是否有編譯選項在編譯時檢查內存錯誤?
- 11. 如何編譯-Wextra編譯選項我的OMNeT ++模型
- 12. 檢查依賴項目編譯時間
- 13. 編譯sencha項目檢查錯誤
- 14. 編譯時檢查jQuery選擇器
- 15. 如何檢查Vim變量?
- 16. 編譯時檢查
- 17. 使用vim編譯C++項目
- 18. Z3編譯選項
- 19. MonoDevelop編譯選項
- 20. 如何檢查編譯時間?
- 21. 如何用選項重新編譯netcat?
- 22. 如何在使用CodeDom編譯之前檢查編譯錯誤
- 23. 如何在編譯時檢查編譯器?
- 24. VIM在現有或新選項卡中打開編譯錯誤
- 25. 如何用ruby編譯vim 1.9.2
- 26. 如何使用vim構建或編譯VS2010/XNA4項目?
- 27. 編譯時檢查的URI
- 28. 新的編譯選項1.0
- 29. Xcode的編譯選項
- 30. 如何檢查選定項目在組合框中的編號?
爲了完整起見:對於Vimscript中一個語法的例子是'如果有( '剪貼板')', 'set mouse = a','end'。如果我已經閱讀過,不會被困擾讀取幫助;-) – cfi
當我運行':version'時,它顯示'+ python/dyn和+ python3/dyn'。但是echo('python')返回0.那麼,爲什麼會有差異,我應該選擇哪一個呢? –
':version'顯示了Vim編譯的內容。在你的情況'python/dyn'和'+ python3/dyn'是動態加載版本的python。根據':h python-dynamic',這意味着Vim將搜索所需的python dll庫,如果發現可以使用python。試着'('python')'會嘗試加載python動態並返回結果(參見':h has-python')。因此'('python')'是首選的方法。 –