vim-tmux-navigator(needs some work on bindings)
This commit is contained in:
parent
5c88830f93
commit
e91d840f90
|
|
@ -17,6 +17,13 @@ M.general = {
|
||||||
["n"] = {"nzz", "find next"},
|
["n"] = {"nzz", "find next"},
|
||||||
["N"] = {"Nzz", "find prev"},
|
["N"] = {"Nzz", "find prev"},
|
||||||
|
|
||||||
|
-- navigation
|
||||||
|
["<c-h>"] = {"<cmd> TmuxNavigateLeft<cr>", "window left" },
|
||||||
|
["<c-j>"] = {"<cmd> TmuxNavigateDown<cr>", "window down" },
|
||||||
|
["<c-k>"] = {"<cmd> TmuxNavigateUp<cr>", "window up" },
|
||||||
|
["<c-l>"] = {"<cmd> TmuxNavigateRight<cr>", "window right" },
|
||||||
|
["<c-\\>"] = {"<cmd> TmuxNavigatePrevious<cr>", "window previous" },
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,17 @@ local overrides = require "custom.configs.overrides"
|
||||||
---@type NvPluginSpec[]
|
---@type NvPluginSpec[]
|
||||||
local plugins = {
|
local plugins = {
|
||||||
|
|
||||||
|
{
|
||||||
|
"christoomey/vim-tmux-navigator",
|
||||||
|
cmd = {
|
||||||
|
"TmuxNavigateLeft",
|
||||||
|
"TmuxNavigateDown",
|
||||||
|
"TmuxNavigateUp",
|
||||||
|
"TmuxNavigateRight",
|
||||||
|
"TmuxNavigatePrevious",
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
-- Override plugin definition options
|
-- Override plugin definition options
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
# plugins
|
||||||
|
set -g @plugin 'alexghergh/nvim-tmux-navigation'
|
||||||
|
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
|
||||||
# remap prefix from 'C-b' to 'C-a'
|
# remap prefix from 'C-b' to 'C-a'
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set-option -g prefix C-a
|
set-option -g prefix C-a
|
||||||
|
|
@ -28,3 +34,18 @@ bind h attach-session -t . -c "#{pane_current_path}"
|
||||||
|
|
||||||
# status bar
|
# status bar
|
||||||
set -g status-right '%H:%m %d-%b-%y '
|
set -g status-right '%H:%m %d-%b-%y '
|
||||||
|
|
||||||
|
# Start windows and panes at 1, not 0
|
||||||
|
set -g base-index 1
|
||||||
|
set -g pane-base-index 1
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
|
# navigation
|
||||||
|
bind-key 'j' select-pane -D
|
||||||
|
bind-key 'k' select-pane -U
|
||||||
|
bind-key 'l' select-pane -R
|
||||||
|
bind-key 'h' select-pane -L
|
||||||
|
|
||||||
|
bind -n S-Left previous-window
|
||||||
|
bind -n S-Right next-window
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue