jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.56k stars 307 forks source link

feat: visual selection appended in chat #441

Open dqnk opened 1 month ago

dqnk commented 1 month ago

This pull request makes visual selection appended to default chat (:ChatGPT) to save time on keystrokes and because other commands (such as ChatGPTEditWithInstructions) do not store sessions. You can append multiple times without having your text in chat input window deleted.

Usage:

  1. go in any of the visual modes and select the text you want inserted.
  2. Run ChatGPT from a keybind mapped to <cmd>ChatGPT<cr> (else this won't work properly because of how visual selection works).