dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 2fb9d5a9879ffd0874ba16c2aaa4d283ca5b047e
parent b80823c6deaaab032bab50f02885200612b5a16d
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Wed,  1 Nov 2017 14:53:38 -0400

fix color scheme issues when exiting Goyo

Diffstat:
Mlinks/.vim/keybinds.vim | 1+
Mlinks/.vim/plugins.vim | 41++++++++++++++++++++++-------------------
2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/links/.vim/keybinds.vim b/links/.vim/keybinds.vim @@ -16,6 +16,7 @@ nmap <leader>R :source $MYVIMRC<CR> " toggle distraction-free editing nmap <leader>y :set nolist<CR>:Goyo<CR> nmap <leader>Y :set nolist<CR>:Goyo!<CR>:source $MYVIMRC<CR> +"nmap <leader>Y :set nolist<CR>:Goyo!<CR>:source $MYVIMRC<CR> " Save file nmap <Leader>w :w<CR> diff --git a/links/.vim/plugins.vim b/links/.vim/plugins.vim @@ -106,25 +106,28 @@ let g:foldsearch_disable_mappings = 1 let g:vim_markdown_folding_disabled=1 let g:vim_markdown_math=1 -function! s:goyo_enter() - silent !tmux set status off - silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z - set noshowmode - set noshowcmd - set nolist - set scrolloff=999 - Limelight -endfunction - -function! s:goyo_leave() - silent !tmux set status on - silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z - set showmode - set showcmd - set list - set scrolloff=3 - Limelight! -endfunction +let g:limelight_conceal_ctermfg = 'gray' +let g:limelight_conceal_ctermfg = 240 +if !exists('*s:goyo_enter') + function! s:goyo_enter() + silent !tmux set status off + silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z + set noshowmode + set noshowcmd + set nolist + set scrolloff=999 + Limelight + endfunction +end + +if !exists('*s:goyo_leave') + function! s:goyo_leave() + silent !tmux set status on + silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z + Limelight! + source $MYVIMRC + endfunction +end autocmd! User GoyoEnter nested call <SID>goyo_enter() autocmd! User GoyoLeave nested call <SID>goyo_leave()