clean up
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
This commit is contained in:
parent
66fac38cf8
commit
bbbc168f50
3 changed files with 7 additions and 3 deletions
|
@ -111,6 +111,10 @@
|
||||||
// 2. Maps `Control` on Linux and Windows and to `Command` on MacOS:
|
// 2. Maps `Control` on Linux and Windows and to `Command` on MacOS:
|
||||||
// "cmd_or_ctrl" (alias: "cmd", "ctrl")
|
// "cmd_or_ctrl" (alias: "cmd", "ctrl")
|
||||||
"multi_cursor_modifier": "alt",
|
"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.
|
// Whether to enable vim modes and key bindings.
|
||||||
"vim_mode": false,
|
"vim_mode": false,
|
||||||
// Whether to enable helix mode and key bindings.
|
// Whether to enable helix mode and key bindings.
|
||||||
|
|
|
@ -70,7 +70,7 @@ use ui::{PopoverMenuHandle, prelude::*};
|
||||||
use util::markdown::MarkdownString;
|
use util::markdown::MarkdownString;
|
||||||
use util::{ResultExt, asset_str};
|
use util::{ResultExt, asset_str};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
use vim_mode_setting::{EditorMode, EditorModeSetting};
|
use vim_mode_setting::EditorModeSetting;
|
||||||
use workspace::notifications::{
|
use workspace::notifications::{
|
||||||
NotificationId, SuppressEvent, dismiss_app_notification, show_app_notification,
|
NotificationId, SuppressEvent, dismiss_app_notification, show_app_notification,
|
||||||
};
|
};
|
||||||
|
|
|
@ -578,9 +578,9 @@ impl Render for QuickActionBar {
|
||||||
{
|
{
|
||||||
move |window, cx| {
|
move |window, cx| {
|
||||||
let new_value = if vim_mode_enabled {
|
let new_value = if vim_mode_enabled {
|
||||||
EditorMode::Default
|
EditorMode::default()
|
||||||
} else {
|
} else {
|
||||||
EditorMode::Vim
|
EditorMode::vim()
|
||||||
};
|
};
|
||||||
EditorModeSetting::override_global(EditorModeSetting(new_value), cx);
|
EditorModeSetting::override_global(EditorModeSetting(new_value), cx);
|
||||||
window.refresh();
|
window.refresh();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue