Skip to content

Local driven AI assistent plugin written in the cutting-edge Vim9 script and powered by ollama

License

Notifications You must be signed in to change notification settings

greeschenko/vim9-ollama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim9-ollama

Local driven AI assistent plugin written in the cutting-edge Vim9 script and powered by ollama and codellama

vim9_ollama_demo.mp4

Requirement

This plugin supports Vim version 9.0+.

You need install ollama and test it with following commands

ollama serve
ollama pull codellama:latest
ollama pull codellama:7b-code

ollama run codellama:latest

Configuration

Add to your .vimrc

Plug 'greeschenko/vim9-ollama'

Usage

  1. type in vim console
    :OllamaAsk Tell me a joke

return a random joke or another ansver for your question in the cursor position line

  1. select text or code and type in vim console
    :OllamaChange Modify the following text to improve grammar and spelling, just output the final text without additional quotes around it

this command replace text with correct text with improved gramma and spelling

  1. select code and type in vim console
    :OllamaChangeCode Add extra logging in this function

this command replace you code with updated

  1. prepere not completite code with in midle
func fibanachi(a, b){
    <FILL>
}

select whis code and type

    :OllamaFill

this command replace you code with complete function

  1. select text or code and type in vim console
    :OllamaRead what I can change in this

this command write after selection text a LLM comments about this

Inline Completion

You can use this experimental function some kind like copilot

start write a code and pres <C-l> you can see a completion candidat press <C-l> again and you get new candidat when you get correct variant press <C-f> to paste code in the buffer

Troubleshooting

If you run multiple Vim instances and Ollama does not respond, try running the command :OllamaReStart. This will restart the Ollama server and fix any connection issues."

About

Local driven AI assistent plugin written in the cutting-edge Vim9 script and powered by ollama

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published