summaryrefslogtreecommitdiffstats
path: root/atuin-client
diff options
context:
space:
mode:
authorYummyOreo <bobgim20@gmail.com>2024-01-13 09:15:49 -0800
committerGitHub <noreply@github.com>2024-01-13 17:15:49 +0000
commita56085f059b2444812353e715e5a4b93ea75b018 (patch)
tree6384c32f9ab242bf3fa7bfece81d29faa4a735d2 /atuin-client
parent4d41a741f0a47904a75db2981f5295732f7549c5 (diff)
feat(ui): vim mode (#1553)
* feat(config): add vim option to config * feat(ui): simple vim mode * fix(windows): windows sadly doesn't support the stuff * feat(ui): blinking * fix(merge) * revert: reverts some debugging stuff * feat(ui): changes the defaut to insert, don't know what should be the default * feat(ui): implements some vim parity * doc: adds this to the docs * docs(keybindings): adds vim mode keybindsings to the list of keybindings * refactor: rustfmt and remove the docs for pr in own repo * refactor: use execute! * Update atuin/src/command/client/search/interactive.rs --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Diffstat (limited to 'atuin-client')
-rw-r--r--atuin-client/config.toml6
-rw-r--r--atuin-client/src/settings.rs2
2 files changed, 7 insertions, 1 deletions
diff --git a/atuin-client/config.toml b/atuin-client/config.toml
index 511662cc8..29581d1fa 100644
--- a/atuin-client/config.toml
+++ b/atuin-client/config.toml
@@ -125,6 +125,10 @@
# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise.
enter_accept = true
+
+## Defaults to false. If enabled you may use 'j' and 'k' to navigate the history list and 'i' to enter Insert mode.
+# vim = false
+
#[stats]
# Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl
#common_subcommands = [
@@ -136,6 +140,6 @@ enter_accept = true
# "pnpm",
# "kubectl",
#]
-#
+#
# Set commands that should be totally stripped and ignored from stats
#common_prefix = ["sudo"]
diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs
index 0798a890a..ea01961c7 100644
--- a/atuin-client/src/settings.rs
+++ b/atuin-client/src/settings.rs
@@ -201,6 +201,7 @@ pub struct Settings {
pub max_preview_height: u16,
pub show_help: bool,
pub exit_mode: ExitMode,
+ pub vim: bool,
pub word_jump_mode: WordJumpMode,
pub word_chars: String,
pub scroll_context_lines: usize,
@@ -436,6 +437,7 @@ impl Settings {
// New users will get the new default, that is more similar to what they are used to.
.set_default("enter_accept", false)?
.set_default("sync.records", false)?
+ .set_default("vim", false)?
.add_source(
Environment::with_prefix("atuin")
.prefix_separator("_")