mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
parent
b2dc3cc8fa
commit
5a477bee58
@ -77,7 +77,10 @@ function! s:enable_cursorline() abort
|
||||
endfunction
|
||||
|
||||
function! s:disable_cursorline() abort
|
||||
setl nocursorline
|
||||
if &filetype ==# 'denite'
|
||||
else
|
||||
setl nocursorline
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:reload_touchpad_status() abort
|
||||
|
@ -727,7 +727,7 @@ endfunction
|
||||
|
||||
|
||||
function! SpaceVim#layers#core#statusline#denite_status(argv) abort
|
||||
if exists('*get_status_mode')
|
||||
if exists('*denite#get_status_mode')
|
||||
let denite_ver = 2
|
||||
else
|
||||
let denite_ver = 3
|
||||
@ -741,30 +741,26 @@ endfunction
|
||||
|
||||
function! SpaceVim#layers#core#statusline#denite_mode() abort
|
||||
let t = s:colors_template
|
||||
if exists('*get_status_mode')
|
||||
if exists('*denite#get_status_mode')
|
||||
let denite_ver = 2
|
||||
else
|
||||
let denite_ver = 3
|
||||
endif
|
||||
|
||||
if denite_ver == 3
|
||||
let dmode = ['Denite']
|
||||
let dmode = 'Denite'
|
||||
else
|
||||
let dmode = split(denite#get_status_mode(), ' ')
|
||||
endif
|
||||
if empty(dmode)
|
||||
let dmode = ''
|
||||
else
|
||||
let dmode = dmode[0]
|
||||
endif
|
||||
if get(w:, 'spacevim_statusline_mode', '') != dmode
|
||||
if dmode ==# 'NORMAL'
|
||||
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
|
||||
elseif dmode ==# 'INSERT'
|
||||
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
|
||||
" this can not be changed, as it works in old denite
|
||||
let dmode = split(denite#get_status_mode())[1]
|
||||
if get(w:, 'spacevim_statusline_mode', '') != dmode
|
||||
if dmode ==# 'NORMAL'
|
||||
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
|
||||
elseif dmode ==# 'INSERT'
|
||||
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
|
||||
endif
|
||||
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
|
||||
let w:spacevim_statusline_mode = dmode
|
||||
endif
|
||||
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
|
||||
let w:spacevim_statusline_mode = dmode
|
||||
endif
|
||||
return dmode
|
||||
endfunction
|
||||
|
@ -8,6 +8,7 @@ let s:denite_options = {
|
||||
\ 'default' : {
|
||||
\ 'winheight' : 15,
|
||||
\ 'mode' : 'insert',
|
||||
\ 'start_filter' : 1,
|
||||
\ 'quit' : 1,
|
||||
\ 'highlight_matched_char' : 'MoreMsg',
|
||||
\ 'highlight_matched_range' : 'MoreMsg',
|
||||
@ -174,6 +175,11 @@ endfunction
|
||||
autocmd FileType denite-filter call s:denite_filter_my_settings()
|
||||
function! s:denite_filter_my_settings() abort
|
||||
imap <silent><buffer> <Esc> <Plug>(denite_filter_quit)
|
||||
inoremap <silent><buffer> <Tab>
|
||||
\ <Esc><C-w>p:call cursor(line('.')+1,0)<CR><C-w>pA
|
||||
inoremap <silent><buffer> <S-Tab>
|
||||
\ <Esc><C-w>p:call cursor(line('.')-1,0)<CR><C-w>pA
|
||||
inoremap <silent><buffer><expr> <CR> denite#do_map('do_action')
|
||||
endfunction
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user