From b69728ed3bb07697eb5b76e7713746712d55980b Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Sun, 12 Apr 2026 13:26:26 +0200 Subject: [PATCH] nvim,tmux: move split nav to Alt+hjkl, add tab cycling, set DIFFPROG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - smart-splits: C-hjkl → A-hjkl for split/pane navigation - tmux: C-hjkl → M-hjkl to keep seamless smart-splits integration - keymaps: add A-Tab / A-S-Tab for vim tab cycling - profile: set DIFFPROG="nvim -d" for pacdiff --- dot_config/nvim/lua/keymaps.lua | 4 ++++ dot_config/nvim/lua/plugins/ui.lua | 8 ++++---- dot_config/tmux/tmux.conf | 8 ++++---- dot_profile.tmpl | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dot_config/nvim/lua/keymaps.lua b/dot_config/nvim/lua/keymaps.lua index 87bef62..991d718 100644 --- a/dot_config/nvim/lua/keymaps.lua +++ b/dot_config/nvim/lua/keymaps.lua @@ -41,3 +41,7 @@ map({ "n", "i" }, "", "w", { desc = "Save" }) -- Quit map("n", "q", "q", { desc = "Quit" }) map("n", "Q", "qa", { desc = "Quit all" }) + +-- Tab navigation +map("n", "", "tabnext", { desc = "Next tab" }) +map("n", "", "tabprevious", { desc = "Prev tab" }) diff --git a/dot_config/nvim/lua/plugins/ui.lua b/dot_config/nvim/lua/plugins/ui.lua index 70c8e5b..5584239 100644 --- a/dot_config/nvim/lua/plugins/ui.lua +++ b/dot_config/nvim/lua/plugins/ui.lua @@ -9,10 +9,10 @@ return { }, keys = { -- Navigate - { "", function() require("smart-splits").move_cursor_left() end, mode = { "n", "t" }, desc = "Move to left split/pane" }, - { "", function() require("smart-splits").move_cursor_down() end, mode = { "n", "t" }, desc = "Move to lower split/pane" }, - { "", function() require("smart-splits").move_cursor_up() end, mode = { "n", "t" }, desc = "Move to upper split/pane" }, - { "", function() require("smart-splits").move_cursor_right() end, mode = { "n", "t" }, desc = "Move to right split/pane" }, + { "", function() require("smart-splits").move_cursor_left() end, mode = { "n", "t" }, desc = "Move to left split/pane" }, + { "", function() require("smart-splits").move_cursor_down() end, mode = { "n", "t" }, desc = "Move to lower split/pane" }, + { "", function() require("smart-splits").move_cursor_up() end, mode = { "n", "t" }, desc = "Move to upper split/pane" }, + { "", function() require("smart-splits").move_cursor_right() end, mode = { "n", "t" }, desc = "Move to right split/pane" }, -- Resize { "", function() require("smart-splits").resize_left() end, desc = "Resize left" }, { "", function() require("smart-splits").resize_down() end, desc = "Resize down" }, diff --git a/dot_config/tmux/tmux.conf b/dot_config/tmux/tmux.conf index 7d441f8..bda350e 100644 --- a/dot_config/tmux/tmux.conf +++ b/dot_config/tmux/tmux.conf @@ -24,10 +24,10 @@ set -g allow-rename off setw -g pane-border-status top #### PANE NAVIGATION (no prefix — smart-splits passthrough) #### -bind -n C-h select-pane -L -bind -n C-j select-pane -D -bind -n C-k select-pane -U -bind -n C-l select-pane -R +bind -n M-h select-pane -L +bind -n M-j select-pane -D +bind -n M-k select-pane -U +bind -n M-l select-pane -R #### PANE NAVIGATION (with prefix) #### bind h select-pane -L diff --git a/dot_profile.tmpl b/dot_profile.tmpl index 7907c36..3be6d65 100644 --- a/dot_profile.tmpl +++ b/dot_profile.tmpl @@ -11,6 +11,7 @@ export PATH="${PATH}:{{ .chezmoi.homeDir }}/.cargo/bin" export ZDOTDIR="{{ .chezmoi.homeDir }}/.config/zsh" export EDITOR="nvim" +export DIFFPROG="nvim -d" export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \ --highlight-line \