Hide tmux status and add ability to toggle preview
This commit is contained in:
parent
0ac1234126
commit
7ce0667ab8
@ -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 <silent> <C-o> :w<CR>
|
||||
nnoremap <silent> <C-A-x> :q!<CR>
|
||||
" Remove search highlighting
|
||||
nnoremap <silent> <C-A-a> :noh<CR>
|
||||
|
||||
" Preview toggle
|
||||
nnoremap <silent> <Leader>p :call <SID>preview_toggle()<CR>
|
||||
|
||||
" Commands from plugins
|
||||
|
||||
|
Reference in New Issue
Block a user