Update .tmux.conf
Update .config/nvim/lazy-lock.json Update .config/nvim/lua/config/20_keymaps.lua
This commit is contained in:
parent
9d8708a6bc
commit
c776ff725f
3 changed files with 25 additions and 23 deletions
|
|
@ -3,24 +3,34 @@ unbind Left # unbind default pane move
|
|||
unbind Right # "
|
||||
unbind Up # "
|
||||
unbind Down # "
|
||||
unbind -
|
||||
unbind \;
|
||||
bind-key ` send-prefix # bind backtick as prefix
|
||||
bind-key - split-window # split
|
||||
bind-key \; split-window -h # horizontal split
|
||||
bind-key r source-file ~/.tmux.conf \; display-message "reloaded tmux config"
|
||||
bind-key c command-prompt -p "window name:" "new-window; rename-window '%%'"
|
||||
bind-key -n C-f display-popup -E "tmux-sessionizer"
|
||||
bind-key -n C-Left previous-window # window back
|
||||
bind-key -n C-Right next-window # window forward
|
||||
bind-key -n C-Up switch-client -p # session back
|
||||
bind-key -n C-Down switch-client -n # session forward
|
||||
bind-key -n M-Left select-pane -L # pane left
|
||||
bind-key -n M-Right select-pane -R # pane right
|
||||
bind-key -n M-Up select-pane -U # pane up
|
||||
bind-key -n M-Down select-pane -D # pane down
|
||||
bind-key C-f display-popup -E "tmux-sessionizer"
|
||||
bind-key C-q command-prompt -p find-session 'switch-client -t %%'
|
||||
bind-key Left previous-window # window back
|
||||
bind-key Right next-window # window forward
|
||||
bind-key Up switch-client -p # session back
|
||||
bind-key Down switch-client -n # session forward
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
|
||||
bind-key -n M-Left if-shell "$is_vim" 'send-keys M-Left' 'select-pane -L'
|
||||
bind-key -n M-Right if-shell "$is_vim" 'send-keys M-Right' 'select-pane -R'
|
||||
bind-key -n M-Up if-shell "$is_vim" 'send-keys M-Up' 'select-pane -U'
|
||||
bind-key -n M-Down if-shell "$is_vim" 'send-keys M-Down' 'select-pane -D'
|
||||
bind-key -n M-C-Left if-shell "$is_vim" 'send-keys M-C-Left' 'resize-pane -L 5'
|
||||
bind-key -n M-C-Right if-shell "$is_vim" 'send-keys M-C-Right' 'resize-pane -R 5'
|
||||
bind-key -n M-C-Up if-shell "$is_vim" 'send-keys M-C-Up' 'resize-pane -U 3'
|
||||
bind-key -n M-C-Down if-shell "$is_vim" 'send-keys M-C-Down' 'resize-pane -D 3'
|
||||
bind-key -n M-S-Left if-shell "$is_vim" 'send-keys M-S-Left' 'swap-pane -s "{left-of}"'
|
||||
bind-key -n M-S-Right if-shell "$is_vim" 'send-keys M-S-Right' 'swap-pane -s "{right-of}"'
|
||||
bind-key -n M-S-Up if-shell "$is_vim" 'send-keys M-S-Up' 'swap-pane -s "{up-of}"'
|
||||
bind-key -n M-S-Down if-shell "$is_vim" 'send-keys M-S-Down' 'swap-pane -s "{down-of}"'
|
||||
bind-key -n M-z resize-pane -Z # pane zoom
|
||||
bind-key -n M-w confirm-before -p "are you sure you want to kill #P?" kill-pane
|
||||
bind-key -n M-C-Left resize-pane -L 5
|
||||
bind-key -n M-C-Right resize-pane -R 5
|
||||
bind-key -n M-C-Up resize-pane -U 5
|
||||
bind-key -n M-C-Down resize-pane -D 5
|
||||
set-option -g prefix ` # "
|
||||
set-option -g default-terminal "$TERM" # 256-colors
|
||||
set-option -ag terminal-overrides ",$TERM:Tc" # "
|
||||
|
|
@ -36,7 +46,7 @@ set-option -g renumber-windows on # renumber windows when on
|
|||
set-option -g base-index 1 # start window numbering at 1
|
||||
set-w -g pane-base-index 1 # start pane numbering at 1
|
||||
set-option -g allow-rename off # don't rename windows automatically
|
||||
set-option -g mouse on # mouse control
|
||||
set-option -g mouse off # mouse control
|
||||
set-option -g status-style bg=default # status styling
|
||||
set-option -g status-left-length 40 # max allowed length
|
||||
set-option -g status-justify absolute-centre # windows alignment
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
"img-clip.nvim": { "branch": "main", "commit": "e7e29f0d07110405adecd576b602306a7edd507a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"mini.diff": { "branch": "main", "commit": "98fc732d5835eb7b6539f43534399b07b17f4e28" },
|
||||
|
|
@ -28,6 +27,7 @@
|
|||
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "10126effbafb74541b69219711dfb2c631e7ebf8" },
|
||||
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
|
|
|
|||
|
|
@ -17,13 +17,5 @@ nmap_leader('ar', '<Cmd>lua vim.lsp.buf.rename()<CR>', 'lsp rename')
|
|||
nmap_leader('fi', '<Cmd>lua vim.lsp.buf.implementation()<CR>', 'lsp find implementation')
|
||||
nmap_leader('fr', '<Cmd>lua vim.lsp.buf.references()<CR>', 'lsp find references')
|
||||
|
||||
for i = 1, 6 do
|
||||
nmap_leader(i, i .. "<c-w>w", "move to " .. i)
|
||||
end
|
||||
nmap_leader(';', '<Cmd>vsplit<CR>', 'vsplit')
|
||||
nmap_leader('-', '<Cmd>split<CR>', 'hsplit')
|
||||
|
||||
nmap_leader('j', '<Cmd>resize +10<CR>', 'bigger height')
|
||||
nmap_leader('k', '<Cmd>resize -10<CR>', 'smaller height')
|
||||
nmap_leader('l', '<Cmd>vertical resize +20<CR>', 'bigger width')
|
||||
nmap_leader('h', '<Cmd>vertical resize -20<CR>', 'smaller width')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue