I'm using vim Powerline, it comes by default with quite a few segments in the powerline. More than I want.
I'd like to remove several of the default ones. Specifically, the one that tells me my git branch, the file encoding, the source language, the line/col number, the one that says unix (probably line ends).
In the docs, they say you should be able to use Pl#Theme#RemoveSegment.
So I added call Pl#Theme#RemoveSegment('fugitive') to my ~/.vimrc, and then ran :PowerlineClearCache and reloaded the file, but the git branch is still there. Perhaps I'm getting the name wrong, I guessed that this is the one that enters my git branch based on the naming from here.
If there's a way to reflect on some variable and see what segments are registered, that would be useful, but I can't tell if I'm getting the name wrong, or invoking the method incorrectly, or what.
The theme list suggests maybe the segment name should be fugitive:branch instead of fugitive. Kind of guessing, though.
There may be more segments being added. I personally would suggest instead of using Pl#Theme#RemoveSegment do the following:
{path/to/powerline}/autoload/Powerline/Themes/default.vim to ~/.vim/autoload/Powerline/Themes/my.vim.Replace in the first line of a new file default with my: it should look like
let g:Powerline#Themes#my#theme = Pl#Theme#Create(
Add
let g:Powerline_theme='my'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With