From 7ce0667ab87e45af3515befda90c2b049bdba369 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 19 Jun 2016 02:29:58 +0300 Subject: [PATCH] Hide tmux status and add ability to toggle preview --- neostrophic.vim | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/neostrophic.vim b/neostrophic.vim index d8b7fbd..7e578df 100644 --- a/neostrophic.vim +++ b/neostrophic.vim @@ -14,6 +14,7 @@ set wildmode=longest,list,full set completeopt-=preview set shortmess+=cI set noshowmode +set shortmess+=I set nostartofline set wrap set textwidth=0 @@ -99,6 +100,16 @@ function! Load_color_scheme(info) endif endfunction +" Toggle preview +function! s:preview_toggle() + if &completeopt =~# "preview" + setlocal completeopt-=preview + pc + else + setlocal completeopt+=preview + endif +endfunction + " Plugin configurations let g:airline_theme = 'powerlineish' @@ -191,12 +202,19 @@ call plug#end() " Goyo + function! s:on_goyo_enter() + if exists('$TMUX') + silent !tmux set status off + endif setlocal nocursorline Limelight endfunction function! s:on_goyo_leave() + if exists('$TMUX') + silent !tmux set status on + endif setlocal cursorline Limelight! endfunction @@ -231,7 +249,8 @@ nnoremap :w nnoremap :q! " Remove search highlighting nnoremap :noh - +" Preview toggle +nnoremap p :call preview_toggle() " Commands from plugins