4

With F2 unmapped, for instance, I get a load of error messages (see below).

I realized I can fix this by mapping the f-keys, but I'm curious: are they mapped to something by Ultisnips, that doesn't work? Or is this a symptom of an underlying problem?

(This happens even with a minimal vimrc, that does nothing but load ultisnips with vim-plug.)

PS. I think the problem has to do with the fact that in nvim <f2> is mapped as if with imap <f2> <F2>, which causes a loop (because for some reason, with ultisnips, <F2> is interpreted as a key rather than as a string). This can be confirmed by testing first imap <f2> <f2 and then imap <f2> <f2>. Without ultisnips, the string <F2> is inserted without any error messages.

Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
NvimError(b'Vim(new):E523: Not allowed here: botright new',)
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
  File "/Users/lawrence/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 61, in wrapper
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
    return func(self, *args, **kwds)
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
  File "/Users/lawrence/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 829, in _track_change
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
    inserted_char = _vim.eval('v:char')
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
  File "/Users/lawrence/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/_vim.py", line 117, in eval
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
    rv = vim.eval(as_vimencoding(text))
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/neovim/api/nvim.py", line 124, in eval
Press ENTER or type command to continue
Error detected while processing function UltiSnips#TrackChange..provider#python3#Call:
line   18:
    return self._session.request('vim_eval', string, async=async)
Press ENTER or type command to continue
  • 4
    First, you can see what script/plugin sets a map with this command: :verbose map <F2>. Also, if you use vim in terminal, maybe F2 is seen as a succession of other keys instead. For example, if I do a Ctrl-V F2 in insert mode in Vim, i get the codes for Ctrl-[ OQ (i.e. Esc O Q). Maybe something like that is tickling your Ultisnips. – VanLaser Mar 16 '16 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.