Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
/ mpsl Public archive

minimal (n)vim plugins - status line(Under 200 LOC)

License

Notifications You must be signed in to change notification settings

LinArcX/mpsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mpsl

Using mpsl + mpi + mpbtl

Installation

Just copy mpsl.vim into your plugin directory.

Why?

  • KISS
  • I like vim-airline. But its code is huge for such a simple task.(showing statusline)
  • I like to manipulate and discover things and see what's going on under the hood(And i encourage you, too). So, instead of just using a huge plugin, install a minimal alternative and change it according to your needs.

Customization

Custom functins

You can add your own functions and call them later. For example i want to show file permisions and current git branch. First define them:

function! FilePermission()
    return getfperm(expand('%:p'))
endfunction

function! GitBranch()
    let l:branchname = system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
    return strlen(l:branchname) > 0?'  '.l:branchname.' ':' '
endfunction

And call them like this:

set statusline+=%1*\%{GitBranch()}
set statusline+=%1*\ %{FilePermission()}\ |

Using emojies

Also you can add unicode emojies like this: set statusline+=%5*\ %{nr2char(0x1f47d)}

Define custom colors

If you want to use different colors, first you should define different Highlight commands. Here is an example:

hi User5 ctermbg=233 ctermfg=39  " Black/Sky-Blue
hi User6 ctermbg=233 ctermfg=007 " Black/Sky-Blue

And use them like this:

set statusline+=%5*\ %{nr2char(0x1f47d)}

Here is the list of colors: https://jonasjacek.github.io/colors/

Donate

  • Bitcoin: 13T28Yd37qPtuxwTFPXeG9dWPahwDzWHjy

  • Monero: 48VdRG9BNePEcrUr6Vx6sJeVz6EefGq5e2F5S9YV2eJtd5uAwjJ7Afn6YeVTWsw6XGS6mXueLywEea3fBPztUbre2Lhia7e

License

License

About

minimal (n)vim plugins - status line(Under 200 LOC)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published