Using Augment with Vim and Neovim
Augment for Vim and Neovim gives you powerful code completions and chat capabilities integrated into your favorite code editor.
Using completions
Augment’s code completions integrates with Vim and Neovim to give you autocomplete-like suggestions as you type. Completions are enable by default and you can use Tab to accept a suggestion.
Command | Action |
---|---|
Tab | Accept the current suggestion |
:Augment enable | Globally enable suggestions (on by default) |
:Augment disable | Globally disable suggestions |
Customizing accepting a suggestion
If you want to use a key other than Tab to accept a suggestion, create a mapping that calls augment#Accept()
. The function takes an optional arugment used to specify the fallback text to insert if no suggestion is available.
You can disable the default Tab mapping by setting g:augment_disable_tab_mapping = v:true
before the plugin is loaded.
Using chat
Chat is a new way to work with your codebase using natural language. Use Chat to explore your codebase, quickly get up to speed on unfamiliar code, and get help working through a technical problem.
Command | Action |
---|---|
:Augment chat <message> | Send a chat message to Augment |
:Augment chat-new | Start a new chat conversation |
:Augment chat-toggle | Toggle the chat panel visibility |
Sending a message
You can send a message to Chat using the :Augment chat command. You can send your message as an optional argument to the command or enter it into the command-line when prompted. Each new message will continue the current conversation which will be used as context for your next message.
Focusing on selected text
If you have text selected in visual mode
, Augment will automatically include it in your message. This is useful for asking questions about specific code or requesting changes to the selected code.
Starting a new conversation
You can start a new conversation by using the :Augment chat-new command.
All available commands
Command | Action |
---|---|
:Augment enable | Globally enable suggestions (on by default) |
:Augment disable | Globally disable suggestions |
:Augment chat <message> | Send a chat message to Augment |
:Augment chat-new | Start a new chat conversation |
:Augment chat-toggle | Toggle the chat panel visibility |
:Augment signin | Start the sign in flow |
:Augment signout | Sign out of Augment |
:Augment status | View the current status of the plugin |
:Augment log | View the plugin log |