Skip to content

Commit 4789617

Browse files
committed
docs: update README with improved formatting and key mapping info
1 parent 174e485 commit 4789617

File tree

1 file changed

+62
-8
lines changed

1 file changed

+62
-8
lines changed

README.md

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,66 @@
44

55
🤏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.
66

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+
`````
1466

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.
1667

1768
## Design Philosophy
1869

@@ -317,6 +368,7 @@ After receiving a response from ChatGPT, you can perform several actions to inte
317368
- `{"<C-h>"}`: Cycle to previous window
318369
- `{"<C-s>"}`: Save registers (for template editing only)
319370
- `K`: Show special value for placeholder under cursor (for template editing only)
371+
- `Q`: Send current question or conversation to a buffer for chatting.
320372
- For `ChatDialog` (The dialog that can get responses)
321373
- `{"<C-a>"}`: Append response to original buffer after selection/current line
322374
- `{"<C-y>"}`: Copy full response to clipboard
@@ -341,6 +393,8 @@ After receiving a response from ChatGPT, you can perform several actions to inte
341393
- `<LocalLeader>gR`: toggle the dialog.
342394
- `<LocalLeader>gp`: load current file to reg
343395
- `<LocalLeader>gP`: append current file to reg
396+
- Buffer Chatting:
397+
- `<LocalLeader>c`: Start chatting in current buffer.
344398
- Shortcuts for combined actions: Loading template + send to target
345399
- By default, they start with `<LocalLeader>s` (You can change it by setting `keymaps.shortcuts.prefix` when you setup the plugin)
346400
- [Full list of shortcuts](lua/simplegpt/conf.lua#L25)

0 commit comments

Comments
 (0)