From e1884a16855f8295bc2e31138b7569e13769b965 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 28 Jan 2015 22:19:14 +0100 Subject: [PATCH 1/8] add mouse support to tmux --- tmux.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tmux.conf b/tmux.conf index 3c43768..a2a230c 100644 --- a/tmux.conf +++ b/tmux.conf @@ -29,8 +29,11 @@ set-window-option -g automatic-rename off # listen to alerts from all windows set -g bell-action any -# sessions -# bind Y source-file ~/.tmux/work +# mouse support +set -g mode-mouse on +set -g mouse-resize-pane on +set -g mouse-select-pane on +set -g mouse-select-window on # This tmux statusbar config was created by tmuxline.vim # on Mon, 15 Dec 2014 From 4fce93f54582c2c8b4f7c014eac1239564738297 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 28 Jan 2015 22:21:37 +0100 Subject: [PATCH 2/8] remove uneeded cruft from vimrc --- vimrc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/vimrc b/vimrc index 1612e80..156b4aa 100644 --- a/vimrc +++ b/vimrc @@ -70,14 +70,6 @@ set fileencodings=utf-8 "" Unleash all VIM power set nocompatible -"" Fix backspace indent -set backspace=indent,eol,start - -"" allow plugins by file type -filetype on -filetype plugin on -filetype indent on - "" Tabs. May be overriten by autocmd rules set tabstop=4 set softtabstop=0 From d8b8bbc5c8cc0b8e1eda6f7d50a41dcf72ea8c79 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 28 Jan 2015 22:22:13 +0100 Subject: [PATCH 3/8] fix mouse issues with urxvt --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 156b4aa..d403527 100644 --- a/vimrc +++ b/vimrc @@ -99,6 +99,7 @@ set showcmd "" Mouse set mouse=a +set ttymouse=urxvt " " Visual Settings From 928723d392bbbc6e046e6bbe9ae7ff4701a8c61e Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 28 Jan 2015 22:22:35 +0100 Subject: [PATCH 4/8] add Gundo --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index d403527..20f012b 100644 --- a/vimrc +++ b/vimrc @@ -27,6 +27,8 @@ NeoBundle 'surround.vim' NeoBundle 'SirVer/ultisnips' NeoBundle 'honza/vim-snippets' +NeoBundle 'sjl/gundo.vim' + NeoBundle 'editorconfig/editorconfig-vim' NeoBundle 'sheerun/vim-polyglot' From 747e3c59f00c8d27d17b09130387cfdb1d4cc305 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 28 Jan 2015 22:23:01 +0100 Subject: [PATCH 5/8] turn on spell checker on markdown files --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index 20f012b..b6dfc0e 100644 --- a/vimrc +++ b/vimrc @@ -294,6 +294,9 @@ set autoread au BufNewFile,BufRead *.txt set filetype=human au FileType human,mail,tex set wrap wm=2 textwidth=78 nocindent spell +"" Markdown +au FileType markdown set spell + "" Python au FileType python set noexpandtab From 15d9a0dd3b85013672e60bc389b39f56e89ba72e Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 28 Jan 2015 22:24:07 +0100 Subject: [PATCH 6/8] add tmux to zsh plugins --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 8232ef5..d2d9f54 100644 --- a/zshrc +++ b/zshrc @@ -2,7 +2,7 @@ export ZSH=$HOME/.oh-my-zsh ZSH_THEME="pygmalion" -plugins=(bower gitfast git-extras node npm pass screen vi-mode) +plugins=(bower gitfast git-extras node npm pass screen vi-mode tmux) case $(hostname) in t430s-arch|pi) From d9704161a56f486e851c1822ff618b1181ffb9c1 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Fri, 30 Jan 2015 00:37:18 +0100 Subject: [PATCH 7/8] enable hjkl between splits --- vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vimrc b/vimrc index b6dfc0e..10ded67 100644 --- a/vimrc +++ b/vimrc @@ -40,6 +40,8 @@ NeoBundle 'airblade/vim-gitgutter' NeoBundle 'rking/ag.vim' +NeoBundle 'christoomey/vim-tmux-navigator' + NeoBundle 'vim-airline' NeoBundle 'chriskempson/base16-vim' @@ -174,6 +176,14 @@ nmap gy ggVGy nnoremap j gj nnoremap k gk +" Easier split navigation + +" Use ctrl-[hjkl] to select the active split! +nmap :wincmd k +nmap :wincmd j +nmap :wincmd h +nmap :wincmd l + "" fast window switching map , w From f6bee01850b5d6b561829090e8532b835bb65b32 Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Fri, 30 Jan 2015 00:37:40 +0100 Subject: [PATCH 8/8] enable hjkl between panes --- tmux.conf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tmux.conf b/tmux.conf index a2a230c..4cce47f 100644 --- a/tmux.conf +++ b/tmux.conf @@ -17,6 +17,29 @@ unbind C-b set -g prefix C-a bind C-a send-prefix +# splitting panes +bind v split-window -h +bind s split-window -v + +# moving between panes +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Pane resizing +bind -r H resize-pane -L 5 +bind -r J resize-pane -D 5 +bind -r K resize-pane -U 5 +bind -r L resize-pane -R 5 + +# Smart pane switching with awareness of vim splits +bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L" +bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D" +bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U" +bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R" +bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l" + # status bar config set -g status-left "#h:[#S]" set -g status-left-length 50