ai.vim
ai.vim copied to clipboard
Some ideas...
Great plugin, this is really cool! Here are some suggestions how to make it even better:
Have a setup/config that allows to set things like:
- Check filetype and if it's go for example, add "in golang" to AI requests automatically.
- Which model(s) should be used for the different kind of requests
- Specify different keybinding than CTRL+A which is already mapped by default
- Choose between column-icon or virtual-text when waiting for response (maybe allow specifying the icon/text)
- Have option to read the API key from a file like ~/.openai or whatever as exporting isn't the most secure/best option especially for those who got public dotfiles.
Conversation-Mode where one can go back and forth with ChatGPT in a floating window and at the end have the last response parsed into the buffer.
Check filetype and if it's go for example, add "in golang" to AI requests automatically.
haven't looked into the code, but it does seem that the openAI requests already include the right language, if I run the plugin in a javascript file I get js results, and in a lua file, I get lua results.
haven't looked into the code, but it does seem that the openAI requests already include the right language, if I run the plugin in a javascript file I get js results, and in a lua file, I get lua results.
Hmm I was in a .go file earlier and did something like "AI write function to ..." and got JS code :-)
Conversation-Mode where one can go back and forth with ChatGPT in a floating window and at the end have the last response parsed into the buffer.
This could be very useful if the UX is good!
Hmm I was in a .go file earlier and did something like "AI write function to ..." and got JS code :-)
I've noticed better results when using context completion instead of prompts for this kind of thing. So instead of :AI write a function to add two numbers
doing:
// A function that adds two numbers
<Ctrl-A>
Or better yet, writing out the function signature:
function add (x: number, y: number): number {
<Ctrl-A>
}
When using completion mode (no prompt) the plugin sends 20 lines of text above and below the cursor that helps to give context to OpenAI.
Conversation-Mode where one can go back and forth with ChatGPT in a floating window and at the end have the last response parsed into the buffer.
This could be very useful if the UX is good!
This will be good!
There's this use case that I found that it to complete using ai.vim, where I visually highlight a chunk of code and tell chatgpt3 to "explain this". Because of the nature of the plugin now, it can only look at the code, try to change it and come back with weird result.