Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if exists('g:loaded_lightline')
- " lightline.vim側で描画するのでdeniteでstatuslineを描画しないようにする
- call denite#custom#option('default', 'statusline', v:false)
- endif
- " lightlineでmodeを描画する時ようのfunction
- function! MyMode()
- if &ft == 'denite'
- " deniteは自分でinsertモード normalモードを管理しているので
- " lightlineのハイライト関数をdeniteのモードに合わせた値(-- NORMAL -- ならn)
- " にしてハイライト関数を呼ぶ
- let mode_str = substitute(denite#get_status_mode(), "-\\| ", "", "g")
- call lightline#link(tolower(mode_str[0]))
- return mode_str
- else
- return winwidth('.') > 60 ? lightline#mode() : ''
- endif
- endfunction
- let g:lightline = {
- " 〜略〜
- \ 'component_function': {
- \ 'mode': 'MyMode',
- \ },
- " 〜略〜
- \ }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement