From 8a160217ad42ab0c7a5da37bb546a3eaaefe782d Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 25 May 2018 00:16:54 +0200 Subject: Added conditional indicators (spellcheck) to statusbar --- vimrc-full | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/vimrc-full b/vimrc-full index 5c921fb..1e3f65e 100644 --- a/vimrc-full +++ b/vimrc-full @@ -1139,10 +1139,9 @@ augroup status \ ."%(%w%h%q\ %{ModeString()}%)" \ ."%-2{nr2char(0xe621)}" \ ."%{(&readonly\ ?\ '\ \ \ '\ :\ '')}" - \ ."%{(&modified\ ?\ nr2char(0xF0C7).'\ '\ :\ '')}" - \ ."%(\ %{fnamemodify(getcwd(),\ ':~')}\ %)" - \ ."%{nr2char(0xf44a)}" - \ ."%(\ %f\ %)" + \ ."%{(&modified\ ?\ nr2char(0xF0C7).'\ '\ :\ '')\ }" + \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ ''\ :\ fnamemodify(getcwd(),\ ':~').nr2char(0xf44a))}\ " + \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ b:term_title\ :\ bufname('%'))\ }" \ ."%#".l:invert_group."#" \ ."%{nr2char(0xE0B4)\ }" \ .'' @@ -1152,12 +1151,11 @@ augroup status \ ."%{nr2char(0xE0B6)}" \ ."%#".a:highlight_group."#" \ ."%1(%)" - \ ."%{\ &filetype}" + \ ."%{(&filetype\ !=\ ''\ ?\ &filetype\ :\ &buftype)}" \ ."%(\ %{nr2char(0xe621)}\ %)" \ ."%{(&spell\ ?\ &spelllang.' '.nr2char(0xe621)\ :\ '')}" - \ ."%{&fileencoding}" - \ ."%(\ %{nr2char(0xe621)}\ %)" - \ ."%{&fileformat}" + \ ."%{(&fileencoding\ !=\ ''\ ?\ &fileencoding.' '.nr2char(0xe621)\ :\ '')}" + \ ."%{(&fileformat\ !=\ ''\ ?\ &fileformat\ :\ '')}" \ ."%(\ %{nr2char(0xe621)}\ %)" \ ."%4l:%-4c" \ ."%(\ %{nr2char(0xe621)}\ %)" -- cgit v1.2.3