Skip to content

Commit

Permalink
vim + tmux window titles fail
Browse files Browse the repository at this point in the history
  • Loading branch information
finbarrocallaghan committed Mar 13, 2015
1 parent 2576f8f commit ac8594b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
editor = vim
excludesfile = ~/.gitignore
pager = "less -RXF"
askpass = git-gui --ask-pass
[color]
diff = auto
branch = auto
Expand Down
13 changes: 6 additions & 7 deletions tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ set -g bell-action any
set -g display-panes-time 500
set -g set-titles on
set -g aggressive-resize on
set -g set-titles-string "tmux.#I.#W"
#set -g set-titles-string "#T #I #W" #T - host, #I window number, #W - window #title?
set -g set-titles-string ""
set-window-option -g automatic-rename on

set -g display-time 2000


Expand Down Expand Up @@ -77,12 +80,10 @@ bind -r C-j select-pane -D
bind -r C-k select-pane -U
bind -r C-l select-pane -R

#bind C-c run "tmux save-buffer - | xclip -i -selection clipboard"

#copy tmux paste buffer to clipboard
#bind C-c run "tmux show-buffer | xclip -i -selection clipboard"
bind C-c run "tmux show-buffer | xclip -i -selection clipboard"
#copy clipboard to tmux paste buffer and paste tmux paste buffer
#bind C-v run "tmux set-buffer --- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
bind C-v run "tmux set-buffer --- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"

bind-key 'a' last-window

Expand Down Expand Up @@ -127,6 +128,4 @@ bind-key M-5 select-layout tiled
bind-key M-6 select-layout 3a34,279x79,0,0[279x59,0,0,279x19,0,60]




bind r source-file ~/.tmux.conf
17 changes: 12 additions & 5 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
set nocompatible

"color ----------------------------------------------------------------------{{{
"
"set

colorscheme candy
set background=dark
set t_Co=256

function! ResetTitle()
exec "set title t_ts='' t_fs=''"
exec ":!echo -e '\033kzsh\033\\'\<CR>"
endfunction

if $TERM=='screen-256color'
autocmd BufEnter * let &titlestring = "[".expand("%:t") ."]"
exe "set title t_ts=\<ESC>k t_fs=\<ESC>\\"
let &titleold = "zsh"
au VimLeave * silent call ResetTitle()
endif

"}}}
Expand Down Expand Up @@ -151,12 +159,11 @@ nmap <silent> <leader>s :set spell!<CR>
nmap <silent> <leader>ev :e ~/.vimrc<CR>
nmap <silent> <leader>v :so ~/.vimrc<CR>
nmap <silent> <leader>p :set invpaste<CR>:set paste?<CR>
nmap <silent> <leader>nu :set nu!<CR>
nmap <silent> <leader>ul :t.\|s/./=/g\|set nohls<cr>
nmap <silent> <leader>n :set nu!<CR>
nmap <silent> <leader>bd :bd<CR>:bn<CR>
noremap <leader>c a<C-X><C-S>
nmap <leader>c a<C-X><C-S>
nmap <silent> <leader>l :!tmux send-keys -t bottom 'pdflatex thesis' C-m<CR>
"}}}

Expand Down
4 changes: 4 additions & 0 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ alias tl='tmux ls'
alias ta='tmux attach -t'
alias th='teamocil --here'

function tms {
args=$@
tmux send-keys -t bottom "$args" C-m
}

#-------
#general
Expand Down

0 comments on commit ac8594b

Please sign in to comment.