Tmux buffer handling

This commit is contained in:
Daniel Flanagan 2019-08-23 09:45:26 -05:00
parent 9f9dbac238
commit 4bcabd4bd8
4 changed files with 13 additions and 1 deletions

View File

@ -101,7 +101,7 @@ Plug 'editorconfig/editorconfig-vim' " loads project-
Plug 'sheerun/vim-polyglot' " vim plugin loader for many languages
Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']} " moonscript language
Plug 'OmniSharp/omnisharp-vim', {'for': ['cs']} " C# language
Plug 'junegunn/vim-peekaboo' " preview registers
" Plug 'junegunn/vim-peekaboo' " preview registers
Plug 'scrooloose/nerdtree' " file browser
Plug 'tpope/vim-eunuch' " unix helper commands
Plug 'sheerun/vim-polyglot' " vim plugin loader for many languages

8
scripts/bin/tmux-save-buffer Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
sess="$1"; shift
d="$(date +%Y-%m-%d_%H-%M-%S)"
f="$HOME/$d.tmux-buffer.log"
touch "$f"
chmod 600 "$f"
tmux capture-pane -pS -1000000000 > "$f"

View File

@ -30,6 +30,7 @@ alias cdd="cd \"\$DOTFILES_PATH\"" # go to dotfiles
alias cdc="cd \"\$XDG_CONFIG_HOME\"" # go to
alias cdn="cd \"\$NOTES_PATH\""
alias cdl="cd \"\$NICE_HOME/dl\""
alias cdg="cd \"\$NICE_HOME/games\""
# quick parent-directory aliases
alias ..="cd .."

View File

@ -35,6 +35,7 @@ bind-key h split-window
# show tmux status bar by default with (C-s, H) to toggle it
set -g status on
set-option -g history-limit 1024000
bind-key H set -s status
# simple session switching
@ -58,6 +59,8 @@ set -g status-right "#[fg=colour4]#W#[fg=default]#[bg=default] #H"
set -g status-left-length 200
set -g status-left "#[fg=colour7]#(~/.config/dotfiles/scripts/bin/tmux-session-list #S)"
bind-key O run-shell "~/.config/dotfiles/scripts/bin/tmux-save-buffer #S" \; display-message "Saved buffer to ~/<date>.tmux-buffer.log"
# pane split line colors
set -g pane-active-border-style bg=black,fg=black
set -g pane-border-style fg=black