diff --git a/lib/vim/init.vim b/lib/vim/init.vim index 1b9a2a9..94e07d3 100644 --- a/lib/vim/init.vim +++ b/lib/vim/init.vim @@ -129,9 +129,7 @@ autocmd! User GoyoEnter Limelight autocmd! User GoyoLeave Limelight! -" Disable Copilot for files larger than 100kb -autocmd BufReadPre * - \ let f=getfsize(expand("")) - \ | if f > 100000 || f == -2 - \ | let b:copilot_enabled = v:false - \ | endif +" Disable Copilot by default +let b:copilot_enabled = v:false +" keymap to toggle it enabled +nnoremap gc :let b:copilot_enabled = !b:copilot_enabled