VIm Plugin NVIM python error auf Linux Mint

Probleme bei der Installation?
Antworten
grgr
User
Beiträge: 3
Registriert: Mittwoch 11. September 2013, 17:32

Hallo,

ich bin ein kompletter anfänger in Linux, Python und vim... das heißt, das ich praktisch von nichts auch nur irgendwie eine Ahnung habe... :K

Jedenfalls baue ich mir gerade den vim Editor zurecht, mit Plugins und so, die evtl helfen beim Python lernen (markieren von falschem Syntax usw).

Aber ich bin neulich auf nvim (https://github.com/cwoac/nvim) gestoßen, das man angeblich als Ersatz für notational velocity (http://notational.net/) ansehen kann, was ich sehr schätzen würde, da ich da mal reingeschnuppert habe und viele davon geschwärmt hatten.

Nur funktioniert es nicht... Evtl kann mir da jemand helfen?


Terminal sagt, wenn ich in vim :call NVIM_init() eingebe, um nvim zu starten:

Code: Alles auswählen

Error detected while processing function NVIM_init..<SNR>36_SetupResults:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'vim' is not defined
line    3:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'vim' is not defined
line    4:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'vim' is not defined
Error detected while processing function NVIM_init..<SNR>36_DefPython:
line  282:
Traceback (most recent call last):
  File "<string>", line 280, in <module>
  File "<string>", line 117, in populate_initial_buffer
NameError: global name 'buf_results' is not defined
Danach bin ich zwar im Nvim splitscreen, aber alle befehle funktionieren nicht und weisen auf nameerror und not defined hin.

VIELEN DANK



Linux Mint 15 (Ubuntu)
vim aus dem Ubuntu/Mint package
Alle anderen Plugins funktionieren/zeigen keine Fehlermeldung

Python sollte aktiv sein, da bei

Code: Alles auswählen

:python print "Hallo"
Hallo in der Befehlsleiste von vim erscheint.


Zur Python und VIm version:

Code: Alles auswählen

fabian@fabian-Aspire-7730G ~ $ python --version
Python 2.7.4
fabian@fabian-Aspire-7730G ~ $ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr  2 2013 09:18:16)
Included patches: 1-547
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version with GTK2-GNOME 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_gui +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"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/harfbuzz   -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include/tcl8.5  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1  
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -Wl,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.1  -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.14/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl  -lutil -lm  -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu -ltcl8.5 -ldl -lpthread -lieee -lm -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib  
peddy
User
Beiträge: 121
Registriert: Montag 30. Juni 2008, 13:51

Sind alle Abhängigkeiten von nvim erfüllt? Was ist mit der Xapian Lib?

Code: Alles auswählen

apt-get install python-xapian
grgr
User
Beiträge: 3
Registriert: Mittwoch 11. September 2013, 17:32

Hallo,

danke für deine Antwort. Das habe ich gleich überprüft und die Xpaina-Pakete auch nochmal neu installiert, aber die waren leider alle schon drauf.

Weßt du vielleicht etwas, womit ich evtl. Prüfen kann, das beim Start von Vim Xapian und Python aktiv sind und miteinander kommunizierne können bzw. ist das sinnvoll zu testen? (Oder ist das eh der Fall, weil "Nameerror" erscheint ?

Grüße,
Fabian
peddy
User
Beiträge: 121
Registriert: Montag 30. Juni 2008, 13:51

Ich habe den Fehler jetzt mal genauer untersucht und ich habe den Verdacht, dass das Plugin das Modul vim nicht laden kann. Bin mir aber nicht 100% sicher.
python "import vim"

Code: Alles auswählen

function! NVIM_init()
  if g:NVIM_intialised == 1
    return
  endif
  echom "Initialising"
  python "import vim"
  call s:SetupData()
  call s:SetupResults()
  call s:DefPython()
grgr
User
Beiträge: 3
Registriert: Mittwoch 11. September 2013, 17:32

Danke für Deine Antwort.

Soweit ich das verstanden habe, dient dies

Code: Alles auswählen

python "import vim"
dazu, das vim/nvim auch in Python geladen wird.

Und nun kennt Python "vim" nicht und kann mit dem Befehl nichts anfangen?

Das ist ja doof. Aber was kann man da machen?
peddy
User
Beiträge: 121
Registriert: Montag 30. Juni 2008, 13:51

Ich muss da passen, da ich mich mit VIM Scripts nicht auskenne. Das ist auch kein Python spezifisches Problem und daher hier im Forum fehl am Platz. Ich würde entweder einen Bugreport an den Entwickler schicken oder eine VIM Newsgroup oder Forum aufsuchen. Da ist die Chance höher, dass dir jemand helfen kann.
Antworten