mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:40:06 +08:00
parent
b2dc3cc8fa
commit
5a477bee58
@ -77,7 +77,10 @@ function! s:enable_cursorline() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:disable_cursorline() abort
|
function! s:disable_cursorline() abort
|
||||||
|
if &filetype ==# 'denite'
|
||||||
|
else
|
||||||
setl nocursorline
|
setl nocursorline
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:reload_touchpad_status() abort
|
function! s:reload_touchpad_status() abort
|
||||||
|
@ -727,7 +727,7 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! SpaceVim#layers#core#statusline#denite_status(argv) abort
|
function! SpaceVim#layers#core#statusline#denite_status(argv) abort
|
||||||
if exists('*get_status_mode')
|
if exists('*denite#get_status_mode')
|
||||||
let denite_ver = 2
|
let denite_ver = 2
|
||||||
else
|
else
|
||||||
let denite_ver = 3
|
let denite_ver = 3
|
||||||
@ -741,22 +741,17 @@ endfunction
|
|||||||
|
|
||||||
function! SpaceVim#layers#core#statusline#denite_mode() abort
|
function! SpaceVim#layers#core#statusline#denite_mode() abort
|
||||||
let t = s:colors_template
|
let t = s:colors_template
|
||||||
if exists('*get_status_mode')
|
if exists('*denite#get_status_mode')
|
||||||
let denite_ver = 2
|
let denite_ver = 2
|
||||||
else
|
else
|
||||||
let denite_ver = 3
|
let denite_ver = 3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if denite_ver == 3
|
if denite_ver == 3
|
||||||
let dmode = ['Denite']
|
let dmode = 'Denite'
|
||||||
else
|
else
|
||||||
let dmode = split(denite#get_status_mode(), ' ')
|
" this can not be changed, as it works in old denite
|
||||||
endif
|
let dmode = split(denite#get_status_mode())[1]
|
||||||
if empty(dmode)
|
|
||||||
let dmode = ''
|
|
||||||
else
|
|
||||||
let dmode = dmode[0]
|
|
||||||
endif
|
|
||||||
if get(w:, 'spacevim_statusline_mode', '') != dmode
|
if get(w:, 'spacevim_statusline_mode', '') != dmode
|
||||||
if dmode ==# 'NORMAL'
|
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]
|
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]
|
||||||
@ -766,6 +761,7 @@ function! SpaceVim#layers#core#statusline#denite_mode() abort
|
|||||||
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
|
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
|
||||||
let w:spacevim_statusline_mode = dmode
|
let w:spacevim_statusline_mode = dmode
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
return dmode
|
return dmode
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ let s:denite_options = {
|
|||||||
\ 'default' : {
|
\ 'default' : {
|
||||||
\ 'winheight' : 15,
|
\ 'winheight' : 15,
|
||||||
\ 'mode' : 'insert',
|
\ 'mode' : 'insert',
|
||||||
|
\ 'start_filter' : 1,
|
||||||
\ 'quit' : 1,
|
\ 'quit' : 1,
|
||||||
\ 'highlight_matched_char' : 'MoreMsg',
|
\ 'highlight_matched_char' : 'MoreMsg',
|
||||||
\ 'highlight_matched_range' : 'MoreMsg',
|
\ 'highlight_matched_range' : 'MoreMsg',
|
||||||
@ -174,6 +175,11 @@ endfunction
|
|||||||
autocmd FileType denite-filter call s:denite_filter_my_settings()
|
autocmd FileType denite-filter call s:denite_filter_my_settings()
|
||||||
function! s:denite_filter_my_settings() abort
|
function! s:denite_filter_my_settings() abort
|
||||||
imap <silent><buffer> <Esc> <Plug>(denite_filter_quit)
|
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
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user