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 completeopt-=preview
|
||||||
set shortmess+=cI
|
set shortmess+=cI
|
||||||
set noshowmode
|
set noshowmode
|
||||||
|
set shortmess+=I
|
||||||
set nostartofline
|
set nostartofline
|
||||||
set wrap
|
set wrap
|
||||||
set textwidth=0
|
set textwidth=0
|
||||||
@ -99,6 +100,16 @@ function! Load_color_scheme(info)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Toggle preview
|
||||||
|
function! s:preview_toggle()
|
||||||
|
if &completeopt =~# "preview"
|
||||||
|
setlocal completeopt-=preview
|
||||||
|
pc
|
||||||
|
else
|
||||||
|
setlocal completeopt+=preview
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
" Plugin configurations
|
" Plugin configurations
|
||||||
let g:airline_theme = 'powerlineish'
|
let g:airline_theme = 'powerlineish'
|
||||||
@ -191,12 +202,19 @@ call plug#end()
|
|||||||
|
|
||||||
|
|
||||||
" Goyo
|
" Goyo
|
||||||
|
|
||||||
function! s:on_goyo_enter()
|
function! s:on_goyo_enter()
|
||||||
|
if exists('$TMUX')
|
||||||
|
silent !tmux set status off
|
||||||
|
endif
|
||||||
setlocal nocursorline
|
setlocal nocursorline
|
||||||
Limelight
|
Limelight
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:on_goyo_leave()
|
function! s:on_goyo_leave()
|
||||||
|
if exists('$TMUX')
|
||||||
|
silent !tmux set status on
|
||||||
|
endif
|
||||||
setlocal cursorline
|
setlocal cursorline
|
||||||
Limelight!
|
Limelight!
|
||||||
endfunction
|
endfunction
|
||||||
@ -231,7 +249,8 @@ nnoremap <silent> <C-o> :w<CR>
|
|||||||
nnoremap <silent> <C-A-x> :q!<CR>
|
nnoremap <silent> <C-A-x> :q!<CR>
|
||||||
" Remove search highlighting
|
" Remove search highlighting
|
||||||
nnoremap <silent> <C-A-a> :noh<CR>
|
nnoremap <silent> <C-A-a> :noh<CR>
|
||||||
|
" Preview toggle
|
||||||
|
nnoremap <silent> <Leader>p :call <SID>preview_toggle()<CR>
|
||||||
|
|
||||||
" Commands from plugins
|
" Commands from plugins
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user