diff --git a/crates/vim/src/mode.rs b/crates/vim/src/mode.rs index 2e5dc4ca2c..f00c14e2e8 100644 --- a/crates/vim/src/mode.rs +++ b/crates/vim/src/mode.rs @@ -52,15 +52,15 @@ pub enum NormalState { impl NormalState { pub fn set_context(&self, context: &mut Context) { - let sub_mode = match self { + let submode = match self { Self::GPrefix => Some("g"), _ => None, }; - if let Some(sub_mode) = sub_mode { + if let Some(submode) = submode { context .map - .insert("vim_sub_mode".to_string(), sub_mode.to_string()); + .insert("vim_submode".to_string(), submode.to_string()); } } } diff --git a/crates/vim/src/normal/g_prefix.rs b/crates/vim/src/normal/g_prefix.rs index 82510c0cf9..5b71089245 100644 --- a/crates/vim/src/normal/g_prefix.rs +++ b/crates/vim/src/normal/g_prefix.rs @@ -6,7 +6,7 @@ use crate::{mode::Mode, SwitchMode, VimState}; action!(MoveToStart); pub fn init(cx: &mut MutableAppContext) { - let context = Some("Editor && vim_mode == normal && vim_sub_mode == g"); + let context = Some("Editor && vim_mode == normal && vim_submode == g"); cx.add_bindings(vec![ Binding::new("g", MoveToStart, context), Binding::new("escape", SwitchMode(Mode::normal()), context),