7

I'm using airline in vim on the terminal (as part of spf-13, fyi). However, all kinds of other random info (including other open buffers) tends to fill up the line and push out or cover what the name of the current file I'm editing is, like so:

NORMAL  +5 ~1 -0  master  <.test --ipdb      python  env_awi  utf-8[unix]   33%   44:  2 

.test --ipdb is the the name of one of the open buffers (not the current one) and is partially cut off by the <. to the left of which are the other open buffers which are covered up. Any way to make the current file the only one that shows up, so I know which file I'm currently editing?

4
  • just a silly question - how do you manage to copy the statusline ? I would like to ask another question about airline.
    – Niels
    Commented Mar 16, 2015 at 9:42
  • I just shift-highlighted and copied from tmux.
    – rump roast
    Commented Mar 16, 2015 at 14:09
  • Thanks for the trick, it works with vim, but not with gvim, any idea ?
    – Niels
    Commented Mar 16, 2015 at 18:17
  • Just take a screenshot! I wish Carpetsmoker had done so, because my browser messes up his example.
    – roblogic
    Commented Mar 19, 2015 at 10:55

1 Answer 1

2

With like 5min work reading :help airline I now realize airline is super customizable. I added the following to my .vimrc which replaces the line number percentage 33%  44: 2 (which I never use) with the current filename:

let g:airline_section_z = '%t'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.