I recently installed MacVim (not through brew), and as I was trying to set up some basic configurations, I encountered an issue with python3 and the UltiSnips plugin. My vimrc is currently just a very basic one that I downloaded from vim bootstrap, and every time I try to edit something in insert mode, I get the following error:
Error detected while processing /Users/name/.vim/plugged/ultisnips/autoload/UltiSnips.vim`: line 7: E319: Sorry, the command is not available in this version: py3 import vim
The :version command is telling me that I am not on the "small version" of macvim, but it is saying that I don't have the python3 feature. How can I add this feature?
The output of :version after redownloading MacVim is
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +clientserver +diff +folding +lambda +mouseshape +netbeans_intg +python3/dyn +statusline +textprop +vreplace
+arabic +clipboard +digraphs -footer +langmap +mouse_dec +num64 +quickfix -sun_workshop +timers +wildignore
+autocmd +cmdline_compl +dnd +fork() +libcall -mouse_gpm +odbeditor +reltime +syntax +title +wildmenu
+autochdir +cmdline_hist -ebcdic +fullscreen +linebreak -mouse_jsbterm +packages +rightleft +tag_binary +toolbar +windows
-autoservername +cmdline_info +emacs_tags +gettext +lispindent +mouse_netterm +path_extra +ruby/dyn -tag_old_static +transparency +writebackup
+balloon_eval +comments +eval -hangul_input +listcmds +mouse_sgr +perl/dyn +scrollbind -tag_any_white +user_commands -X11
+balloon_eval_term +conceal +ex_extra +iconv +localmap -mouse_sysmouse +persistent_undo +signs -tcl +vartabs -xfontset
+browse +cryptv +extra_search +insert_expand +lua/dyn +mouse_urxvt +popupwin +smartindent +termguicolors +vertsplit +xim
++builtin_terms +cscope -farsi +ipv6 +menu +mouse_xterm +postscript -sodium +terminal +virtualedit -xpm
+byte_offset +cursorbind +file_in_path +job +mksession +multi_byte +printer -sound +terminfo +visual -xsmp
+channel +cursorshape +find_in_path +jumplist +modify_fname +multi_lang +profile +spell +termresponse +visualextra -xterm_clipboard
+cindent +dialog_con_gui +float +keymap +mouse -mzscheme +python/dyn +startuptime +textobjects +viminfo -xterm_save
I am not sure where you got that "MacVim" from, but :version is supposed to report the following in the latest build (9.0.65 (173)):
[...]
+python/dyn
+python3/dyn
[...]
so it looks like you are not using MacVim to begin with. FWIW, you should have the following as well:
+profile
+rightleft
which you don't.
Once you get a proper MacVim, see :help 'pythonthreehome' and :help 'pythonthreedll'.
Related
I am using Eclim and Vim and Neocomplete plugin, but omnifunc does not work for me at all.
It seems that my environment is properly set, because when I try Eclim functions that test its environment then everything seems to be properly configured.
:PingEclim yields these results
eclim 2.5.0
eclipse 4.5.1
:EclimValidate
Result: OK, required settings are valid.
I put this is my ~/.vim/plugin/eclim.vim, which was autogenerated by eclim installer
let g:EclimCompletionMethod = 'omnifunc'
if !exists('g:neocomplete#force_omni_input_patterns')
let g:neocomplete#force_omni_input_patterns = {}
endif
let g:neocomplete#force_omni_input_patterns.java = '\%(\h\w*\|)\)\.\w*'
Filetype seems to be properly edentified, filetype is enabled
:filetype
filetype detection:ON plugin:ON indent:ON
It seems that omnicomplete is properly invoked as I type, for example import org. prints an error
-- Omni completion (^O^N^P) Pattern not found
Also <C-x><C-u> brings
E764: Option 'completefunc' is not set
Vim info follows
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 11 2015 20:44:58)
MacOS X (unix) version
Included patches: 1-936
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_binary
+arabic +find_in_path -mouse_sysmouse +tag_old_static
+autocmd +float +mouse_urxvt -tag_any_white
+balloon_eval +folding +mouse_xterm +tcl
+browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +fullscreen -mzscheme +textobjects
+cindent -gettext +netbeans_intg +title
+clientserver -hangul_input +odbeditor +toolbar
+clipboard +iconv +path_extra +transparency
+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_gui +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
+farsi +mouse_netterm +syntax
Any help?
I just built vim with checkinstall running:
[root#localhost vim]# checkinstall -R -y --fstrans=no
I see there is a rpm created there :
[root#localhost vim]# ls /root/rpmbuild/RPMS/x86_64/
checkinstall-20141012-1.x86_64.rpm vim-20141012-1.x86_64.rpm
vim works fine...
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 12 2014 16:19:20)
Included patches: 1-475
Compiled by statquant
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +clipboard +cursorshape +extra_search -hangul_input +listcmds -mouse_gpm -mzscheme +python3/dyn +startuptime +termresponse +viminfo +xsmp_interact
+arabic +cmdline_compl +dialog_con_gui +farsi +iconv +localmap -mouse_jsbterm +netbeans_intg +quickfix +statusline +textobjects +vreplace +xterm_clipboard
+autocmd +cmdline_hist +diff +file_in_path +insert_expand +lua +mouse_netterm +path_extra +reltime -sun_workshop +title +wildignore -xterm_save
+balloon_eval +cmdline_info +digraphs +find_in_path +jumplist +menu +mouse_sgr +perl +rightleft +syntax +toolbar +wildmenu +xpm
+browse +comments +dnd +float +keymap +mksession -mouse_sysmouse +persistent_undo +ruby +tag_binary +user_commands +windows
++builtin_terms +conceal -ebcdic +folding +langmap +modify_fname +mouse_urxvt +postscript +scrollbind +tag_old_static +vertsplit +writebackup
+byte_offset +cryptv +emacs_tags -footer +libcall +mouse +mouse_xterm +printer +signs -tag_any_white +virtualedit +X11
+cindent +cscope +eval +fork() +linebreak +mouseshape +multi_byte +profile +smartindent +tcl +visual -xfontset
+clientserver +cursorbind +ex_extra +gettext +lispindent +mouse_dec +multi_lang +python/dyn -sniff +terminfo +visualextra +xim
For some reason I cannot uninstall it...
[root#localhost vim]# rpm -e /root/rpmbuild/RPMS/x86_64/vim-20141012-1.x86_64.rpm
error: package /root/rpmbuild/RPMS/x86_64/vim-20141012-1.x86_64.rpm is not installed
[root#localhost vim]# rpm -e vim-20141012-1.x86_64
error: package vim-20141012-1.x86_64 is not installed
[root#localhost vim]# rpm -e vim
error: package vim is not installed
How can I do this?
rpm -e doesn't take a fullpath as an argument, just the package name:
rpm -e vim-20141012-1.x86_64
Or even:
rpm -e vim
Install it again (using rpm) and uninstall it again the same way.
Following is vim 7.4
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 22 2014 14:31:17)
...
<cygwin#cygwin.com>
+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/dyn +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent +python3/dyn +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con +lua/dyn +rightleft +windows
+diff +menu +ruby/dyn +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
Note that the clipboard support is enabled, which I find is greatly convenient for me to exchange text between windows and the terminal. And in my server with Fedora installed, I just want to compile a vim with the same clipboard support. Is it possible and if it is, how?
Here is some ref that may help.
https://groups.google.com/forum/#!topic/vim_dev/rIFYgTrsys4
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/837882
https://superuser.com/questions/235505/compiling-vim-with-xterm-clipboard-support
http://kowalcj0.wordpress.com/2013/11/19/how-to-compile-and-install-latest-version-of-vim-with-support-for-x11-clipboard-ruby-python-2-3/
Clipboard access is done through totally different APIs in Cygwin and Linux, that's why. The Cygwin port of Vim uses (either Cygwin or Win32; haven't checked in detail) APIs to access the Windows clipboard. Whereas on Unix, clipboard access is only possible when Vim is compiled with support for X (as is widely documented, and you've discovered).
So, just because the strange operating system-hybrid named Cygwin is able to access the (Windows!) clipboard without X, you cannot conclude that the same should be possible on Unix.
I am new to vim, and I am trying to paste content from other applications. I am running the native vim that comes with the OS X 10.9 Mavericks.
When I run "vim --version" this is the output
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"
I understand I need to change "-xterm_clipboard" to "+xterm_clipboard" to be able to paste the content form other sources.
Thank you
Install your own Vim. If you haven't already, setup Homebrew, then:
brew install macvim --override-system-vim
Bonus is that MacVim can run as a native application, i.e. outside the terminal, like gVim on other platforms. It is also compiled with the "huge" featureset, so you have pretty much everything in it that you'd need, unlike the system Vim.
EDIT: Apparently the option name changed; the new syntax should be
brew install macvim --with-override-system-vim
(See brew options macvim for more options.)
If I do 3dd with the cursor at the next-to-last line in a file, two lines are deleted, as expected. If I do the same with the cursor at the last line, I'd expect one line to get deleted, but that does not happen. Why the discrepancy?
Starting file:
line 1
line 2
line 3 █
After 3dd:
line 1
line 2
line 3 █
After k3dd:
line 1 █
I'd say bug, since dd will delete that line ...
Edit: and yes, I can reproduce that behavior with any other number in front of dd as well ...
Edit2: except 1dd, this works as expected. To me that's a bug ...
My vim
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 5 2012 10:17:30)
Included patches: 1-411
Modified by <bugzilla#redhat.com>
Compiled by <bugzilla#redhat.com>
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
+float +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_sysmouse +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 +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: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"