From 4077c2b72a34aa62e82f8c324b15752e46a1e515 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Tue, 11 Oct 2022 17:00:41 +0200 Subject: [PATCH] update some tmux and vim config --- files/nvim/.config/nvim/init.lua | 4 ++++ files/tmux/.tmux.conf | 14 ++++++++++---- files/vim/.vimrc | 8 ++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/files/nvim/.config/nvim/init.lua b/files/nvim/.config/nvim/init.lua index 75dc67e..8877825 100644 --- a/files/nvim/.config/nvim/init.lua +++ b/files/nvim/.config/nvim/init.lua @@ -1,6 +1,10 @@ -- Make sure to update packer with `:PackerInstall` and `:PackerSync` -- Treesitter with `:TSUpdate` -- LSP with `:LSPInstall`, log with `:LSPInfo` +-- +-- Rollback possible with packer.nvim +-- `:PackerSnapshot ` +-- Location: ~/.cache/nvim/packer.nvim -- This must be loaded first vim.cmd("set termguicolors") diff --git a/files/tmux/.tmux.conf b/files/tmux/.tmux.conf index d121de3..498b75a 100644 --- a/files/tmux/.tmux.conf +++ b/files/tmux/.tmux.conf @@ -19,7 +19,8 @@ bind-key -n M-l select-pane -R # pane / window modifications bind-key -n M-z resize-pane -Z # use `set automatic-rename on` to reset -bind-key -n M-, command-prompt "rename-window '%%'" +bind-key -n M-, command-prompt -p "Rename window:" "rename-window '%%'" +bind-key -n M-< set automatic-rename on # new windows bind-key -n M-c new-window -c "#{pane_current_path}" @@ -36,8 +37,13 @@ bind-key -n M-8 select-window -t 8 bind-key -n M-9 select-window -t 9 # swap panes -bind-key -n 'M-{' swap-pane -D -bind-key -n 'M-}' swap-pane -U +bind-key -n 'M-[' swap-pane -D +bind-key -n 'M-]' swap-pane -U + +# move panes to and from windows +bind-key -n 'M-t' command-prompt -p "Send pane to:" "join-pane -t :'%%'" +bind-key -n 'M-#' select-layout even-horizontal +bind-key -n 'M-$' select-layout even-vertical # resize panes bind-key -n 'M-Left' resize-pane -L @@ -59,7 +65,7 @@ set -g base-index 1 setw -g pane-base-index 1 # styling -set -g status-position top +set -g status-position bottom # using https://github.com/edkolev/tmuxline.vim # open vim, `:TmuxLineSnapshot`, save to ~/.tmux.theme diff --git a/files/vim/.vimrc b/files/vim/.vimrc index e9d64ad..bb21a3d 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -63,6 +63,14 @@ set laststatus=1 " 1: only if there are at least two windows set showtabline=1 " 1: only if there are at least two tab pages let g:airline_powerline_fonts = 1 +let g:tmuxline_preset = { + \'a' : ['#H'], + \'win' : ['#I', '#W'], + \'cwin' : ['#[fg=default,bold]#I', '#W'], + \'y' : ['%R'], + \'z' : ['#S']} +let g:tmuxline_status_justify = 'left' + " ============================== Indents and Whitespaces set list set listchars=tab:──\ ,extends:›,precedes:‹,nbsp:·,trail:· " show chars for whitespaces