fix: add keymap for tmux in nvf

This commit is contained in:
danny 2025-09-07 19:46:56 +08:00
parent 38df85a42a
commit ebc7481553
2 changed files with 38 additions and 18 deletions

View file

@ -186,6 +186,12 @@ in {
nowait = true;
desc = "Notifications";
}
{
key = "<ESC><ESC>";
mode = ["n"];
action = ":noh<CR>";
desc = "Clear highlight";
}
# === Tab === #
{
@ -209,6 +215,16 @@ in {
mode = ["t"];
action = "<C-\\><C-n>:ToggleTerm<CR>";
}
{
key = "<C-_>";
mode = ["t"];
action = "<C-\\><C-n>:ToggleTerm<CR>";
}
{
key = "<C-_>";
mode = ["n"];
action = ":ToggleTerm<CR>";
}
{
key = "<ESC><ESC>";
mode = ["t"];

View file

@ -1,6 +1,8 @@
{ pkgs, config, ... }:
let
{
pkgs,
config,
...
}: let
getIconScript = pkgs.writeShellScript "get-icon" ''
get_icons() {
local session_name="$1"
@ -28,21 +30,22 @@ let
prefixKey = "C-Space";
tmuxConfigPath = "/etc/tmux.conf";
in
{
environment.variables = {
in {
environment = {
variables = {
TMUXINATOR_CONFIG = "/etc/tmuxinator";
};
environment.etc = {
etc = {
"tmuxinator/tmux.yaml" = {
source = ../../home/config/tmux.yaml;
mode = "0444";
};
};
environment.systemPackages = with pkgs; [
systemPackages = with pkgs; [
tmuxinator
];
};
programs = {
tmux = {
@ -61,6 +64,7 @@ in
set -g allow-passthrough on
set -s set-clipboard on
set-option -s set-clipboard on
set-option -g extended-keys on
set -g status "on"
set -g status-style fg=default,bg=default