vim-ai icon indicating copy to clipboard operation
vim-ai copied to clipboard

Feaure suggestion :AICommand

Open notno opened this issue 1 year ago • 1 comments

:AICommand, creates vim commands based on your description and lets you see them before executing.

Inspiration: I'm loving https://github.com/TheR1D/shell_gpt, and how you can run sgpt --shell "Install ripgrep" and it will return

sudo apt-get install ripgrep
Execute shell command? [y/N]:

notno avatar May 23 '23 19:05 notno

for example:

:AICommand "Replace all '<div>' with '<p>' in lines 13 to 18"

would then do:

:13,18s/<div>/<p>/g
Execute command? [y/N]:

Which would allow you to keep it from making mistakes and would teach you about different commands.

notno avatar May 23 '23 20:05 notno