summaryrefslogtreecommitdiffstats
path: root/zellij-utils
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-08-23 23:18:43 +0200
committerGitHub <noreply@github.com>2021-08-23 23:18:43 +0200
commitb1906c893ac6ba29ff40c79b6c6e961de49d5fe4 (patch)
treebd894c928c903ea45471f37fcff710d72c916d72 /zellij-utils
parentd969bbfea751e9442b06e9bc27c24d7d60ef88ed (diff)
parent24ef96b96510d3efba78a965364bab992a8a92fb (diff)
Merge pull request #622 from sagittarius-a/feature/go-to-last-tab
feat(tab): add keybind to go to last tab visited
Diffstat (limited to 'zellij-utils')
-rw-r--r--zellij-utils/assets/config/default.yaml2
-rw-r--r--zellij-utils/src/errors.rs1
-rw-r--r--zellij-utils/src/input/actions.rs1
-rw-r--r--zellij-utils/src/input/mod.rs1
4 files changed, 5 insertions, 0 deletions
diff --git a/zellij-utils/assets/config/default.yaml b/zellij-utils/assets/config/default.yaml
index 4654cee90..94f12f33c 100644
--- a/zellij-utils/assets/config/default.yaml
+++ b/zellij-utils/assets/config/default.yaml
@@ -168,6 +168,8 @@ keybinds:
key: [ Char: '8',]
- action: [GoToTab: 9,]
key: [ Char: '9',]
+ - action: [ToggleTab]
+ key: [ Char: "\t" ]
scroll:
- action: [SwitchToMode: Normal,]
key: [Ctrl: 'r', Ctrl: 's', Char: ' ',
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs
index c0891d52d..65a54c560 100644
--- a/zellij-utils/src/errors.rs
+++ b/zellij-utils/src/errors.rs
@@ -228,6 +228,7 @@ pub enum ScreenContext {
MouseRelease,
MouseHold,
Copy,
+ ToggleTab,
}
/// Stack call representations corresponding to the different types of [`PtyInstruction`]s.
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs
index 3e86409bc..23c01eefe 100644
--- a/zellij-utils/src/input/actions.rs
+++ b/zellij-utils/src/input/actions.rs
@@ -76,6 +76,7 @@ pub enum Action {
/// Close the current tab.
CloseTab,
GoToTab(u32),
+ ToggleTab,
TabNameInput(Vec<u8>),
/// Run speficied command in new pane.
Run(RunCommandAction),
diff --git a/zellij-utils/src/input/mod.rs b/zellij-utils/src/input/mod.rs
index 87d72db8a..68aa9dd79 100644
--- a/zellij-utils/src/input/mod.rs
+++ b/zellij-utils/src/input/mod.rs
@@ -38,6 +38,7 @@ pub fn get_mode_info(
("x".to_string(), "Close".to_string()),
("r".to_string(), "Rename".to_string()),
("s".to_string(), "Sync".to_string()),
+ ("Tab".to_string(), "Toggle".to_string()),
],
InputMode::Scroll => vec![
("↓↑".to_string(), "Scroll".to_string()),