From fbdc8d5ab3f76aef32af6a8f516d97771c56a7ac Mon Sep 17 00:00:00 2001 From: Sijie Wang <3463757+sijieamoy@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:36:42 -0700 Subject: Vim mode (#3936) --- docs/cli/commands.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/cli/commands.md') diff --git a/docs/cli/commands.md b/docs/cli/commands.md index 10a10108..7f1ee85b 100644 --- a/docs/cli/commands.md +++ b/docs/cli/commands.md @@ -95,6 +95,17 @@ Slash commands provide meta-level control over the CLI itself. - **`/quit`** (or **`/exit`**) - **Description:** Exit Gemini CLI. +- **`/vim`** + - **Description:** Toggle vim mode on or off. When vim mode is enabled, the input area supports vim-style navigation and editing commands in both NORMAL and INSERT modes. + - **Features:** + - **NORMAL mode:** Navigate with `h`, `j`, `k`, `l`; jump by words with `w`, `b`, `e`; go to line start/end with `0`, `$`, `^`; go to specific lines with `G` (or `gg` for first line) + - **INSERT mode:** Standard text input with escape to return to NORMAL mode + - **Editing commands:** Delete with `x`, change with `c`, insert with `i`, `a`, `o`, `O`; complex operations like `dd`, `cc`, `dw`, `cw` + - **Count support:** Prefix commands with numbers (e.g., `3h`, `5w`, `10G`) + - **Repeat last command:** Use `.` to repeat the last editing operation + - **Persistent setting:** Vim mode preference is saved to `~/.gemini/settings.json` and restored between sessions + - **Status indicator:** When enabled, shows `[NORMAL]` or `[INSERT]` in the footer + ### Custom Commands For a quick start, see the [example](#example-a-pure-function-refactoring-command) below. -- cgit v1.2.3