From a43217df307937b5a1b8881146675b66c00f116b Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Fri, 20 Jan 2017 00:01:32 +0100 Subject: [PATCH] Add tmux-open, update tmux e command Signed-off-by: Tomas Slusny --- .gitmodules | 3 +++ README.md | 7 ++++--- dotfiles/tmux.conf | 9 +++++---- lib/tmux/tmux-open | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) create mode 160000 lib/tmux/tmux-open diff --git a/.gitmodules b/.gitmodules index 0639c0cd..ba3eba64 100644 --- a/.gitmodules +++ b/.gitmodules @@ -88,3 +88,6 @@ [submodule "lib/vim/vim-gutentags"] path = lib/vim/vim-gutentags url = https://github.com/ludovicchabant/vim-gutentags +[submodule "lib/tmux/tmux-open"] + path = lib/tmux/tmux-open + url = https://github.com/tmux-plugins/tmux-open diff --git a/README.md b/README.md index 5d41ac07..08215b68 100644 --- a/README.md +++ b/README.md @@ -153,11 +153,12 @@ To see all helper commands, run `dottool --help`. * [vim-wiki](https://github.com/vimwiki/vimwiki): Personal Wiki for Vim ### Tmux - * [tmux-sensible](https://github.com/tmux-plugins/tmux-sensible): basic tmux settings everyone can agree on - * [tmux-yank](https://github.com/tmux-plugins/tmux-yank): Plugin for copying to system clipboard + * [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum): Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on. * [tmux-copycat](https://github.com/tmux-plugins/tmux-copycat): Enhances tmux search + * [tmux-open](https://github.com/tmux-plugins/tmux-open): Tmux key bindings for quick opening of a highlighted file or url * [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Persists tmux environment across system restarts - * [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum): Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on. + * [tmux-sensible](https://github.com/tmux-plugins/tmux-sensible): basic tmux settings everyone can agree on + * [tmux-yank](https://github.com/tmux-plugins/tmux-yank): Plugin for copying to system clipboard * [vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator): Seamless navigation between tmux panes and vim splits ## Thanks to.. diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf index b711489b..c511d645 100644 --- a/dotfiles/tmux.conf +++ b/dotfiles/tmux.conf @@ -47,8 +47,8 @@ # Clear screen fix bind C-l send-keys 'C-l' - # Pipe entire current buffer to vim - bind e run-shell 'tmux capture-pane -S - && tmux split-window -v "tmux show-buffer | view - +$ +\"set clipboard=unnamed\""' + # Pipe entire current buffer to vim and load copied text to tmux buffer + bind e run-shell 'tmux capture-pane -S - && tmux split-window -v "tmux show-buffer | sed \'/^\s*$/d\' | reattach-to-user-namespace view - +$ +\"set clipboard=unnamed\"; reattach-to-user-namespace pbpaste | tmux load-buffer -"' # }}} @@ -104,16 +104,17 @@ # Plugins {{{ run-shell "$DOTHOME/lib/tmux/tmux-sensible/sensible.tmux" + run-shell "$DOTHOME/lib/tmux/vim-tmux-navigator/vim-tmux-navigator.tmux" run-shell "$DOTHOME/lib/tmux/tmux-yank/yank.tmux" run-shell "$DOTHOME/lib/tmux/tmux-copycat/copycat.tmux" - run-shell "$DOTHOME/lib/tmux/tmux-resurrect/resurrect.tmux" + run-shell "$DOTHOME/lib/tmux/tmux-open/open.tmux" set -g @resurrect-strategy-vim 'session' set -g @resurrect-strategy-nvim 'session' set -g @resurrect-capture-pane-contents 'on' + run-shell "$DOTHOME/lib/tmux/tmux-resurrect/resurrect.tmux" set -g @continuum-restore 'on' set -g @continuum-save-interval '10' run-shell "$DOTHOME/lib/tmux/tmux-continuum/continuum.tmux" - run-shell "$DOTHOME/lib/tmux/vim-tmux-navigator/vim-tmux-navigator.tmux" # }}} diff --git a/lib/tmux/tmux-open b/lib/tmux/tmux-open new file mode 160000 index 00000000..ae3e22bf --- /dev/null +++ b/lib/tmux/tmux-open @@ -0,0 +1 @@ +Subproject commit ae3e22bf2b04f43eaf1cefd2c9ac9120a0c8159c