I want to install Powerline statusline in Vim. I found a bunch of methodes from the official documentation. I decided to go with with Vundle plugin manager, everything went good and after I launched Vim, I got this message:
You need vim compiled with Python 2.6, 2.7 or 3.2 and later support
for Powerline to work
despite Python 2.7 is installed. what is the problem?
PS:
I already installed bunch of plugins using Vundle successfully.
I've installed Powerline package from debian repository to use is for tmux and it woked correctly.
My setup:
Debian Jessie 8.2.
Vim 7.4.
Python 2.7.9.
Edit: the output of
vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:56:29)
Included patches: 1-488, 576
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by buildd#
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand -perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak -python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu -ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl
Related
I try log slow functions of VIM on macOS Mojave but the log file does not appear.
vim commands:
:profile start ./profile.log
:profile func *
:profile file *
// do vim operations
I expect to get profile.log file on my working dir but it doesn`t appear.
:pwd prints expected dir
:version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 19 2019 12:07:03)
macOS version
Included patches: 1-950
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +cindent +cursorshape +file_in_path +job +menu +mouse_urxvt +persistent_undo +signs +terminal +vertsplit -xfontset
+arabic +clientserver +dialog_con_gui +find_in_path +jumplist +mksession +mouse_xterm +postscript +smartindent +terminfo +virtualedit +xim
+autocmd +clipboard +diff +float +keymap +modify_fname +multi_byte +printer +startuptime +termresponse +visual -xpm
+autochdir +cmdline_compl +digraphs +folding +lambda +mouse +multi_lang +profile +statusline +textobjects +visualextra -xsmp
-autoservername +cmdline_hist +dnd -footer +langmap +mouseshape -mzscheme -python -sun_workshop +textprop +viminfo -xterm_clipboard
+balloon_eval +cmdline_info -ebcdic +fork() +libcall +mouse_dec +netbeans_intg +python3 +syntax +timers +vreplace -xterm_save
+balloon_eval_term +comments +emacs_tags +fullscreen +linebreak -mouse_gpm +num64 +quickfix +tag_binary +title +wildignore
+browse +conceal +eval -gettext +lispindent -mouse_jsbterm +odbeditor +reltime +tag_old_static +toolbar +wildmenu
++builtin_terms +cryptv +ex_extra -hangul_input +listcmds +mouse_netterm +packages +rightleft -tag_any_white +transparency +windows
+byte_offset +cscope +extra_search +iconv +localmap +mouse_sgr +path_extra +ruby -tcl +user_commands +writebackup
+channel +cursorbind -farsi +insert_expand +lua -mouse_sysmouse +perl +scrollbind +termguicolors +vartabs -X11
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -L. -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework AppKit -L/usr/local/opt/lua/lib -llua5.3 -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2lev
el/CORE -lperl -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation -framework Ruby
From :help :profile:
Start profiling, write the output in {fname} upon exit.
I'm working on SICP exercises and using vim to edit MIT Scheme source codes, but it seems the syntax highlighting feature for multiline comments does not work properly. It seems the lines between #| and |# are not recognized as comments.
Here's a screenshot. And here's the output of my vim --version:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by pkg-vim-maintainers#lists.alioth.debian.org
Compiled by pkg-vim-maintainers#lists.alioth.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +tag_binary
+arabic +file_in_path +mouse_sgr +tag_old_static
+autocmd +find_in_path -mouse_sysmouse -tag_any_white
-balloon_eval +float +mouse_urxvt -tcl
-browse +folding +mouse_xterm +terminfo
++builtin_terms -footer +multi_byte +termresponse
+byte_offset +fork() +multi_lang +textobjects
+channel +gettext -mzscheme +timers
+cindent -hangul_input +netbeans_intg +title
-clientserver +iconv +packages -toolbar
-clipboard +insert_expand +path_extra +user_commands
+cmdline_compl +job -perl +vertsplit
+cmdline_hist +jumplist +persistent_undo +virtualedit
+cmdline_info +keymap +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
+cscope +lispindent +python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -lua +rightleft +writebackup
+diff +menu -ruby -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xsmp
+emacs_tags -mouseshape +startuptime -xterm_clipboard
+eval +mouse_dec +statusline -xterm_save
+ex_extra +mouse_gpm -sun_workshop -xpm
+extra_search -mouse_jsbterm +syntax
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm
How do I fix it? Any help is appreciated.
Prior to this change, the syntax script for Scheme didn't support multiline comments.
You can:
edit your current syntax script to add multiline comment support,
or update your Vim to the latest version, 8.1.0005 at the time of this writing.
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'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.