Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim.error when executing :Minimap in nvim/vim #42

Closed
fredrikaverpil opened this issue May 16, 2016 · 13 comments
Closed

vim.error when executing :Minimap in nvim/vim #42

fredrikaverpil opened this issue May 16, 2016 · 13 comments

Comments

@fredrikaverpil
Copy link

fredrikaverpil commented May 16, 2016

I've installed minimap, and it shows the following in neovim, when executing :Minimap:

Error detected while processing function minimap#UpdateMinimap:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/fredrik/.config/nvim/plugged/vim-minimap/autoload/minimap.py", line 177, in updateminimap
    vim.command("match " + highlight_group + " /\%>0v\%<{}v\%>{}l\%<{}l./".format(WIDTH + 1, top, bottom))
vim.error: Vim(match):E867: (NFA) Unknown operator '\%.'

I get a different error in vim:

Error detected while processing function minimap#ShowMinimap:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/fredrik/.config/nvim/plugged/vim-minimap/autoload/minimap.py", line 97, in showminima
p
    vim.command(":call minimap#UpdateMinimap()")
vim.error: Vim(python):Traceback (most recent call last):

Both these errors can be seen here:
asciicast

I'm on OS X 10.10.4.

$ nvim --version

NVIM 0.1.4
Build type: RelWithDebInfo
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/build/config -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/src -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include/luajit-2.0 -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/build/src/nvim/auto -I/tmp/neovim-20160515-56895-2xlxxv/neovim-0.1.4/build/include
Compiled by fredrik@averpil.local

Optional features included (+) or not (-): +acl   +iconv    +jemalloc
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.1.4/share/nvim"
$ vim --version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 26 2016 14:23:49)
MacOS X (unix) version
Included patches: 1-1063
Compiled by Homebrew
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/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -F/usr/local/Frameworks -DMACOS_X_UNIX  -Os -w -pipe -march=native -mmacosx-version-min=10.11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang   -L. -L/usr/local/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -o vim        -lm  -lncurses -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -F/usr/local/Cellar/python/2.7.10_2/Frameworks -framework Python   -lruby.2.0.0 -lobjc
@fredrikaverpil fredrikaverpil changed the title vim.error: Vim(match):E867: (NFA) Unknown operator '\%. vim.error: Vim(match):E867: (NFA) Unknown operator '\%.' May 16, 2016
@fredrikaverpil fredrikaverpil changed the title vim.error: Vim(match):E867: (NFA) Unknown operator '\%.' vim.error when executing :Minimap in nvim/vim May 16, 2016
@micahjsmith
Copy link

I had the exact same issue. I'm guessing you're also using Python 2.6... the fix suggested in #41 worked for me.

@fredrikaverpil
Copy link
Author

fredrikaverpil commented May 17, 2016

Well, no I'm on 2.7. Installed Python via homebrew on OS X 10.10.4. This is from the versions report above:

-F/usr/local/Cellar/python/2.7.10_2/Frameworks -framework Python

@severin-lemaignan
Copy link
Owner

Thanks for reporting the bug!
I'm really not sure about that one... have you tried the fix suggested by @micahjsmith in #41? If you do so, does minimap still highlight the current visible area?

@fredrikaverpil
Copy link
Author

@severin-lemaignan I just now tried that fix, but it didn't work for me. Here's the output of running :Minimap with that fix:

                              | 31
~                              | 32 from drawille import *
~                              | 33
~                              | 34 WIDTH = 20
~                              | 35 MINIMAP = "vim-minimap"
~                              | 36
~                              | 37 def getmmwindow():
~                              | 38     for b in vim.buffers:
 NERD                            NORMALmaster  minimap.py                                                                        python  utf-8[unix]    0%1/214☰ :  1trailing[70]
Error detected while processing function provider#python#Call:
line   18:
SyntaxError('invalid syntax', ('/Users/fredrik/.config/nvim/plugged/vim-minimap/autoload/minimap.py', 178, 85, '            vim.command("match " + highlight_group + " /%>0v%<{0}v%>{1}l%<{2}l.
/".for mat(WIDTH + 1, top, bottom))\n'))
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/session.py", line 185, in handler
    rv = self._request_cb(name, args)
  File "/usr/local/lib/python2.7/site-packages/neovim/api/nvim.py", line 151, in filter_request_cb
    result = request_cb(self._from_nvim(name), args)
  File "/usr/local/lib/python2.7/site-packages/neovim/plugin/host.py", line 74, in _on_request
    rv = handler(*args)
  File "/usr/local/lib/python2.7/site-packages/neovim/plugin/script_host.py", line 82, in python_execute_file
    script = compile(f.read(), file_path, 'exec')
  File "/Users/fredrik/.config/nvim/plugged/vim-minimap/autoload/minimap.py", line 178
    vim.command("match " + highlight_group + " /%>0v%<{0}v%>{1}l%<{2}l./".for mat(WIDTH + 1, top, bo
Error detected while processing function minimap#ShowMinimap[2]..provider#python#Call:
line   18:
NameError("name 'showminimap' is not defined",)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/neovim/msgpack_rpc/session.py", line 185, in handler
    rv = self._request_cb(name, args)
  File "/usr/local/lib/python2.7/site-packages/neovim/api/nvim.py", line 151, in filter_request_cb
    result = request_cb(self._from_nvim(name), args)
  File "/usr/local/lib/python2.7/site-packages/neovim/plugin/host.py", line 74, in _on_request
    rv = handler(*args)
  File "/usr/local/lib/python2.7/site-packages/neovim/plugin/script_host.py", line 75, in python_execute
    exec(script, self.module.__dict__)
  File "<string>", line 1, in <module>
NameError: name 'showminimap' is not defined

Press ENTER or type command to continue

@scott-silver
Copy link

scott-silver commented May 26, 2016

I'm experiencing the same issue using MacVim and Python 2.7

@Artem-Schander
Copy link

same here

@13tales
Copy link

13tales commented Jul 6, 2016

I'm also having this issue. Mac OSX, NeoVim, Python 2.7 and 3 both installed and accessible. The minimap will show, but spits out a bunch of errors first, and any time I scroll through the code or click on the minimap.

@severin-lemaignan
Copy link
Owner

Can you check the problem is still here after updating? #44 is supposed to fix the issue...

@scott-silver
Copy link

@severin-lemaignan that fixed it for me. thanks!

@johnsonz
Copy link

johnsonz commented Jul 14, 2016

I got this error.

win10 x64
vim 7.4 x86
python 2.7 x86

capture
capture1
capture2

@severin-lemaignan
Copy link
Owner

@johnsonz this is an unrelated issue: minimap needs drawille that needs itself curse. I'm no sure how to install this library on windows. pip install curse might do, I haven't tried.

@johnsonz
Copy link

@severin-lemaignan I have tried with pip install curse, but seems an error occurs.
capture
capture1

@johnsonz
Copy link

I google it and found no official curse for windows os. But I have installed nonofficial from the following url.
http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses

@fredrikaverpil fredrikaverpil closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants