when using multiple splits in a window I keep looking at the top of the split (window) to see what file is in there. just can't force myself to change the habit, as it is re-enforced by any other program out there. tabs are usually at the top...

anyway, is there a way to put the statusline on top?

  • ? You could just do :e right? Doesn't that tell you what file you are writing to, how many lines it is, etc. in the command/status bar at the bottom? Hmm, :f works, too. Also ctrl + g works the same as :f – dylnmc May 17 '15 at 7:25

Nope ....

well, you can always download vim's sources, and go from there, but natively, no. Not that I know.

However, you say, you're looking at the top of the split to see what file is in there ? Why is that ? You can easily put all the buffer / file information in your statusline, and display it for every split out there (laststatus=2).

As far as tabs go, they were introduced under some pressure on vim's creator, but are rarely encouraged, as the way which to handle files in vim. Vim's "natural" way has always been window split + buffer manipulation.

  • 3
    I already have laststatus=2 and it does include the the filename. but when I have multople splits and I'm looking at the status line between 2 vertical splits, my instincts (conditioned by years of using tabs which are on top) associate the file name with the split that is at the bottom, not at the top and I need to consciously correct it all the time, which is kind of annoying :) – Vitaly Kushner Feb 23 '10 at 3:16
  • @Vitaly Kushner - yeah, sorry, no help there. Leave the question open for a while; there are a few very knowledgable vimmers in here, but I think on this, they'll tell the same. The only thing apart from what is written, which I can recommend in that situation, is maybe turning off the statusline (for but the active window) and relying on the tab line for the filename. Also the statusline that way, is a good indicator of both activity and the current file. – Rook Feb 23 '10 at 3:37

Yes, you can install this Plugin from:

https://github.com/vim-airline/vim-airline and apply this setting in your .vimr:

let g:airline_statusline_ontop = 1

status bar in top


In the impossibility to move the status line to the top as it was stated on the accepted answer, this might help.

Set this on your vim config:

set title - will set the title on the current file on the terminal window at the top

let mapleader="\<space>" - defines a leader key to enter your own defined shortcuts mappings

nnoremap <Tab> :bnext<CR> - goes to next buffer by pressing Tab

nnoremap <S-Tab> :bprevious<CR> - goes to previous buffer by pressing Shift+Tab

bling/vim-bufferline - use the bufferline plugin to always get a list of your opened buffers at the bottom

nonoremap <leader>1 :b1<CR>

nonoremap <leader>2 :b2<CR>

nonoremap <leader>N :bN<CR>...

get to the buffer you want just pressing space + number

One thing that I'm looking for though is to have one directory up in conjunction with the filename on bufferline list. According to its docs it would be change on let g:bufferline_fname_mod = ':t' and looking at the :h filename-modifiers it would be let g:bufferline_fname_mod = ':p:.' but I didn't have success in that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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