You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-8Lines changed: 62 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,66 @@
4
4
5
5
🤏SimpleGPT is a Vim plugin designed to provide a simple (high transparency based on Jinja) yet flexible way (context-aware based on buffer, visual selection, LSP info, terminal etc.) to customize your LLM/ChatGPT prompts for your tasks (building chat or finishing tasks by replacing them with diff comparison, appending, SEARCH/REPLACE etc.) on nearly all kinds of LLM APIs.
6
6
7
-
- Why 🤏SimpleGPT: **You need customized LLM/ChatGPT prompts for your tasks**.
8
-
- AI Coding Plugins didn't provide support for every scenario.
9
-
- General tasks beyond coding:
10
-
- Article writing.
11
-
- Reading, notetaking, summarizing.
12
-
- Translating.
13
-
- Even for specific tasks that AI Coding supports, using a customized prompt and workflow is often more effective and smooth.
7
+
## Why 🤏SimpleGPT:
8
+
9
+
### **You need customized LLM/ChatGPT prompts for your tasks**.
10
+
11
+
- AI Coding Plugins didn't provide support for every scenario.
12
+
- General tasks beyond coding:
13
+
- Article writing.
14
+
- Reading, notetaking, summarizing.
15
+
- Translating.
16
+
- Even for specific tasks that AI Coding supports, using a customized prompt and workflow is often more effective and smooth.
17
+
18
+
19
+
### You just need a simple way to chat with all kinds LLM
20
+
21
+
For a long time, I've been looking for a simple way to chat in VIM with any LLM—just having a conversation, without pulling in my codebase as context (VIM is a tool far beyond code).
22
+
- 🍰 Why a simple way? Many LLM-chatting plugins come with lots of features—session management, code extraction, shortcuts to scroll content, and more. But as an experienced Vim user, I already have many of these features through my plugins. If I can just chat in a buffer, I have everything I need. Extra shortcuts that don't fit my setup only add unnecessary complexity.
23
+
- 🦾 Can't existing chat plugins support all kinds of LLMs? While pure Vim-powered chat plugins like [jackMort/ChatGPT.nvim](https://github.com/jackMort/ChatGPT.nvim) and [robitx/gp.nvim](https://github.com/Robitx/gp.nvim) are excellent, they do not support reasoning models.
24
+
25
+
SimpleGPT aims to solve this problem.
26
+
- 🍰 It only provides the core feature to chat in an existing buffer. The chat will be organized by emoji like 👤(user), 🤖(AI), 💻(system).
27
+
and only one customizable shortcut, which is `<LocalLeader>gc` (to trigger chat completion or stop the chat completion stream).
28
+
- 🦾 It supports all kinds of LLMs, including reasoning models. It's backend is based on [yetone/avante.nvim](https://github.com/yetone/avante.nvim), which supports a wide range of LLMs.
29
+
30
+
What's more!
31
+
- Simple here means we removed features that Vim users don't need.
32
+
- We also include a Jinja engine to help you use context in your chats more quickly. This is the key for efficient chatting. You can create your own templates over time to chat even more efficiently.
33
+
34
+
Here is a Jinja template example (this shows how you can build rich, context-aware chat experiences):
35
+
`````jinja
36
+
You are an expert in programming.
37
+
38
+
{% if p %}
39
+
Here are a list of files for reference.
40
+
{{p-}}
41
+
{% endif %}
42
+
43
+
We have a file named {{filename}} with content:
44
+
````{{filetype}}
45
+
{{content}}
46
+
````
47
+
48
+
{%if terminal%}
49
+
You encountered error when running or compiling it
50
+
```
51
+
{{terminal}}
52
+
```
53
+
{% endif %}
54
+
55
+
56
+
{% if visual %}The error are potentially caused by the following code block(We call it *focused code block*).
57
+
```{{filetype}}
58
+
{{visual}}
59
+
```
60
+
Please only return the code to replace the *focused code block*{% else %}
61
+
{{f-}}
62
+
{% endif %}
63
+
64
+
{{q}}
65
+
`````
14
66
15
-
Another reason to choose SimpleGPT is better maintenance and compatibility. Many general-purpose LLM/ChatGPT neovim plugins are not actively maintained and often do not support the latest APIs for advanced models like DeepSeek or reasoning LLMs(e.g. I can't find any plugin to simply chat without involving my codebase on reasoning models). In contrast, popular coding-focused plugins are usually kept up to date with new developments. SimpleGPT solves this issue by integrating the backends of these well-maintained coding plugins, allowing you to use nearly any LLM API for a wide range of general tasks.
16
67
17
68
## Design Philosophy
18
69
@@ -317,6 +368,7 @@ After receiving a response from ChatGPT, you can perform several actions to inte
317
368
-`{"<C-h>"}`: Cycle to previous window
318
369
-`{"<C-s>"}`: Save registers (for template editing only)
319
370
-`K`: Show special value for placeholder under cursor (for template editing only)
371
+
-`Q`: Send current question or conversation to a buffer for chatting.
320
372
- For `ChatDialog` (The dialog that can get responses)
321
373
-`{"<C-a>"}`: Append response to original buffer after selection/current line
322
374
-`{"<C-y>"}`: Copy full response to clipboard
@@ -341,6 +393,8 @@ After receiving a response from ChatGPT, you can perform several actions to inte
341
393
-`<LocalLeader>gR`: toggle the dialog.
342
394
-`<LocalLeader>gp`: load current file to reg
343
395
-`<LocalLeader>gP`: append current file to reg
396
+
- Buffer Chatting:
397
+
-`<LocalLeader>c`: Start chatting in current buffer.
344
398
- Shortcuts for combined actions: Loading template + send to target
345
399
- By default, they start with `<LocalLeader>s` (You can change it by setting `keymaps.shortcuts.prefix` when you setup the plugin)
346
400
-[Full list of shortcuts](lua/simplegpt/conf.lua#L25)
0 commit comments