1
0
Fork 0

Remove Git branch and mode name from status bar

This commit is contained in:
Иван Солнцев 2022-08-14 02:13:31 +03:00
parent 71af22c16a
commit fad049b35d
3 changed files with 7 additions and 13 deletions

View file

@ -73,11 +73,6 @@ function justmyrc#LessBehaviour()
if (!&modifiable || &ro) if (!&modifiable || &ro)
set nonumber set nonumber
set nospell set nospell
set laststatus=0
set cmdheight=1 set cmdheight=1
endif endif
endfunction endfunction
function justmyrc#GetGitBranch()
return system("git symbolic-ref --short HEAD 2> /dev/null | tr -d '\n'")
endfunction

View file

@ -14,7 +14,7 @@ hi LineNr cterm=none ctermfg=241 ctermbg=none
hi CursorLineNr cterm=bold ctermfg=250 ctermbg=237 hi CursorLineNr cterm=bold ctermfg=250 ctermbg=237
hi CursorLine cterm=none ctermbg=234 hi CursorLine cterm=none ctermbg=234
hi Folded cterm=none ctermfg=93 ctermbg=none hi Folded cterm=none ctermfg=93 ctermbg=none
hi ModeMsg cterm=none ctermfg=0 ctermbg=14 hi ModeMsg cterm=none ctermfg=0 ctermbg=215
hi NonText ctermfg=215 hi NonText ctermfg=215
hi Visual ctermbg=241 hi Visual ctermbg=241
hi ColorColumn ctermbg=235 hi ColorColumn ctermbg=235

13
vimrc
View file

@ -21,19 +21,18 @@ set hlsearch
set wildmenu set wildmenu
"Не показывать режим (он отображается в кастомной строке статуса) "Не показывать режим (он отображается в кастомной строке статуса)
set noshowmode "set noshowmode
"Настройки строки статуса "Настройки строки статуса
set laststatus=2 set laststatus=2
set statusline= set statusline=
set statusline+=%#StatusLineEditorMode#\ %{justmyrc#GetMode()}\
set statusline+=%#StatusLineBranchName#\ %{justmyrc#GetGitBranch()}\
set statusline+=%#StatusLineFileFormat#%{&ff}\
set statusline+=%#StatusLineEmpty#%=
set statusline+=%#StatusLineReadOnlyFlag#\ %r\
set statusline+=%#StatusLineEncoding#\ %{&fileencoding?&fileencoding:&encoding}\
set statusline+=%#StatusLineFileType#\ %{&ft}\ set statusline+=%#StatusLineFileType#\ %{&ft}\
set statusline+=%#StatusLineFileFormat#\ %{&ff}\
set statusline+=%#StatusLineEmpty#%=
set statusline+=%#StatusLineReadOnlyFlag#\ %r
set statusline+=%#StatusLineEncoding#\ %{&fileencoding?&fileencoding:&encoding}\
set statusline+=%#StatusLineFileType#\ %v:%l\ (%p%%)\
"Выключает перенос строк "Выключает перенос строк
set nowrap set nowrap