Skip to content

docs: document Vim indent and dedent operators in the code editor - #439

Open
hongyi-chen wants to merge 2 commits into
mainfrom
docs/vim-indent-dedent-operators
Open

docs: document Vim indent and dedent operators in the code editor#439
hongyi-chen wants to merge 2 commits into
mainfrom
docs/vim-indent-dedent-operators

Conversation

@hongyi-chen

Copy link
Copy Markdown
Collaborator

Summary

Warp's code editor supports the Vim > and < indent and dedent operators, but the Vim keybindings reference didn't list them. That page is meant to be an exhaustive list of implemented Vim functionality, so a missing operator reads as "not supported."

Found by the missing_docs drift-watch audit (changelog item #14268) and verified against crates/vim/src/vim.rs.

Changes

src/content/docs/code/code-editor/code-editor-vim-keybindings.mdx

  • Added >, <, >>, and << to the Editing table.
  • Added an Indenting and dedenting subsection showing that > and < are operators that compose with motions, text objects, and counts, plus their visual-mode behavior.

Source verification

All behavior in the new subsection maps to crates/vim/src/vim.rs:

  • VimOperator::Indent / Dedent are constructed from > / < in PendingAction::from and VimOperator::from.
  • >> and << resolve to VimOperand::Line in handle_normal_pending_operation.
  • The same function routes i/a to text objects and j/k to linewise motions for any operator, so >ap and >j work.
  • Digits accumulate into pending_action_count before the operator, so 3>> applies a count.
  • handle_visual_nothing_pending handles < / > via create_visual_operator and then returns to Normal mode.

Verification

  • npm run build passes.
  • Internal link check passes (0 broken links).

Deferred findings from this audit run

None specific to this page. Run-wide deferrals are listed in the companion audit-bookkeeping PR.

Conversation: https://staging.warp.dev/conversation/53c4f3f8-39bb-46c1-a5c0-66b467db0439
Run: https://oz.staging.warp.dev/runs/019fb91e-74a0-73f4-ac72-f2d88c32fab5

This PR was generated with Oz.

Co-Authored-By: Oz oz-agent@warp.dev

The Vim keybindings reference is an exhaustive list of supported
functionality, but it omitted the > and < operators.

Verified against crates/vim/src/vim.rs.

Co-Authored-By: Oz <oz-agent@warp.dev>
@hongyi-chen hongyi-chen added the documentation Improvements or additions to documentation label Jul 31, 2026 — with Warp Agent Staging
@hongyi-chen
hongyi-chen requested a review from liliwilson July 31, 2026 17:33
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jul 31, 2026 11:48pm

Request Review

@oz-for-oss

oz-for-oss Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@hongyi-chen

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@hongyi-chen

Copy link
Copy Markdown
Collaborator Author

oh this is neat i didn't know we supported this

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates the Vim keybindings documentation for Warp's code editor to include indent and dedent operators, plus examples for normal and visual mode usage. The added documentation matches the referenced Vim implementation behavior, and there are no security or spec-alignment concerns from the provided context.

Concerns

  • None.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants