commit 26ef955be65d6003afba75bb3e19a5f27cfa4c69
parent 9e5ef32bac1154767f41bffba39f9a494fd4e99c
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Wed, 7 Nov 2018 14:49:45 +0100
Added extra options to status line
Display file type on the right. Also show tabs or spaces & the number of
spaces in a tab.
Diffstat:
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/vim/general.vimrc b/vim/general.vimrc
@@ -53,15 +53,17 @@ set t_Co=256
set mousemodel=popup
" Status bar
-set laststatus=2 " Always show status bar
-set statusline=\ %F " Full path
-set statusline+=\ %m%r%h%w " Flags (modified, readonly, help, preview)
-set statusline+=\ %y " File type
-set statusline+=\ \ CWD:\ %r%{getcwd()}%h " Current working directory
-set statusline+=%= " Left/right separator
-set statusline+=\ %l/%L\ " cursor line/total lines
-set statusline+=\ B%n " Buffer number
-set statusline+=\ \ %{strftime(\"%H:%M\")} " time
+set laststatus=2 " Always show status bar
+set statusline=\ %F " Full path
+set statusline+=\ %m%r%w " Flags (modified, readonly, help, preview)
+set statusline+=\ \ CWD:\ %r%{getcwd()}%h " Current working directory
+set statusline+=%= " Left/right separator
+set statusline+=\ %y " File type
+set statusline+=\ [%{&expandtab?'spaces':'tabs'}, " Using spaces or tabs
+set statusline+=%{strlen(&tabstop)?&tabstop:'none'}] " Spaces in a tab
+set statusline+=\ %l/%L\ " Cursor line/total lines
+set statusline+=\ B%n " Buffer number
+set statusline+=\ \ %{strftime(\"%H:%M\")} " Time
" Set 80-char column (off by default)
" set colorcolumn=80