dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 673e99bff33716b547688c531c9e6c33e9dd925b
parent 460efc94685077034f32a038f043c971996fad79
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Mon, 15 Jan 2018 06:35:40 -0500

Vimrc: Handle Tmux statusline in Goyo.

Diffstat:
M.vim/vimrc | 16+++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/.vim/vimrc b/.vim/vimrc @@ -64,6 +64,16 @@ endif " }}} " Helper functions {{{ +function! MyTmuxStatusLine(action) + if exists('$TMUX') + if a:action == 'off' + execute 'silent !tmux set -s status off' | redraw! + else + execute 'silent !tmux set -s status on' | redraw! + endif + endif +endfunction + function! MyFileEncoding() if &fileencoding != '' return '['.&fileencoding.']' @@ -279,8 +289,8 @@ augroup myvimrc autocmd BufWritePost *imrc so % | call MyItalicize() endif autocmd VimResized * wincmd = | call MyDiffOpt() - autocmd User GoyoEnter Limelight - autocmd User GoyoLeave Limelight! + autocmd User GoyoEnter Limelight | execute MyTmuxStatusLine('off') + autocmd User GoyoLeave Limelight! | execute MyTmuxStatusLine('') autocmd QuickFixCmdPost [^l]* nested cwindow autocmd QuickFixCmdPost l* nested lwindow autocmd QuickFixCmdPre [^l]* nested silent! cclose @@ -320,7 +330,7 @@ endif if has('win32') || has('win64') nnoremap <Leader>o :execute 'silent ! start '.expand('<cWORD>')<CR> else - nnoremap <Leader>o :execute 'silent !my-start ' + nnoremap <Leader>o :execute 'silent !my-open ' \ .expand(shellescape('<cWORD>')) \| redraw!<CR> endif nnoremap <Leader>c :silent! execute 'cclose' \|