From d519fc6b0284d0d549c3730c6a1c8f131feb9d70 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 25 Jan 2024 19:15:31 -0700 Subject: [PATCH] Vim :% and :0 Fixes #4303 --- crates/vim/src/command.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/vim/src/command.rs b/crates/vim/src/command.rs index f1b4853feb..1886ddd0ab 100644 --- a/crates/vim/src/command.rs +++ b/crates/vim/src/command.rs @@ -5,7 +5,7 @@ use serde_derive::Deserialize; use workspace::{SaveIntent, Workspace}; use crate::{ - motion::{EndOfDocument, Motion}, + motion::{EndOfDocument, Motion, StartOfDocument}, normal::{ move_cursor, search::{FindCommand, ReplaceCommand}, @@ -235,6 +235,8 @@ pub fn command_interceptor(mut query: &str, _: &AppContext) -> Option ) "$" => ("$", EndOfDocument.boxed_clone()), + "%" => ("%", EndOfDocument.boxed_clone()), + "0" => ("0", StartOfDocument.boxed_clone()), _ => { if query.starts_with("/") || query.starts_with("?") {