Questions tagged [statusline]

A status line will be used to separate windows. Questions about how to format and change the content of this status line.

Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

Printing (file) information at the bottom line

I'd like to print some file information on vim's bottom line upon pressing a keyboard shortcut, sort of like Ctrl+G but with different info (modification timestamp). How can I output there? My current ...
Petr Skocik's user avatar
1 vote
1 answer
22 views

Long file name overrides other items in statusline

I build my own statusline because I don't need such fancy things inside my statusline as some plug-ins provides. Usually everything is fine. The result looks like the following: NORMAL | ~/.config/...
grrr's user avatar
  • 11
0 votes
1 answer
40 views

How to display a colored file icon in the statusline?

So I was setting up my status line and I wanted a function which gives the icon of current file type. But it has to be in string. provider=function() str="{some icon}" return str end so ...
Prajwal 's user avatar
1 vote
1 answer
39 views

How do you change the window title line text in Vim?

How do I change where is says [No Name] or where it says gibbersh-letters-of-base64 to a text of my choosing?
leeand00's user avatar
  • 3,491
1 vote
2 answers
114 views

How can I disable the terminal statusline in gVim?

I want to disable the terminal statusline in gVim as it seems quite useless and I usually have the windows at a relatively small size when using gVim, so it takes up too much space. I've tried quite a ...
paradroid's user avatar
  • 367
0 votes
0 answers
40 views

multibyte characters unicode in neovim status line

I am trying to configure lualine plugin to display unicode of a multibyte character under the cursor. It is works fine for ASCII but not multibyte chars... Can anyone share a working lua function? ...
Malamoot's user avatar
2 votes
1 answer
105 views

Vim command-line just say 'saved' upon save

In Vim, at the the bottom. There is statusline. And below it there is, I think, the command line. When I press save, this command line, displays something like: "index" 160 lines, 2097 ...
john-jones's user avatar
0 votes
1 answer
66 views

How to show the clock and battery usage in lightline?

