From be4bbf5123a1259ab4f28be00ec6c070384cff47 Mon Sep 17 00:00:00 2001 From: thek4n Date: Fri, 22 Mar 2024 23:44:33 +0300 Subject: [PATCH] tmux more comfy binds --- .../.config/nvim/lua/base/plugins/harpoon.lua | 8 +++--- home/user/.config/tmux/tmux.conf | 25 +++++++++++++------ home/user/.tmux/01.conf | 2 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/home/user/.config/nvim/lua/base/plugins/harpoon.lua b/home/user/.config/nvim/lua/base/plugins/harpoon.lua index 81cf19e..e2f2e75 100644 --- a/home/user/.config/nvim/lua/base/plugins/harpoon.lua +++ b/home/user/.config/nvim/lua/base/plugins/harpoon.lua @@ -21,10 +21,10 @@ return { {desc = "Open session manager UI"} ) - vim.keymap.set("n", "", function() harpoon:list():select(1) end) - vim.keymap.set("n", "", function() harpoon:list():select(2) end) - vim.keymap.set("n", "", function() harpoon:list():select(3) end) - vim.keymap.set("n", "", function() harpoon:list():select(4) end) + vim.keymap.set("n", "1", function() harpoon:list():select(1) end) + vim.keymap.set("n", "2", function() harpoon:list():select(2) end) + vim.keymap.set("n", "3", function() harpoon:list():select(3) end) + vim.keymap.set("n", "4", function() harpoon:list():select(4) end) -- Toggle previous & next buffers stored within Harpoon list vim.keymap.set("n", "", function() harpoon:list():prev() end) diff --git a/home/user/.config/tmux/tmux.conf b/home/user/.config/tmux/tmux.conf index b94a9cb..1e9875d 100644 --- a/home/user/.config/tmux/tmux.conf +++ b/home/user/.config/tmux/tmux.conf @@ -6,13 +6,25 @@ set -s exit-unattached off # pane navigation bind | split-window -h -c "#{pane_current_path}" bind \\ split-window -v -c "#{pane_current_path}" -bind -r C-h select-pane -L # move left -bind -r C-j select-pane -D # move down -bind -r C-k select-pane -U # move up -bind -r C-l select-pane -R # move right -bind -r C-n next-window -bind -r C-p previous-window +bind -n M-Enter split-window -h -c "#{pane_current_path}" +bind -n M-t new-window +bind -n M-h select-pane -L +bind -n M-l select-pane -R +bind -n M-j select-pane -D +bind -n M-k select-pane -U +bind -n C-M-h next-window +bind -n C-M-l previous-window + +bind -n M-1 select-window -t 1 +bind -n M-2 select-window -t 2 +bind -n M-3 select-window -t 3 +bind -n M-5 select-window -t 5 +bind -n M-6 select-window -t 6 +bind -n M-7 select-window -t 7 +bind -n M-8 select-window -t 8 +bind -n M-9 select-window -t 9 +bind -n M-0 select-window -t 10 set-option -ga terminal-overrides ",xterm-256color:Tc" @@ -42,7 +54,6 @@ set -g display-panes-time 4000 ## Increase show pane time set -g renumber-windows on ## Make windows auto renumber set -g lock-command vlock -## Reload tmux.conf: R bind C-r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..." ## Lock screen diff --git a/home/user/.tmux/01.conf b/home/user/.tmux/01.conf index 3bec98c..1eb9103 100644 --- a/home/user/.tmux/01.conf +++ b/home/user/.tmux/01.conf @@ -1,6 +1,6 @@ # vim: filetype=tmux SESSION=s01 -MAINW=main +MAINW=1 new-session -s ${SESSION} -A -n ${MAINW} -c "$WORKING_PROJECT" "$EDITOR" send-keys -t ${SESSION}:${MAINW} M-1 splitw -t ${SESSION}:${MAINW} -d -h -l 40% -c '#{pane_current_path}' \ No newline at end of file