https://github.com/pawel-slowik/vim-colorized-status
Simple status line for Vim
https://github.com/pawel-slowik/vim-colorized-status
statusline vim vim-plugin
Last synced: 9 months ago
JSON representation
Simple status line for Vim
- Host: GitHub
- URL: https://github.com/pawel-slowik/vim-colorized-status
- Owner: pawel-slowik
- License: unlicense
- Created: 2018-08-05T22:12:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-10T09:58:26.000Z (almost 4 years ago)
- Last Synced: 2025-02-24T12:48:04.102Z (over 1 year ago)
- Topics: statusline, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a set of functions that can be used to construct a simple status line
for the [Vim](https://www.vim.org/) editor.
## Requirements
- [fugitive.vim](https://github.com/tpope/vim-fugitive)
- [vim-lsc](https://github.com/natebosch/vim-lsc)
- [vim-current-function](https://github.com/pawel-slowik/vim-current-function)
## 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:
