diff options
| author | Sijie Wang <[email protected]> | 2025-07-25 15:36:42 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-25 22:36:42 +0000 |
| commit | fbdc8d5ab3f76aef32af6a8f516d97771c56a7ac (patch) | |
| tree | 2167cd9ab4c5a1378d466e735bc41e167ea4d904 /docs/cli | |
| parent | aa71438684dd0350acf62fc01d1e6244fd4d3f51 (diff) | |
Vim mode (#3936)
Diffstat (limited to 'docs/cli')
| -rw-r--r-- | docs/cli/commands.md | 11 | ||||
| -rw-r--r-- | docs/cli/configuration.md | 5 |
2 files changed, 16 insertions, 0 deletions
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. diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md index ad0a0df0..1a8f9a8c 100644 --- a/docs/cli/configuration.md +++ b/docs/cli/configuration.md @@ -103,6 +103,11 @@ In addition to a project settings file, a project's `.gemini` directory can cont - **Default:** `"Default"` - **Example:** `"theme": "GitHub"` +- **`vimMode`** (boolean): + - **Description:** Enables or disables vim mode for input editing. When enabled, the input area supports vim-style navigation and editing commands with NORMAL and INSERT modes. The vim mode status is displayed in the footer and persists between sessions. + - **Default:** `false` + - **Example:** `"vimMode": true` + - **`sandbox`** (boolean or string): - **Description:** Controls whether and how to use sandboxing for tool execution. If set to `true`, Gemini CLI uses a pre-built `gemini-cli-sandbox` Docker image. For more information, see [Sandboxing](#sandboxing). - **Default:** `false` |
