Fix tmux config on mac
This commit is contained in:
@@ -38,6 +38,7 @@ in
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
visidata
|
visidata
|
||||||
|
codespelunker
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ in
|
|||||||
shortcut = "a";
|
shortcut = "a";
|
||||||
mouse = true;
|
mouse = true;
|
||||||
keyMode = "vi";
|
keyMode = "vi";
|
||||||
escapeTime = 0;
|
escapeTime = 10;
|
||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
tmuxp.enable = true;
|
tmuxp.enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@@ -22,16 +22,15 @@ in
|
|||||||
|
|
||||||
unbind S
|
unbind S
|
||||||
bind S command-prompt "switch -t %1"
|
bind S command-prompt "switch -t %1"
|
||||||
|
bind-key , command-prompt -p "rename-window:" "rename-window '%%'"
|
||||||
|
|
||||||
# Check if we are in vim
|
# Check if we are in vim
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
||||||
|
|
||||||
bind-key -n C-M-k if-shell "$is_vim" "send-keys C-M-k" "if -F \"#{pane_at_top}\" \"switch-client -p\" \"select-pane -U\""
|
bind-key -n C-M-h if-shell "$is_vim" { send-keys C-M-h } { if -F "#{pane_at_left}" "previous-window" "select-pane -L" }
|
||||||
bind-key -n C-M-j if-shell "$is_vim" "send-keys C-M-j" "if -F \"#{pane_at_bottom}\" \"switch-client -n\" \"select-pane -D\""
|
bind-key -n C-M-j if-shell "$is_vim" { send-keys C-M-j } { if -F "#{pane_at_bottom}" "switch-client -n" "select-pane -D" }
|
||||||
|
bind-key -n C-M-k if-shell "$is_vim" { send-keys C-M-k } { if -F "#{pane_at_top}" "switch-client -p" "select-pane -U" }
|
||||||
bind-key -n C-M-l if-shell "$is_vim" "send-keys C-M-l" "if -F \"#{pane_at_right}\" \"next-window\" \"select-pane -R\""
|
bind-key -n C-M-l if-shell "$is_vim" { send-keys C-M-l } { if -F "#{pane_at_right}" "next-window" "select-pane -R" }
|
||||||
bind-key -n C-M-h if-shell "$is_vim" "send-keys C-M-h" "if -F \"#{pane_at_left}\" \"previous-window\" \"select-pane -L\""
|
|
||||||
|
|
||||||
bind '"' split-window -c "#{pane_current_path}"
|
bind '"' split-window -c "#{pane_current_path}"
|
||||||
bind % split-window -h -c "#{pane_current_path}"
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ vim.api.nvim_create_autocmd('FileType', {
|
|||||||
-- pattern = 'go',
|
-- pattern = 'go',
|
||||||
-- callback = function()
|
-- callback = function()
|
||||||
-- require('dap-python').setup()
|
-- require('dap-python').setup()
|
||||||
-- require('dap-go').setup()
|
require('dap-go').setup()
|
||||||
|
|
||||||
-- vim.lsp.enable('ruff')
|
-- vim.lsp.enable('ruff')
|
||||||
-- vim.lsp.config('ty')
|
-- vim.lsp.config('ty')
|
||||||
|
|||||||
Reference in New Issue
Block a user