系列文章:
编程AI深度实战:私有模型deep seek r1,必会ollama-CSDN博客
编程AI深度实战:自己的AI,必会LangChain-CSDN博客
编程AI深度实战:给vim装上AI-CSDN博客
编程AI深度实战:火的编程AI,都在用语法树(AST)-CSDN博客
编程AI深度实战:让verilog不再是 AI 的小众语言-CSDN博客
文末有vim-ollama安装指南。
以下是 GitHub 上托管的 vim 和 neovim 插件的详尽列表,这些插件使用大型语言模型,并在 2023 年 1 月 1 日之后提交。为了优化以获得最大新鲜度,插件按上次提交日期的顺序列出。
代码编写和编辑
成熟、功能齐全、可配置的插件以粗体突出显示。
#inline
model:openai
#inline
model:openai
#inline
model:openai
#inline
model:openai
#inline
#templates
model:openai
#inline
#chat
#templates
model:openai
#inline
model:openai
#inline
model:openai
#inline
#templates
model:openai
model:bard
model:huggingface
model:local
#inline
model:openai
#inline
#workflow
#chat
#templates
model:openai
#inline
model:openai
#inline
model:openai
#inline
model:chatgpt
model:openai
以对话为中心
这些插件的功能都非常相似。Robitx /gp.nvim以丰富的配置选项脱颖而出,并且还包括用于编写和编辑代码的命令(即与上面的部分重叠)。
#chat
model:openai
#chat
model:openai
#chat
model:openai
#chat
model:openai
#chat
model:openai
#chat
model:openai
#chat
model:openai
#inline
#chat
#templates
model:openai
#chat
model:bard
Tab 补全
这些插件的功能也几乎相同,也许更重要的是比较 (1) 订阅费用是多少,以及 (2) 输出质量。一个突出的插件是huggingface/llm.nvim,它使用托管在 Hugging Face 上的免费推理端点。
#autocomplete
model:custom
#autocomplete
model:custom
#autocomplete
model:custom
#autocomplete
#chat
model:custom
#autocomplete
model:custom
#autocomplete
model:huggingface
#autocomplete
model:custom
#autocomplete
model:custom
其他
james1236/backseat.nvim在代码行之间提供注释,而svermeulen/text-to-colorscheme有助于在编程时设定心情。
#augment
model:openai
#augment
model:local
#other
model:openai
标签说明
功能
#inline:
在当前缓冲区中编写、编辑或注释代码。在有限的情况下,可能会使用弹出窗口、窗口或选项卡来显示信息。#chat:
实现专注于对话的接口,但对从缓冲区复制/复制到缓冲区没有提供大量支持。#templates:
支持构建自定义命令、提示或管道。#workflow:
在将更改提交到当前缓冲区之前编辑代码或查看差异的重要功能。#augment:
以某种方式增强编程体验,但不会编写或编辑代码。#other:
与编程无关,但仍在编辑器中出于某些目的使用 AI。模型
model:openai:
OpenAI API。model:chatgpt:
ChatGPT 网络界面(无 API)。model:bard:
Google PaLM API。model:huggingface:
Hugging Face 推理 API。model:local:
本地模型(例如调用 llama.cpp)。model:custom:
任何其他没有官方开放 API 的模型。实际各个插件大同小异,核心的还是大模型本身,运作模式,对代码的处理。
利用vim-ollama这个vim插件,可以在vim内和本地大模型聊天。
【安装和使用】
1️⃣ 安装
- git clone GitHub - gergap/vim-ollama: Vim plugin for integrating Ollama based LLM (large language models) ~/.vim/pack/others/start/vim-ollama
-配置~/.vimrc的一个例子
" Default chat model
let g:ollama_chat_model = 'llama3'
" Codellama models
let g:ollama_model = 'codellama:13b-code'
let g:ollama_model = 'codellama:7b-code'
let g:ollama_model = 'codellama:code'
" Codegemma (small and fast)
let g:ollama_model = 'codegemma:2b'
" qwen2.5-coder (0.5b, 1.5b, 3b, 7b, 14b, 32b)
" smaller is faster, bigger is better"
" https://ollama.com/library/qwen2.5-coder
let g:ollama_model = 'qwen2.5-coder:3b'
" Deepseek-coder-v2
let g:ollama_model = 'deepseek-coder-v2:16b-lite-base-q4_0'
2️⃣ 使用
vim内 :OllamaChat, :OllamaReview, :OllamaTask. Review前可以先visual选定代码,否则就是整个文件
【基础环境】
ollama
但是这个是感知不了代码的结构的,要感知代码结构请跳转到:
编程AI深度实战:让verilog不再是 AI 的小众语言-CSDN博客
编程AI深度实战:火的编程AI,都在用语法树(AST)-CSDN博客