Questions tagged [statusline]
51 questions
4
votes
2 answers
Vim Statusline: Word search
I've searched hard for this and haven't been able to find what I'm after.
On my statusline I want a count of the number of matches that occur in the current file. The vim command below returns what I want. I need the returned number to be displayed…

samusugiru
- 111
- 7
4
votes
2 answers
How to truncate long file path in vim-powerline statusline?
I would like to truncate my file path to ex: a/a/j/c/popularCategories.js.

tomekfranek
- 6,852
- 8
- 45
- 80
3
votes
3 answers
Vim status line not changing / clearing
No matter what I change status line to with set statusline my status line will not change. It looks like
".vimrc" 39L, 578C 1,1 All
with the cursor position and the percentage through the file as…

Portablejim
- 824
- 1
- 12
- 21
3
votes
1 answer
In Vim statusline, right-pad number
Say I do set statusline+=col:%3v; in Vim 8.
Now if I'm on column 1, my statusline looks like col: 1;.
How do I get the padding on the other side of the number? E.g., how do I get my column 1 statusline to look like col:1 ;?

user
- 4,920
- 3
- 25
- 38
3
votes
1 answer
Vim statusline: show the character itself
Is there a way to show the character under the cursor in the statusline?
I already use %b\ (0x%B) to display decimal and hexadecimal value of the character. I would like to display the char itself as well before these two.

Pontiac_CZ
- 619
- 1
- 6
- 13
2
votes
1 answer
Using a dictionary in a vim statusline expression
I want to use an expression (function), which takes two arguments - data and a dictionary - as a statusline.
This is what I'm trying:
let &stl="%{Brick(statusbricks#ReportLinecount('raw'), {
\ 'brick_color': 'LineNr',
\ …

Saucier
- 4,200
- 1
- 25
- 46
2
votes
2 answers
Lag in InsertLeave of Vim
I have these lines in my .vimrc to change the color of Statusline for Vim's Insert Mode. The StatusLine responds quickly for InsertEnter. However, for InsertLeave, there is approx. 1 second delay between the disappearance of --INSERT-- and the…

user3876493
- 41
- 3
2
votes
1 answer
How to truncate a Vim 'statusline' field from the right?
I'm trying to set the 'statusline' option of a quickfix window like this:
setlocal statusline=%t%.66{'\ '.w:quickfix_title}%=\ %11.(%c,%l/%L\ %P%)
But when the field %.66{'\ '.w:quickfix_title} is longer than 66 characters, its left side is…

Bohr
- 1,566
- 1
- 16
- 21
2
votes
2 answers
How to get transparent statusline in terminal Vim?
I am using Vim in the default terminal of Ubuntu. I want to make the statusline background color be transparent, that is become the color of the Ubuntu terminal background.
I tried adding this to my vimrc:
hi statusline ctermfg=NONE
Also tried:
hi…

Ashwin Nanjappa
- 76,204
- 83
- 211
- 292
2
votes
4 answers
Vim statusline loses colors after reopening session
I tweaked my statusline in vim a little, and started to like it. I use autosession.vim so when I reopen, I have the same files open, but the statusline loses all color settings. If I wipe buffer and reopen, the colors are back (or, if I source…

Daniel Pecher
- 204
- 2
- 10
1
vote
0 answers
Why can't I see the filename in statusline with multiple buffers in vertical splits?
When I have multiple buffers open in vertical splits the filename in the statusline scrolls off to the left
and is no longer visible. It is visible until the left and right justified parts meet.
Then, as the split window gets smaller, the whole line…

francismaile
- 111
- 3
1
vote
1 answer
Line and column numbers in vim status line
On some of my systems, I can see the line and column at the bottom of the display when using vim, along with an indication of the window's position.
But I'm not able to find a way to make this appear on other systems. This does not seem to be OS…

Dennis
- 1,071
- 2
- 17
- 38
1
vote
0 answers
Neovim + galaxyline plugin crushing
When i press alt+tab and nvim folding galaxyline plugin crushing and airline default theme appears,but when i saving file galaxyline is start working
galaxy line is working
I press alt+tab and galaxyline is crushing
saving file in vim and…

AlePon
- 15
- 2
1
vote
2 answers
Display total characters count on vim statusline
I want to add a function to my statusline by which I can display the total characters count of the current file.
:help statusline showed me that F referes to Full path to the file in the buffer, and through a bit searching I got to know how I can…

nino
- 554
- 2
- 7
- 20
1
vote
1 answer
Detect if buffer is in inactive window in statusline
My vimrc sets the buffer number in the statusline with a different color background based on if it's readonly or modified.
I'd also like to set a different color if the buffer is not in the active window (useful when in split window mode).
I am…

tomocafe
- 1,425
- 4
- 20
- 35