tom-doerr / vim_codex

Supercharge your Vim editor with AI-powered code completion using OpenAI Codex. Boost productivity and save time with intelligent suggestions.
MIT License
259 stars 30 forks source link

[ENHANCEMENT] Option for CODEX to ignore certain comments (or code) #5

Open clotodex opened 3 years ago

clotodex commented 3 years ago

Often I put random ideas I have into comments (library ideas, todos, cleanup etc).
While it is nice to use CODEX to also put ideas into the generated code as well I notice the generated code not to be what I want anymore.

It would be great if there is an option to ignore certain comment types (as language agnostic as feasible of course).
E.g. TODO or IDEA lines; maybe a custom one like cignore or something makes sense.
A switch with line comments like # CODEXOFF and # CODEXON might also be helpful - also to "comment out code" you dont want CODEX to see.

Thanks for the great plugin!

tom-doerr commented 3 years ago

That sounds like a good idea, I might implement it at some point.

clotodex commented 1 year ago

I think two things could be cool

tom-doerr commented 1 year ago

"special command that ignores all special comment types" - Do you want a special command for making the plugin ignore the commands that make the plugin ignore the text? :D Pretty meta I'm happy to merge PRs, shouldn't be too hard to implement since it's Python.

slacksystem commented 1 year ago

An implementation of the completion functions that can be used in a range, as an alternative option to all the text, could be great in relation to this, both from the perspective of emphasizing what to focus on and for saving tokens as well.