I'd like to know which compilation options were used for my Vim binary. Is there any way to query this?
Specifically, I'm interested in if it has Python support enabled.
You can see everything vim was compiled with by executing
:version
To query for an exact feature like python you can use the has() function with the feature you are looking for. The code below will return a 1 if it has the feature or 0 if it does not.
:echo has('python')
For a list of features see :h +feature-list
For more information see:
:h :version
:h has(
:h feature-list
Use vim --version. Mine shows:
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)
Compiled by root#apple.com
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
Use vi --version, which shows compilation options and the compiler command.
Related
I have got a .vimrc file from one of my friends, however, vim ignores it. In an other topic (Activation of `.vimrc` file) it has turned out that the value of the VIM variable may cause problem (/usr/share/vim instead of /home/tobias). Should I change this route for the other one? If the answer is yes, how can I carry out it? Thank you for the answer.
-- edit --
$ vim --version:
VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct 18 2008 09:05:15)
Included patches: 1-314
Compiled by buildd#excelsior.roeckx.be
Huge 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
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist`
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
-netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +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. -Iproto -DHAVE_CONFIG_H -g -O2 -O2 -g -Wall
Linking: gcc -Wl,--as-needed -L/usr/local/lib -o vim -lncurses -lselinux -lacl -lgpm
-- endedit --
Just put your vimrc into $HOME/.vimrc. You can check whether it got sourced via :scriptnames. For troubleshooting, you can also temporarily add :echomsg "hello" in there. You don't need to mess with the $VIM variable. :help initialization has all the gruesome details, should you be interested.
In my case, my Ubuntu install only came with this tiny-vim thing installed. I solved the issue by running sudo apt install vim-gtk3
New to programming (and SO) so I may be missing some very basic step, but this is happening with multiple other people I work with.
Very commonly in vim when I have multiple buffers open, if I :w or run any quit command (:q!, ZZ, :wq, etc) the program will crash, only displaying this message:
Vim: Caught deadly signal ABRT
Vim: preserving files...
Vim: Finished.
[1] 20271 abort vim .
%
Attempts I've taken, with no luck:
Deleted .swp file
Update vim by overriding the system version
Info of my Vim install (through homebrew)
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov 5 2014 21:00:28)
Compiled by root#apple.com
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
If you need more information let me know. Any help would be greatly appreciated!
You might not be using the version you installed since the compile date is November 2014. Try the following:
brew uninstall macvim
brew install macvim --override-system-vim
I've found that ExpressionEngine tags are wrapping in HTML filetypes, dependent upon three factors:
formatoptions includes c
filetype plugin on is set
An ExpressionEngine tag is indented (tabs or spaces) and goes past textwidth
It seems Vim is considering a line beginning with [whitespace]{ to be a comment in HTML, which as far as I know it shouldn't. Interestingly, even though Vim thinks of this line as a comment, with fo+=o set, hitting o doesn't cause the next line to be prepended with anything like a curly brace.
To reproduce:
1) Run vim with no plugins or settings using vim -u NONE -N
2) Run the following commands:
filetype plugin on
set tw=80
set tabstop=2
set ft=html
set fo-=t
At this point the filetype will be html and the formatoptions will be cq
3) Insert the following HTML/EE code:
<div>
<p>
{exp:structure:breadcrumb here_as_title="yes" inc_here="yes" separator="›"}
4) The text will wrap when you type the q of ›
Here is my output of :version:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 22 2012 15:36:46)
Compiled by root#apple.com
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
This is really baffling to me so if you need any more information to help me diagnose this, please let me know. Thank you.
When working on GNU screen with Vim, I am not able to adjust the split window sizes with mouse. All the rest mouse actions work fine in Vim (scrolling, selecting text, etc with mouse).I generally have se mouse=n in my .vimrc. Adjusting the window buffer sizes outside GNU screen works perfectly fine.
Here is the vim information:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 19 2012 18:05:29)
Included patches: 1-401
Compiled by root#arun-mu
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 -mouse_urxvt -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_interact
+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 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lnsl
GNU screen information:
4.00.03 (FAU) 23-Oct-06
This did the trick for me. Mouse is completely active inside vim in GNU screen.
:set ttymouse=xterm2
I use vim 7.3, GNU screen (Ubuntu/debian current package versions) and gnome-terminal, and I can use the mouse for dragging window splits just fine when running with
:se mouse=a
I installed autotag.vim by source it in .vimrc. It is listed in :scriptnames.
When I tried to jump to tags using Ctrl+], it says
No tags file
tag not found: [function name]
If I run ctag *.c from command line, then I can search for tags. Any idea why?
I'm on Ubuntu 11.04 x64 and here is a :version output
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 24 2011 07:07:02)
Included patches: 1-35
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by buildd#
Huge 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/dyn +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/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wall -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,--as-needed -o vim -lm -lncurses -lselinux -lacl -lgpm
I'm not sure I understand your question.
AutoTag doesn't create a tags file, it can only update an existing one.
For AutoTag to work reliably you'll need a tags file at the same level of the current file or in a parent (like in the main directory of your project).