Open
Description
I found that if I disabled the use of tab to accept copilot suggestions as described in the help information, the Tab key would then insert the letter "t". I fixed that with the change below, but this seems like a basic enough problem that I'm wondering if there might be something more subtle going on.
diff --git i/plugin/copilot.vim w/plugin/copilot.vim
index 4d3d216..41ee457 100644
--- i/plugin/copilot.vim
+++ w/plugin/copilot.vim
@@ -26,7 +26,7 @@ function! s:MapTab() abort
endif
let tab_map = maparg('<Tab>', 'i', 0, 1)
if !has_key(tab_map, 'rhs')
- imap <script><silent><nowait><expr> <Tab> empty(get(g:, 'copilot_no_tab_map')) ? copilot#Accept() : "\t"
+ imap <script><silent><nowait><expr> <Tab> empty(get(g:, 'copilot_no_tab_map')) ? copilot#Accept() : "<Tab>"
elseif tab_map.rhs !~# 'copilot'
if tab_map.expr
let tab_fallback = '{ -> ' . tab_map.rhs . ' }'
Metadata
Metadata
Assignees
Labels
No labels