My vim configuration
git clone https://mcol.xyz/code/vim-misc
Log | Files | Refs | README

commit 456b9661cdfbb29471f52b1758c8fa7e4c2c59c0
parent 0dcd1a9d6e7f2ea6d34e4919a8b0b66b2a7250e1
Author: mcol <mcol@posteo.net>
Date:   Tue, 26 Feb 2019 20:47:34 +0000

add root@hostname indicator to status line when run as root user

Diffstat:
Mplugin/theme.vim | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/plugin/theme.vim b/plugin/theme.vim @@ -5,6 +5,10 @@ " statusline set laststatus=2 " always show status bar set statusline = +if $USER == 'root' + let hostname = hostname() + exec 'set statusline +=%7*\ ' . $USER . '@' . hostname . '\ %*' +endif if ! empty($TMUX) set statusline +=%6*%* endif @@ -20,6 +24,7 @@ hi User3 ctermfg=0 ctermbg=14 cterm=none hi User4 ctermfg=0 ctermbg=2 cterm=none hi User5 ctermfg=0 ctermbg=3 cterm=none hi User6 ctermfg=3 ctermbg=5 cterm=none +hi User7 ctermfg=0 ctermbg=9 cterm=none " tab bar hi TabLineFill ctermfg=0 ctermbg=1