Skip to content

Conversation

@kalashnikovisme
Copy link
Owner

Summary

  • disable Copilot's default Tab mapping in Neovim configuration
  • bind Tab in insert mode to accept Copilot suggestions

Testing

  • not run

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

filetype plugin indent on

" Key mappings
imap <silent><script><expr> <Tab> copilot#Accept("\<Tab>")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix Copilot Tab fallback escape

The custom mapping passes "\\<Tab>" to copilot#Accept. That string evaluates to the literal characters \<Tab> rather than the <Tab> keycode that the function expects, so whenever Copilot has no suggestion the mapping will insert the text \<Tab> instead of performing a normal tab indent. This effectively breaks the Tab key for common cases without an active completion. Use copilot#Accept("\<Tab>") so the fallback key is a real Tab.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants