[neovim] cleaned up duplicate of tmux-navigation plugin
[tmux] added keymaps for copy mode
This commit is contained in:
@@ -1,62 +1,58 @@
|
|||||||
-- Standalone plugins with less than 10 lines of config go here
|
-- Standalone plugins with less than 10 lines of config go here
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
-- tmux & split window navigation
|
-- autoclose tags
|
||||||
'christoomey/vim-tmux-navigator',
|
"windwp/nvim-ts-autotag",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
-- autoclose tags
|
-- detect tabstop and shiftwidth automatically
|
||||||
'windwp/nvim-ts-autotag',
|
"tpope/vim-sleuth",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
-- detect tabstop and shiftwidth automatically
|
-- Powerful Git integration for Vim
|
||||||
'tpope/vim-sleuth',
|
"tpope/vim-fugitive",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
-- Powerful Git integration for Vim
|
-- GitHub integration for vim-fugitive
|
||||||
'tpope/vim-fugitive',
|
"tpope/vim-rhubarb",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
-- GitHub integration for vim-fugitive
|
-- Hints keybinds
|
||||||
'tpope/vim-rhubarb',
|
"folke/which-key.nvim",
|
||||||
},
|
opts = {
|
||||||
{
|
win = {
|
||||||
-- Hints keybinds
|
border = {
|
||||||
'folke/which-key.nvim',
|
{ "┌", "FloatBorder" },
|
||||||
opts = {
|
{ "─", "FloatBorder" },
|
||||||
-- win = {
|
{ "┐", "FloatBorder" },
|
||||||
-- border = {
|
{ "│", "FloatBorder" },
|
||||||
-- { '┌', 'FloatBorder' },
|
{ "┘", "FloatBorder" },
|
||||||
-- { '─', 'FloatBorder' },
|
{ "─", "FloatBorder" },
|
||||||
-- { '┐', 'FloatBorder' },
|
{ "└", "FloatBorder" },
|
||||||
-- { '│', 'FloatBorder' },
|
{ "│", "FloatBorder" },
|
||||||
-- { '┘', 'FloatBorder' },
|
},
|
||||||
-- { '─', 'FloatBorder' },
|
},
|
||||||
-- { '└', 'FloatBorder' },
|
},
|
||||||
-- { '│', 'FloatBorder' },
|
},
|
||||||
-- },
|
{
|
||||||
-- },
|
-- Autoclose parentheses, brackets, quotes, etc.
|
||||||
},
|
"windwp/nvim-autopairs",
|
||||||
},
|
event = "InsertEnter",
|
||||||
{
|
config = true,
|
||||||
-- Autoclose parentheses, brackets, quotes, etc.
|
opts = {},
|
||||||
'windwp/nvim-autopairs',
|
},
|
||||||
event = 'InsertEnter',
|
{
|
||||||
config = true,
|
-- Highlight todo, notes, etc in comments
|
||||||
opts = {},
|
"folke/todo-comments.nvim",
|
||||||
},
|
event = "VimEnter",
|
||||||
{
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
-- Highlight todo, notes, etc in comments
|
opts = { signs = false },
|
||||||
'folke/todo-comments.nvim',
|
},
|
||||||
event = 'VimEnter',
|
{
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
-- high-performance color highlighter
|
||||||
opts = { signs = false },
|
"norcalli/nvim-colorizer.lua",
|
||||||
},
|
config = function()
|
||||||
{
|
require("colorizer").setup()
|
||||||
-- high-performance color highlighter
|
end,
|
||||||
'norcalli/nvim-colorizer.lua',
|
},
|
||||||
config = function()
|
}
|
||||||
require('colorizer').setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,15 +3,20 @@ unbind C-b
|
|||||||
set-option -g prefix C-Space
|
set-option -g prefix C-Space
|
||||||
|
|
||||||
# general keybindings
|
# 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
|
# window navigation
|
||||||
bind -n M-Left previous-window
|
bind-key -n M-Left previous-window
|
||||||
bind -n M-Right next-window
|
bind-key -n M-Right next-window
|
||||||
bind-key -n M-S-Left swap-window -t -1 -d
|
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-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
|
# pane navigation
|
||||||
bind -n M-j swap-pane -D
|
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
|
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
||||||
|
|
||||||
# keymaps for working with split windows
|
# keymaps for working with split windows
|
||||||
bind v split-pane -v -c "#{pane_current_path}"
|
bind-key v split-pane -v -c "#{pane_current_path}"
|
||||||
bind h split-pane -h -c "#{pane_current_path}"
|
bind-key h split-pane -h -c "#{pane_current_path}"
|
||||||
bind b break-pane
|
bind-key b break-pane
|
||||||
unbind t
|
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-key -n M-F1 select-layout even-horizontal
|
||||||
bind -n M-F2 select-layout main-vertical
|
bind-key -n M-F2 select-layout main-vertical
|
||||||
bind -n M-F3 select-layout tiled
|
bind-key -n M-F3 select-layout tiled
|
||||||
|
|
||||||
unbind x
|
unbind x
|
||||||
bind x kill-pane -t +0
|
bind-key x kill-pane -t +0
|
||||||
|
|
||||||
# detach current session and close terminal
|
# detach current session and close terminal
|
||||||
bind k run "tmux detach -P"
|
bind-key k run "tmux detach -P"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user