aduros / ai.vim

Generate and edit text in Neovim using OpenAI and GPT.
ISC License
291 stars 24 forks source link

question: use a keymapping that accepts AI input #7

Closed azinsharaf closed 1 year ago

azinsharaf commented 1 year ago

how can i create a key mapping that asks for an input? For instance I have added this:

map("n", "<Leader>a", ":AI<CR>") but the command should be :AI <type a question here> I want to have the AI plugin input mode when I press <leader>A

aduros commented 1 year ago

Hi, I think you just need to replace the <CR> with a space in your mapping. Eg: map("n", "<Leader>a", ":AI ")

azinsharaf commented 1 year ago

yes, it worked. Thanks!