fix(vim): resolve <Tab> conflict between copilot and snipMate - #10
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
copilot.vimmaps<Tab>in insert mode by default, which collided withvim-snipmate'simap <unique> <Tab>and raised E227: Mapping already exists for at every Vim startup. Found while verifying the vim-plug setup.Fix
g:copilot_no_tab_map = v:truebeforeplug#end()(copilot installs its mapping while its plugin is sourced there), so<Tab>stays with snipMate.<C-L>instead.CI guard
Adds a path-filtered
Vimworkflow (.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>snipMateNextOrTriggerimap <C-L>→copilot#Accept()