daily pastebin goal
50%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if exists('g:loaded_lightline')
  2.   " lightline.vim側で描画するのでdeniteでstatuslineを描画しないようにする
  3.   call denite#custom#option('default', 'statusline', v:false)
  4. endif
  5.  
  6. " lightlineでmodeを描画する時ようのfunction
  7. function! MyMode()
  8.   if &ft == 'denite'
  9.     " deniteは自分でinsertモード normalモードを管理しているので
  10.     " lightlineのハイライト関数をdeniteのモードに合わせた値(-- NORMAL -- ならn)
  11.     " にしてハイライト関数を呼ぶ
  12.     let mode_str = substitute(denite#get_status_mode(), "-\\| ", "", "g")
  13.     call lightline#link(tolower(mode_str[0]))
  14.     return mode_str
  15.   else
  16.     return winwidth('.') > 60 ? lightline#mode() : ''
  17.   endif
  18. endfunction
  19.  
  20.  
  21. let g:lightline = {
  22. " 〜略〜
  23.         \ 'component_function': {
  24.         \   'mode': 'MyMode',
  25.         \ },
  26. " 〜略〜        
  27.         \ }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top