Update Tmux and Nvim navigation.
This commit is contained in:
parent
e6f584e792
commit
5bfccdbcce
|
@ -16,7 +16,6 @@ require("key/gitsigns")
|
||||||
require("key/trouble")
|
require("key/trouble")
|
||||||
require("key/terminal")
|
require("key/terminal")
|
||||||
require("key/autocomplete")
|
require("key/autocomplete")
|
||||||
require("key/window")
|
|
||||||
require("key/telescope")
|
require("key/telescope")
|
||||||
require("key/common")
|
require("key/common")
|
||||||
require("key/todo")
|
require("key/todo")
|
||||||
|
|
|
@ -18,9 +18,14 @@ rekey_normal('<Leader>Q', '<cmd>BufferLineMovePrev<cr>')
|
||||||
rekey_normal('<Leader>x', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>')
|
rekey_normal('<Leader>x', '<cmd>bp<bar>sp<bar>bn<bar>bd<cr>')
|
||||||
|
|
||||||
-- splits.
|
-- splits.
|
||||||
rekey_normal('<Leader>|', '<cmd>vsplit<cr>')
|
rekey_normal('<Leader>\\', '<cmd>vsplit<cr>')
|
||||||
rekey_normal('<Leader>-', '<cmd>split<cr>')
|
rekey_normal('<Leader>-', '<cmd>split<cr>')
|
||||||
rekey_normal('<Leader>c', '<C-w>q')
|
rekey_normal('<Leader>=', '<C-w>=') -- equalize split sizes.
|
||||||
|
rekey_normal('<Leader>c', '<C-w>q') -- Close split.
|
||||||
|
rekey_normal('<Leader>j', '2<C-w>+')
|
||||||
|
rekey_normal('<Leader>k', '2<C-w>-')
|
||||||
|
rekey_normal('<Leader>l', '4<C-w>>')
|
||||||
|
rekey_normal('<Leader>h', '4<C-w><')
|
||||||
|
|
||||||
-- close all hidden buffers.
|
-- close all hidden buffers.
|
||||||
rekey_normal('<Leader>X', '<cmd>BDelete hidden<cr><C-l>')
|
rekey_normal('<Leader>X', '<cmd>BDelete hidden<cr><C-l>')
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
require('key/rekey')
|
|
||||||
|
|
||||||
rekey_normal('_', '2<C-w>+') -- increase split size vertically.
|
|
||||||
rekey_normal('-', '2<C-w>-') -- decrease split size vertically.
|
|
||||||
rekey_normal('|', '4<C-w>>') -- increase split size horizontally.
|
|
||||||
rekey_normal('\\', '4<C-w><') -- decrease split size horizontally.
|
|
||||||
rekey_normal('<Leader>=', '<C-w>=') -- equalize split sizes.
|
|
|
@ -7,8 +7,13 @@ bind-key C-t send-prefix
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
# remap split keys.
|
# remap split keys.
|
||||||
bind -n M-| split-window -h -c "#{pane_current_path}"
|
bind -n M-\\ split-window -h -c "#{pane_current_path}"
|
||||||
bind -n M-- split-window -v -c "#{pane_current_path}"
|
bind -n M-- split-window -v -c "#{pane_current_path}"
|
||||||
|
bind -n M-= select-layout tiled
|
||||||
|
bind -n M-h resize-pane -L 4
|
||||||
|
bind -n M-j resize-pane -D 2
|
||||||
|
bind -n M-k resize-pane -U 2
|
||||||
|
bind -n M-l resize-pane -R 4
|
||||||
unbind '"'
|
unbind '"'
|
||||||
unbind %
|
unbind %
|
||||||
|
|
||||||
|
@ -53,6 +58,8 @@ bind -n M-P paste-buffer
|
||||||
bind -T copy-mode-vi v send -X begin-selection
|
bind -T copy-mode-vi v send -X begin-selection
|
||||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||||
|
|
||||||
|
# Resize panes.
|
||||||
|
|
||||||
# Resize to smallest client.
|
# Resize to smallest client.
|
||||||
set -g window-size smallest
|
set -g window-size smallest
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ Key|Action
|
||||||
`Super+e`|Switch to the right workspace.
|
`Super+e`|Switch to the right workspace.
|
||||||
`Super+Q`|Move window to the left workspace.
|
`Super+Q`|Move window to the left workspace.
|
||||||
`Super+E`|Move window to the right workspace.
|
`Super+E`|Move window to the right workspace.
|
||||||
`Super+\|`|None.
|
|
||||||
`Super+-`|None.
|
|
||||||
`Super+w`|Toggle window maximize.
|
`Super+w`|Toggle window maximize.
|
||||||
`Super+s`|Minimize window.
|
`Super+s`|Minimize window.
|
||||||
`Super+a`|Snap window to the left.
|
`Super+a`|Snap window to the left.
|
||||||
|
@ -22,6 +20,13 @@ Key|Action
|
||||||
`Super+c`|Minimize all windows.
|
`Super+c`|Minimize all windows.
|
||||||
`Super+v`|Take a screenshot.
|
`Super+v`|Take a screenshot.
|
||||||
`Super+f`|Toggle window fullscreen.
|
`Super+f`|Toggle window fullscreen.
|
||||||
|
`Super+\\`|None.
|
||||||
|
`Super+-`|None.
|
||||||
|
`Super+=`|None.
|
||||||
|
`Super+h`|None.
|
||||||
|
`Super+j`|None.
|
||||||
|
`Super+k`|None.
|
||||||
|
`Super+l`|None.
|
||||||
|
|
||||||
## Tmux.
|
## Tmux.
|
||||||
|
|
||||||
|
@ -32,8 +37,6 @@ Key|Action
|
||||||
`Meta+e`|Switch to the right window.
|
`Meta+e`|Switch to the right window.
|
||||||
`Meta+Q`|Move window to the left.
|
`Meta+Q`|Move window to the left.
|
||||||
`Meta+E`|Move window to the right.
|
`Meta+E`|Move window to the right.
|
||||||
`Meta+\|`|Split vertically.
|
|
||||||
`Meta+-`|Split horizontally.
|
|
||||||
`Meta+w`|Switch to the above split.
|
`Meta+w`|Switch to the above split.
|
||||||
`Meta+s`|Switch to the below split.
|
`Meta+s`|Switch to the below split.
|
||||||
`Meta+a`|Switch to the left split.
|
`Meta+a`|Switch to the left split.
|
||||||
|
@ -43,6 +46,13 @@ Key|Action
|
||||||
`Meta+c`|Close split.
|
`Meta+c`|Close split.
|
||||||
`Meta+v`|Visual selection. `y` to copy.
|
`Meta+v`|Visual selection. `y` to copy.
|
||||||
`Meta+f`|None.
|
`Meta+f`|None.
|
||||||
|
`Meta+\\`|Split vertically.
|
||||||
|
`Meta+-`|Split horizontally.
|
||||||
|
`Meta+=`|Equalize splits.
|
||||||
|
`Meta+h`|Resize split to the left.
|
||||||
|
`Meta+j`|Resize split to the down.
|
||||||
|
`Meta+k`|Resize split to the up.
|
||||||
|
`Meta+l`|Resize split to the right.
|
||||||
|
|
||||||
## Nvim.
|
## Nvim.
|
||||||
|
|
||||||
|
@ -53,8 +63,6 @@ Key|Action
|
||||||
`Space+e`|Switch to the right buffer.
|
`Space+e`|Switch to the right buffer.
|
||||||
`Space+Q`|Move buffer to the left.
|
`Space+Q`|Move buffer to the left.
|
||||||
`Space+E`|Move buffer to the right.
|
`Space+E`|Move buffer to the right.
|
||||||
`Space+\|`|Split vertically.
|
|
||||||
`Space+-`|Split horizontally.
|
|
||||||
`Space+w`|Switch to the above split.
|
`Space+w`|Switch to the above split.
|
||||||
`Space+s`|Switch to the below split.
|
`Space+s`|Switch to the below split.
|
||||||
`Space+a`|Switch to the left split.
|
`Space+a`|Switch to the left split.
|
||||||
|
@ -64,5 +72,12 @@ Key|Action
|
||||||
`Space+c`|Close split.
|
`Space+c`|Close split.
|
||||||
`Space+v`|Visual selection (or just default `v`).
|
`Space+v`|Visual selection (or just default `v`).
|
||||||
`Space+f`|None.
|
`Space+f`|None.
|
||||||
|
`Space+\|`|Split vertically.
|
||||||
|
`Space+-`|Split horizontally.
|
||||||
|
`Space+=`|Equalize splits.
|
||||||
|
`Space+h`|Resize split to the left.
|
||||||
|
`Space+j`|Resize split to the down.
|
||||||
|
`Space+k`|Resize split to the up.
|
||||||
|
`Space+l`|Resize split to the right.
|
||||||
|
|
||||||
More info in [Nvim doc.](nvim.md)
|
More info in [Nvim doc.](nvim.md)
|
||||||
|
|
Reference in a new issue