Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
This commit is contained in:
Smit Barmase 2025-08-22 15:53:14 +05:30
parent 66fac38cf8
commit bbbc168f50
No known key found for this signature in database
3 changed files with 7 additions and 3 deletions

View file

@ -111,6 +111,10 @@
// 2. Maps `Control` on Linux and Windows and to `Command` on MacOS:
// "cmd_or_ctrl" (alias: "cmd", "ctrl")
"multi_cursor_modifier": "alt",
/// Weather to set editor mode to vim, vim insert, helix, etc.
///
/// Default: default
"editor_mode": "default",
// Whether to enable vim modes and key bindings.
"vim_mode": false,
// Whether to enable helix mode and key bindings.

View file

@ -70,7 +70,7 @@ use ui::{PopoverMenuHandle, prelude::*};
use util::markdown::MarkdownString;
use util::{ResultExt, asset_str};
use uuid::Uuid;
use vim_mode_setting::{EditorMode, EditorModeSetting};
use vim_mode_setting::EditorModeSetting;
use workspace::notifications::{
NotificationId, SuppressEvent, dismiss_app_notification, show_app_notification,
};

View file

@ -578,9 +578,9 @@ impl Render for QuickActionBar {
{
move |window, cx| {
let new_value = if vim_mode_enabled {
EditorMode::Default
EditorMode::default()
} else {
EditorMode::Vim
EditorMode::vim()
};
EditorModeSetting::override_global(EditorModeSetting(new_value), cx);
window.refresh();