" Display line numbers.
set number
-" Display the ruler with current line/file position.
+" Display the ruler with current line/file position. If 'statusline' is used
+" then this only affects <C-g>.
set ruler
" Display partial commands in the status line.
set showcmd
set listchars+=nbsp:!
endif
-" Always display the status line even if there is only one window.
if has('statusline')
+ " Always display the status line even if there is only one window.
set laststatus=2
+
+ set statusline=
+ " on the left
+ set statusline+=%02n: " buffer number
+ set statusline+=%f\ " path to current file in buffer
+ set statusline+=%h " [help] if buffer is help file
+ set statusline+=%w " [Preview] if buffer is preview buffer
+ set statusline+=%m " [+] if buffer was modified,
+ " [-] if 'modifiable' is off
+ set statusline+=%r " [RO] if buffer is read only
+
+ " on the right
+ set statusline+=%= " right align
+ set statusline+=%-12.(%l,%c%V%)\ " line number (%l),
+ " column number (%c),
+ " virtual column number if different
+ " than %c (%V)
+ set statusline+=%P " position in file in percent
endif