picoline is a tiny status line written in vim9script for my personal use, and serves as a starting point that's easy to extend.
picoline is very small. It has only one command - PicolineToggle
- which just shows and hides the statusline
(:h statusline
).
The most interesting part about it is to show how easy it is to customize the status line.
- Highlights current mode using colors
- Shows current git branch (requires vim-fugitive)
- Shows if vim-gutentags is currently running
- Uses default
StatusLine
andStatusLineNC
highlight groups and exposes custom ones for vim modes - A cool friend that watches you code
(ᵔ◡ᵔ)
picoline automatically highlights the current vim mode (:h vim-modes
) using different colors. The following highlight groups are defined with my personal defaults:
PicolineNRM
- Normal modePicolineINS
- Insert modePicolineVIS
- Visual modePicolineCMD
- Command modePicolineRPL
- Replace modePicolineSEL
- Select modePicolineTRM
- Terminal modePicolinePRO
- Prompt modePicolineEXT
- External mode
You can override these highlight groups in your colorscheme or vimrc to customize the appearance:
" Example: Custom colors for insert and visual modes
highlight PicolineINS guifg=#ffffff guibg=#e74c3c ctermbg=red ctermfg=white
highlight PicolineVIS guifg=#2c3e50 guibg=#f1c40f ctermbg=yellow ctermfg=black
The highlight groups are automatically set up when vim starts and when you change colorschemes.
:PicolineToggle
- Toggle the statusline on/off
Like I said, picoline ain't much, but it's everything I need.
See :help picoline
for more detailed documentation.