E31 Error happens for some reason

Open
#1,342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
59/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
vim
Domain
tooling

Research direction

The report points to plug.vim around line 948 and includes a proposed change to the mapping cleanup. Read that section and check how PlugClean handles buffer mappings when a mapping is absent. Confirm the behavior with a minimal Vim setup that reproduces E31; done means PlugClean completes without E31 while retaining its mapping cleanup behavior.

Written by the indexing model from the issue text.

Description

Description

When running PlugClean I was getting these errors:

"[Plugins]" [Not edited] --No lines in buffer--
Error detected while processing VimEnter Autocommands for ""..function 7_clean[1]..7_prepare:
line 31:
E31: No such mapping
Error detected while processing VimEnter Autocommands for "
"..function 7_clean[1]..7_prepare:
line 31:
E31: No such mapping
Error detected while processing VimEnter Autocommands for ""..function 7_clean[1]..7_prepare:
line 31:
E31: No such mapping
Error detected while processing VimEnter Autocommands for "
"..function 7_clean[1]..7_prepare:
line 31:
E31: No such mapping
Error detected while processing VimEnter Autocommands for ""..function 7_clean[1]..7_prepare:
line 31:
E31: No such mapping
Error detected while processing VimEnter Autocommands for "
"..function 7_clean[1]..7_prepare:
line 31:
E31: No such mapping

However, I can resolved the issue and request the application of this code change in plug.vim:

948c948,950
<     execute 'silent! unmap <buffer>' k
---
> 	if !empty(maparg(k, '', 0, 1))
> 		execute 'silent! unmap <buffer> ' . k
> 	endif

This will resolve the issue absent the need to disband the intended functionality!

Plug block

:version

Type
  • Bug
  • Enhancement
  • Feature Request
  • Question
OS
  • All/Other
  • Linux
  • macOS
  • Windows
Vim
  • Terminal Vim
  • GVim
  • Neovim
Dominant language
Vim Script
Stars
35.8k
Forks
1.9k
Avg merge
13h 43m
Merged PRs (30d)
1

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from junegunn/vim-plug

All issues in junegunn/vim-plug

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.