I have Lightline installed for a more detailed statusline. Unfortunately, any time I do something like this set statusline+=%{strftime(\"%H:%M\")} it seems like Lightline will override it, ...
Patrick O'Brien's user avatar
0 votes
0 answers
27 views

Ugly border line after running shell command in Neovim

How to remove this kind of status line that appears after I get result of running shell command in Neovim using exclamation mark (!)? NVIM v0.8.1 with lualine.
Gleb Voitko's user avatar
1 vote
1 answer
63 views

Showing virtualedit status in lightline

I've got such mapping in my vimrc: nnoremap <Leader>ve :call <SID>Toggle_ve()<CR> fun! <SID>Toggle_ve() if &ve == '' set virtualedit=all elseif &...
Enlico's user avatar
  • 2,184
0 votes
1 answer
142 views

File changed [+] indicator for statusline

In both the plugins I use for Vim and neovim statuslines, an indicator shows that the file has been changed since it was last saved. It looks like this on one of them after the current buffer filename:...
paradroid's user avatar
  • 367
0 votes
1 answer
41 views

Adding Colorscheme to Neovim conditionally?

I'm trying to create a status line and get the color scheme correctly. I have the function function GetDiagnosticErrorCount() local errorCount = #vim.diagnostic.get(0, { severity = vim.diagnostic....
Marc's user avatar
  • 113
1 vote
1 answer
99 views

How to show the current statusline definition?

I want to see the current statusline definition/string as loaded by Vim. So, taking into account :help statusline, if it is the default, the output would be empty, but if ruler is set (and nothing ...
iago's user avatar
  • 113
1 vote
1 answer
280 views

Caps Lock indicator

I would like if there is any way to have some sort of a indicator on screen for when Caps Lock is on. The status line seems like the right place but I am looking for any method whether for vim or ...
cassepipe's user avatar
  • 375
0 votes
1 answer
421 views

Full file path in status bar

I'm a Vim user and I'm not a Vim developer. I collect some useful vim plugins in ~/.vim/and add some usable Vim commands in my ~/.vimrc. Now it seems like IDE as this pic. I would like to add a full ...
Hossein Vatani's user avatar
0 votes
1 answer
126 views

Is there any invisible string character that can be ignored by "set fillchars", in the status line?

Currently, I'm trying to make a pretty minimal custom status line that suits my needs. One element of it, however, is a diagnostics report that depends on another plugin (coc.nvim). With a function, I ...
Idervas's user avatar
3 votes
1 answer
559 views

nvim: `vim.o.cmdheight=0` looses the 'recording @a' macro messages

When I set vim.o.cmdheight=0 in neovim, then use macros. The recording @a messages are lost. Aside for reverting back to vim.o.cmdheight=1, how can I display these messages in lualine? Environment: ...
Guy Langston's user avatar
3 votes
2 answers
252 views

Statusline vs Rulerformat - What is the Difference?

What is the purpose of the ruler? I have recently learned about the statusline and the rulerformat, and was wondering what the difference between them is. Why does the ruler exist? Why can't you only ...
Bog's user avatar
  • 457
0 votes
1 answer
44 views

string substitution in statusline (change %F)

My current statusline (in .vimrc) contains %F to show the current filename. I want to perform a string substitution in %F. More specifically I want to substitute ~/remotes/foo -> [foo] Examples: ~/...
Laurent Claessens's user avatar
0 votes
1 answer
26 views

When I use `:term bash` from inside vim, the resulting "file" doesn't have the right date and time. How can I fix this?

For example, I'm currently writing a file <x>.py, and the status bar correctly displays the date and time the file was opened. I run, :term bash to get a shell inside of vim and the status bar ...
totallyprofessional's user avatar
0 votes
0 answers
46 views

^@ when placing a string from cmd.exe in vim-airline

I have defined the following function let g:conda_activate = 'myenv' " Get conda virtual environment function Condaenv(env) return system("conda activate ". a:env. " &&...
Barzi2001's user avatar
  • 508
2 votes
2 answers
507 views

How can I show the current keyboard layout in the statusline?

I use Vim with two keyboard layouts, English and Russian, and to be able to use Vim commands irrespective to the current layout, I have the following snippet in my .vimrc: " To switch between ...
user90726's user avatar
  • 123
0 votes
1 answer
120 views

vim status bar not consistent in all file

I recently set my vim status bar using this: " set status line set laststatus=2 set statusline= set statusline+=%#StatusLineFile# set statusline+=\ %F set statusline+=%m set statusline+=%= set ...
Jiang Yuanhao's user avatar
2 votes
2 answers
428 views

Is it possible to modify default statusline without resetting it to blank?

Normally, if you add something like set setting+=value into your .vimrc, the value will be appended to the existing ones. For example: set formatoptions+=j " => tcqj However, it seems it ...
user90726's user avatar
  • 123
0 votes
1 answer
125 views

How can I display a relative path instead of a full path in the title?

Out of the box title: filename.txt (~/projects/blabla/foo/bar) - VIM Desired title when the current folder ~/projects/blabla/foo: foo/bar/filename.txt 45/500 The last numbers represent current line /...
Vitaly Zdanevich's user avatar
3 votes
1 answer
259 views

What's g:statusline_winid?

When I do :h 'statusline' I can see The g:statusline_winid variable will be set to the window-ID of the window that the status line belongs to. But :set statusline=[window_id\:%{g:statusline_winid}] ...
Dugesia7's user avatar
0 votes
1 answer
74 views

Configure the statusbar to show rows

I want to configure the statusbar in vim to show which row I'm on. I have it currently set as statusline=%l/%L\ (%3p%%) I want however to do something like the following statusline=%3l/%3L\ (%3p%%) ...
spinosarus123's user avatar
0 votes
2 answers
1k views

See live word count in Lualine

I am currently using lualine as my statusline. I would like to see the live world count of the file similar to the feature in airline preferable I would like to get this working natively or else any ...
muppi090909's user avatar
1 vote
0 answers
58 views

Vim local statusline doesn't set up correctly upon open new window

I tried to write a small script to give the statusline distinguishable appearance on current and non-current window. The local active and inactive statuslines are defined by the following code: ...
Rekkhan's user avatar
  • 43
1 vote
1 answer
66 views

How to get activated current `b:keymap_name` value

I have a below line set keymap = russian-jcukenwin.vim in .vimrc. When I press C-^ I get indicator in mode line , like INSERT (RU). I'd like to output it in lightline vim config, and there is %k flag ...
bybor's user avatar
  • 13
0 votes
0 answers
38 views

Cursor get stuck at the statusline bar when saving a .tex file (probably due to vimtex)

To preface this, I'm relatively new to vim, and I'm using Windows Subsytsem for Linux, and the Windows Terminal if this makes any difference. So whenever I'm editing a .tex file and want to save, ...
MoonlessNightss's user avatar
1 vote
1 answer
587 views

Statusline/Tabline - Unable to see which buffer is open when many buffers are open in a tab

I have a tab with the following window structure: _________________________________ 1 | 3 | | | | | ...
Tryer's user avatar
  • 247
1 vote
1 answer
67 views

To toggle statusline colors when switching modes. Problem with C-C

I use the following code to have different statusline colors for Normal and Insert modes: highlight statusLine ctermfg=black ctermbg=red guifg=red guibg=black autocmd ...
john c. j.'s user avatar
0 votes
1 answer
227 views

Difference between %f and %F (it's not that obvious!)

This might be a silly question, but what is the actual difference between %f and %F in status line? From :h statusline: f Path to the file in the buffer, as typed or relative to current directory. F ...
john c. j.'s user avatar
0 votes
1 answer
45 views

Titlesting/Statusline: to differentiate empty buffer from non-empty ones

I use the following settings to have the filename in the header line before the rest of the path: set titlestring= set titlestring+=%M set titlestring+=%(\ %t%) set titlestring+=%(\ (%{expand('%:p:h')}...
user90726's user avatar
  • 123
0 votes
1 answer
47 views

Building: --disable-statusline is unrecognized option

I want to improve Gentoo ebuild. I tried :helpgrep statusline. In the future, how can I get all possible build flags about features in :version?
Vitaly Zdanevich's user avatar
5 votes
1 answer
904 views

Is there a way to display in the statusline when capslock is detected?

One of the biggest problems I currently have in Vim is I start working enter a few commands and suddenly all key binds and commands start acting up. After a few seconds of panic and trying to do the ...
Dom's user avatar
  • 3,284
1 vote
2 answers
67 views

MacVim mode() does not return 'c' for Command mode when pressing ':'

mode() won't return anything when I go into Command mode. I use this for StatusLine info: set statusline+=%{mode()} as a test to see what mode() returns. pressing c or C and my StatusLine stays as ...
TonyB's user avatar
  • 11
0 votes
1 answer
148 views

How to show ruler always in the last line instead of statusline?

From h:ruler: If a window has a status line, the ruler is shown there. Otherwise, it is shown in the last line of the screen. How to instead show it only in the last line for the currently active ...
tejasvi88's user avatar
  • 460
4 votes
1 answer
339 views

How to set the background color for colored items in the statusline to the background color of the statusline?

I am experimenting with creating a statusline and have opted for coloring different parts of it. The problem is that while the item's foreground color is changed, the background is black and doensn't ...
Shuzheng's user avatar
  • 1,215
3 votes
3 answers
313 views

How to prevent whitespace associated with items in the statusline from taking up space, when the item is not shown?

Consider the following statusline that makes use of %r to display [RO], when readonly has been set. The problem is that when readonly is not set, two spaces occur between %f (file path) and %y (file ...
Shuzheng's user avatar
  • 1,215
3 votes
1 answer
1k views

How to add the "filetype" to the default "statusline" in Vim?

I like the default statusline in Vim, but would you like to add the filetype to it. Is it possible to add the filetype to the default statusline without having to create a new statusline from scratch?
Shuzheng's user avatar
  • 1,215
2 votes
1 answer
722 views

Vim Terminal interferes with statusline

I am editing a lot of files with Vim, and I have the following in my .vimrc to help me stay oriented as to which file I am in: " Add file name to statusline so we know where we are in the ...
Aleksey Tsalolikhin's user avatar
0 votes
1 answer
149 views

Unclosed expression sequence error when setting statusline?

I am trying to display the number of loaded buffers on my statusline using: ... set statusline += %{len(getbufinfo({"buflisted":1}))} ... The error I get is : E540: Unclosed expression ...
First User's user avatar
-1 votes
2 answers
725 views

How can i make this autocmd BufEnter command work?

i am setting the default vim-statusline, and i made this line on my colorscheme: hi MyStatusLineDevIcon ctermfg=7 ctermbg=0 cterm=NONE So i can color the devicons on my statusline.vim config I call ...
Henrique Monteiro's user avatar
4 votes
1 answer
858 views

check if plugin is loaded in .vimrc and set option accordingly?

I apologise if this seems very basic but I wasn't able to find a satisfactory answer. In my vimrc I want to check if the lightline status bar is loaded and set options accordingly. call plug#begin('~/....
First User's user avatar
0 votes
1 answer
566 views

Show buffer title at top of window instead of bottom

By default vim shows the filename of the current buffer (or whatever status line you have specified) at the bottom of each split window. Is there any way to change it so that it displays at the top of ...
Prismavoid's user avatar
0 votes
0 answers
472 views

How to set statusline for specific buffer

I want to use netrwm instead of nerdtree. I have my own statusline but I don't want it to be displayed in netrw. Nerdtree had it's own option for it (let NERDTreeStatusline="") which made it ...
user419050's user avatar
5 votes
1 answer
301 views

Statusline wrong column count for multi-byte characters

I have set this statusline. :set statusline=%c According to :help statusline, %c means column number. If the buffer contents is abcdef éÀ│§õ→ and the cursor is on the f character, the statusline ...
Quasímodo's user avatar
  • 2,426
0 votes
0 answers
91 views

colorscheme murphy interferes with statusline

I do not know if its my term colors or something, but one of my colorschemes (murphy) makes the statusline unreadable I do not wnat the problem is. Here's my vimrc: "source $HOME/cscope_maps.vim ...
Skegg's user avatar
  • 101