How to find where exactly vim or nvim error started (which file?) when I'm interested in fixing the actual issue and not just removing the bad plugin? Anything better than strace and guesswork to find the error origin?


I often add a plugin to my vim or nvim config and end up getting errors on hooks (buffer open, close, write):

"test.py" [New] 0L, 0C written
Error detected while processing function 343[12]..272:
line    8:
E716: Key not present in Dictionary: _exec
E116: Invalid arguments for function get(a:args, 'exec', a:1['_exec'])
E15: Invalid expression: get(a:args, 'exec', a:1['_exec'])

The problem is, I have no idea where those come from, I only get some line number of unknown file and it's not my vim/nvim config file.

1 Answer 1


This particular plugin has been written in an object-oriented style. The 343[12]..272 refers to an anonymous (numbered) function in a Dictionary object.

If you know the (recently installed) plugin, you can use the :breakadd file */pluginname.vim file in your ~/.vimrc to stop and then step through (with :next) it line-by-line.

Alternatively, you can capture a full log of a Vim session with vim -V20vimlog. After quitting Vim, examine the vimlog log file for the error message and suspect commands before that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .