Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airline ignores 'modified' icon #2664

Open
beyondmarc opened this issue Feb 6, 2024 · 1 comment
Open

Airline ignores 'modified' icon #2664

beyondmarc opened this issue Feb 6, 2024 · 1 comment

Comments

@beyondmarc
Copy link

I was trying to set an icon to be shown next to the file name when it's modified. After all, there's a modified airline_symbol. However, that symbol is never used, since airline uses the default vim '%m' statusline item when setting the file name or path.

The lines in question are in airline/init.vim 191 to 196:

if get(g:, 'airline_section_c_only_filename',0)
    call airline#parts#define_raw('file', '%t%m')
  else
    call airline#parts#define_raw('file', airline#formatter#short_path#format('%f%m'))
  endif
  call airline#parts#define_raw('path', '%F%m')

environment

  • vim: latest
  • vim-airline: latest
  • OS: windows

actual behavior

Airline always shows the default [+] when a file is modified.

expected behavior

I would expect Airline to show whatever symbol is defined in the symbol table.

@chrisbra
Copy link
Member

Yes, the %m is the default modified label added by Vim. I suppose you could define your own part using a custom label. But currently this is not enabled in vim-airline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants