I use bash and like to use the built-in command Ctrl xCtrl e to invoke an editor in the shell in order to edit the current line.
This creates a temporary file, named /tmp/bash-fc.[Some random alphanumeric string]
, and once that file is saved, whatever you have written gets executed.
Since I have my EDITOR environment variable set to neovim, it's possible for me to turn github copilot on while I'm editing my shell command with the vim command: let b:copilot_enabled = v:true
This is very cool for on the fly scripting. However, since copilot looks for file extensions, I can't turn it on by default without having it on permanently whenever I start nvim.
I thought of mapping a key to the command let b:copilot_enabled = v:true
with in my .vimrc, but I can't get it to work. Looking for any suggestions.