[neovim] cleaned up duplicate of tmux-navigation plugin

[tmux] added keymaps for copy mode
This commit is contained in:
quak
2025-01-05 23:27:59 +01:00
parent 49e23e788d
commit 19ff9a308d
2 changed files with 75 additions and 74 deletions

View File

@@ -1,62 +1,58 @@
-- Standalone plugins with less than 10 lines of config go here
return {
{
-- tmux & split window navigation
'christoomey/vim-tmux-navigator',
},
{
-- autoclose tags
'windwp/nvim-ts-autotag',
"windwp/nvim-ts-autotag",
},
{
-- detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
"tpope/vim-sleuth",
},
{
-- Powerful Git integration for Vim
'tpope/vim-fugitive',
"tpope/vim-fugitive",
},
{
-- GitHub integration for vim-fugitive
'tpope/vim-rhubarb',
"tpope/vim-rhubarb",
},
{
-- Hints keybinds
'folke/which-key.nvim',
"folke/which-key.nvim",
opts = {
-- win = {
-- border = {
-- { '┌', 'FloatBorder' },
-- { '─', 'FloatBorder' },
-- { '┐', 'FloatBorder' },
-- { '│', 'FloatBorder' },
-- { '┘', 'FloatBorder' },
-- { '─', 'FloatBorder' },
-- { '└', 'FloatBorder' },
-- { '│', 'FloatBorder' },
-- },
-- },
win = {
border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
},
},
},
},
{
-- Autoclose parentheses, brackets, quotes, etc.
'windwp/nvim-autopairs',
event = 'InsertEnter',
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
opts = {},
},
{
-- Highlight todo, notes, etc in comments
'folke/todo-comments.nvim',
event = 'VimEnter',
dependencies = { 'nvim-lua/plenary.nvim' },
"folke/todo-comments.nvim",
event = "VimEnter",
dependencies = { "nvim-lua/plenary.nvim" },
opts = { signs = false },
},
{
-- high-performance color highlighter
'norcalli/nvim-colorizer.lua',
"norcalli/nvim-colorizer.lua",
config = function()
require('colorizer').setup()
require("colorizer").setup()
end,
},
}

View File

@@ -3,15 +3,20 @@ unbind C-b
set-option -g prefix C-Space
# general keybindings
bind r source-file ~/.config/tmux/tmux.conf \; display-message "config reloaded"
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "config reloaded"
# navigation and modes
set-window-option -g mode-keys vi
bind-key -n M-c copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
# window navigation
bind -n M-Left previous-window
bind -n M-Right next-window
bind-key -n M-Left previous-window
bind-key -n M-Right next-window
bind-key -n M-S-Left swap-window -t -1 -d
bind-key -n M-S-Right swap-window -t +1 -d
#bind-key -n M-S-Left move-window -b -s +0 -t -1
#bind-key -n M-S-Right move-window -a -s +0 -t +1
# pane navigation
bind -n M-j swap-pane -D
@@ -38,19 +43,19 @@ bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
# keymaps for working with split windows
bind v split-pane -v -c "#{pane_current_path}"
bind h split-pane -h -c "#{pane_current_path}"
bind b break-pane
bind-key v split-pane -v -c "#{pane_current_path}"
bind-key h split-pane -h -c "#{pane_current_path}"
bind-key b break-pane
unbind t
bind t command-prompt -p "move pane to window:" "join-pane -t '%%'"
bind-key t command-prompt -p "move pane to window:" "join-pane -t '%%'"
bind -n M-F1 select-layout even-horizontal
bind -n M-F2 select-layout main-vertical
bind -n M-F3 select-layout tiled
bind-key -n M-F1 select-layout even-horizontal
bind-key -n M-F2 select-layout main-vertical
bind-key -n M-F3 select-layout tiled
unbind x
bind x kill-pane -t +0
bind-key x kill-pane -t +0
# detach current session and close terminal
bind k run "tmux detach -P"
bind-key k run "tmux detach -P"