Skip to content

fix(vim): resolve <Tab> conflict between copilot and snipMate - #10

Merged
ngs merged 3 commits into
masterfrom
fix/vim-copilot-snipmate-tab
Jun 15, 2026
Merged

fix(vim): resolve <Tab> conflict between copilot and snipMate#10
ngs merged 3 commits into
masterfrom
fix/vim-copilot-snipmate-tab

Conversation

@ngs

@ngs ngs commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

copilot.vim maps <Tab> in insert mode by default, which collided with vim-snipmate's imap <unique> <Tab> and raised E227: Mapping already exists for at every Vim startup. Found while verifying the vim-plug setup.

Fix

  • Set g:copilot_no_tab_map = v:true before plug#end() (copilot installs its mapping while its plugin is sourced there), so <Tab> stays with snipMate.
  • Accept Copilot suggestions with <C-L> instead.

CI guard

Adds a path-filtered Vim workflow (.github/workflows/vim.yml) that runs only when Vim files change. It installs every declared plugin via vim-plug (excluding the heavy YouCompleteMe native build) and asserts the vimrc sources with no E227, locking in this fix against regressions.

Verification (headless)

After the change:

  • imap <Tab><Plug>snipMateNextOrTrigger
  • imap <C-L>copilot#Accept()
  • No E227; vimrc sources cleanly.

ngs added 3 commits June 15, 2026 08:26
copilot.vim maps <Tab> in insert mode by default, which collided with
vim-snipmate's `imap <unique> <Tab>` and raised E227 at startup. Set
g:copilot_no_tab_map before plug#end() so <Tab> stays with snipMate, and
accept Copilot suggestions with <C-L> instead.
Add a path-filtered Vim workflow that runs only when Vim files change. It
installs every declared plugin via vim-plug (excluding the heavy
YouCompleteMe native build) and asserts the vimrc sources without an E227
<Tab> mapping conflict, locking in the copilot/snipMate fix from this branch.
The install step ran vim without -u, so the vimrc (and thus plug#begin /
PlugInstall) was never sourced and no plugins installed — which also made
the E227 check pass vacuously. Pass -u "$HOME/.vimrc" so PlugInstall runs,
and fail loudly if plugged/ ends up empty.
@ngs
ngs merged commit 4196d00 into master Jun 15, 2026
3 checks passed
@ngs
ngs deleted the fix/vim-copilot-snipmate-tab branch June 15, 2026 00:43
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

Successfully merging this pull request may close these issues.

1 participant