pawel-slowik / vim-colorized-status

Simple status line for Vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a set of functions that can be used to construct a simple status line for the Vim editor.

Requirements

Usage

Set some colors:

highlight StatusLineGit ctermbg=22 ctermfg=white cterm=none
highlight StatusLinePath ctermbg=94 ctermfg=white cterm=none
highlight StatusLineCurrentFunction ctermbg=23 ctermfg=white cterm=none
highlight StatusLinePaste ctermbg=89 ctermfg=white cterm=bold
highlight StatusLineErrorCount ctermbg=darkred ctermfg=white cterm=bold
highlight StatusLineWarningCount ctermbg=58 ctermfg=white cterm=none

Use the colorizedstatus#* functions in your status line:

set statusline=%<
set statusline+=%#StatusLineGit#%(%{colorizedstatus#GitInfo()}\ %)%*
set statusline+=%#StatusLinePath#%(\ %{colorizedstatus#PathInfo()}\ %)%*
set statusline+=%#StatusLineCurrentFunction#%(\ %{colorizedstatus#FunctionInfo()}\ %)%*
set statusline+=%=%h%m%r
set statusline+=%#StatusLinePaste#%(\ %{colorizedstatus#PasteInfo()}\ %)%*
set statusline+=%#StatusLineErrorCount#%(\ %{colorizedstatus#ErrorInfo()}\ %)%*
set statusline+=%#StatusLineWarningCount#%(\ %{colorizedstatus#WarningInfo()}\ %)%*
set statusline+=\ %-9.(%5.l,%3.v%)\ %P

Screenshot:

screenshot

About

Simple status line for Vim

License:The Unlicense


Languages

Language:Vim Script 100.0%