From da7ed32dc51735766944436c96d03a7d6822f659 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 6 Jan 2010 17:42:05 +0100 Subject: [PATCH] vimrc: Add custom 'statusline'. --- vimrc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index c8ce11f..2823246 100644 --- a/vimrc +++ b/vimrc @@ -106,7 +106,8 @@ set background=dark " 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 . set ruler " Display partial commands in the status line. set showcmd @@ -124,9 +125,27 @@ if v:version >= 700 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 -- 2.45.2