Simple vim statusline plugin barow
Vim の simple な statusline plugin があったので使用してみた。
doums/barow: A minimalist statusline for n/vim
僕は最近結局 dein.vim を使用しているので以下のような設定。 barow に付随する、 lsp と git の plugin も追加している。
設定内容はそれぞれの README にあったものに追加して、 bomb
, filetype
, fileencoding
, fileformat
を表示するようにしてる。
- dein.toml
[[plugins]] repo = "doums/barow" depends = ["barowLSP", "barowGit"] on_event = ['CursorHold', 'FocusLost'] hook_add = ''' source $VIM_PATH/rc/barow.vim ''' [[plugins]] repo = "doums/barowLSP" lazy = 1 [[plugins]] repo = "doums/barowGit" lazy = 1
- $VIM_PATH/rc/barow.vim
function! MyBarowBomb() abort return &bomb ? ' bomb ' : '' endfunction function! MyBarowFileType() abort return ' ' . &filetype . ' ' endfunction function! MyBarowFencFF() abort return ' [' . &fileencoding . ' / ' . &fileformat . '] ' endfunction let g:barow = { \ 'modes': { \ 'normal' : [' ', 'BarowNormal'], \ 'insert' : ['i', 'BarowInsert'], \ 'replace' : ['r', 'BarowReplace'], \ 'visual' : ['v', 'BarowVisual'], \ 'v-line' : ['l', 'BarowVisual'], \ 'v-block' : ['b', 'BarowVisual'], \ 'select' : ['s', 'BarowVisual'], \ 'command' : ['c', 'BarowCommand'], \ 'shell-ex': ['!', 'BarowCommand'], \ 'terminal': ['t', 'BarowTerminal'], \ 'prompt' : ['p', 'BarowNormal'], \ 'inactive': [' ', 'BarowModeNC'] \ }, \ 'statusline': ['Barow', 'BarowNC'], \ 'tabline': ['BarowTab', 'BarowTabSel', 'BarowTabFill'], \ 'buf_name': { \ 'empty': '', \ 'hi' : ['BarowBufName', 'BarowBufNameNC'] \ }, \ 'read_only': { \ 'value': 'ro', \ 'hi': ['BarowRO', 'BarowRONC'] \ }, \ 'buf_changed': { \ 'value': '*', \ 'hi': ['BarowChange', 'BarowChangeNC'] \ }, \ 'tab_changed': { \ 'value': '*', \ 'hi': ['BarowTChange', 'BarowTChangeNC'] \ }, \ 'line_percent': { \ 'hi': ['BarowLPercent', 'BarowLPercentNC'] \ }, \ 'row_col': { \ 'hi': ['BarowRowCol', 'BarowRowColNC'] \ }, \ 'modules': [ \ [ 'barowGit#branch', 'BarowHint' ], \ [ 'barowLSP#error', 'BarowError' ], \ [ 'barowLSP#warning', 'BarowWarning' ], \ [ 'barowLSP#info', 'BarowInfo' ], \ [ 'barowLSP#hint', 'BarowHint' ], \ [ 'barowLSP#coc_status', 'StatusLine' ], \ [ 'barowLSP#ale_status', 'StatusLine' ], \ [ 'MyBarowFileType', 'BarowInfo' ], \ [ 'MyBarowFencFF', 'BarowInfo' ], \ [ 'MyBarowBomb', 'BarowInfo' ], \ ] \ }
うん、シンプルだし、ちょっと気分転換にはいいかも!
参考
Thanks for reading! Read other posts?