芯片AI深度实战:给vim装上AI
系列文章:
芯片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 日之后提交。为了优化以获得最大新鲜度,插件按上次提交日期的顺序列出。
代码编写和编辑
成熟、功能齐全、可配置的插件以粗体突出显示。
- 2023-01-16 naps62/pair-gpt.nvim (35☆)
#inline
model:openai
- 2023-02-08 jdnewman85/openai-vim (5☆)
#inline
model:openai
- 2023-04-06 thmsmlr/gpt.nvim (20☆)
#inline
model:openai
- 2023-04-06 aduros/ai.vim (265☆)
#inline
model:openai
- 2023-05-02 dpayne/CodeGPT.nvim (698☆)
#inline
#templates
model:openai
- 2023-06-25 madox2/vim-ai (354☆)
#inline
#chat
#templates
model:openai
- 2023-07-03 oelmekki/make-my-code-better.vim (2☆)
#inline
model:openai
- 2023-07-13 tom-doerr/vim_codex (245☆)
#inline
model:openai
- 2023-07-20 gsuuon/llm.nvim (38☆)
#inline
#templates
model:openai
model:bard
model:huggingface
model:local
- 2023-08-02 CoderCookE/vim-chatgpt (141☆)
#inline
model:openai
- 2023-08-16 jackMort/ChatGPT.vim (2500☆)
#inline
#workflow
#chat
#templates
model:openai
- 2023-08-18密集分析/神经(313☆)
#inline
model:openai
- 2023-08-19 jayli/nvim-ai-coding (6☆)
#inline
model:openai
- 2023-03-18 0xStabby/chatgpt-vim (47☆)
#inline
model:chatgpt
model:openai
以对话为中心
这些插件的功能都非常相似。Robitx /gp.nvim以丰富的配置选项脱颖而出,并且还包括用于编写和编辑代码的命令(即与上面的部分重叠)。
- 2023-01-07 lambdalisue/butler.vim (29☆)
#chat
model:openai
- 2023-03-26 IwasakiYuuki/ai-assistant.nvim (3☆)
#chat
model:openai
- 2023-04-22 macrat/askgpt.vim (2☆)
#chat
model:openai
- 2023-07-26 yuki-yano/ai-review.vim (16☆)
#chat
model:openai
- 2023-08-11 charlespascoe/vim-chatgpt (1☆)
#chat
model:openai
- 2023-08-12 micheam/ai-assistant-console (0☆)
#chat
model:openai
- 2023-08-23 CamdenClark/flyboy (25☆)
#chat
model:openai
- 2023-08-28 Robitx/gp.nvim (55☆)
#inline
#chat
#templates
model:openai
- 2023-08-29 martineausimon/nvim-bard (21☆)
#chat
model:bard
Tab 补全
这些插件的功能也几乎相同,也许更重要的是比较 (1) 订阅费用是多少,以及 (2) 输出质量。一个突出的插件是huggingface/llm.nvim,它使用托管在 Hugging Face 上的免费推理端点。
- 2023-05-10 tzachar/cmp-tabnine (263☆)
#autocomplete
model:custom
- 2023-08-22 github/copilot.vim (6000☆)
#autocomplete
model:custom
- 2023-08-25 zbirenbaum/copilot.lua (1400☆)
#autocomplete
model:custom
- 2023-08-28 codota/tabnine-nvim(206☆)
#autocomplete
#chat
model:custom
- 2023-08-30 Exafunction/codeium.vim (2100☆)
#autocomplete
model:custom
- 2023-08-31 huggingface/llm.nvim (243☆)
#autocomplete
model:huggingface
- 2023-08-31 zbirenbaum/copilot-cmp (723☆)
#autocomplete
model:custom
- 2023-09-01 TabbyML/虎斑(9500☆)
#autocomplete
model:custom
其他
james1236/backseat.nvim在代码行之间提供注释,而svermeulen/text-to-colorscheme有助于在编程时设定心情。
- 2023-04-15 james1236/backseat.nvim (143☆)
#augment
model:openai
- 2023-05-27 mthbernardes/codeexplain.nvim (79☆)
#augment
model:local
- 2023-06-26 svermeulen/文本转颜色方案(187☆)
#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 https://github.com/gergap/vim-ollama.git ~/.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博客