dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 23921bc26fdecfa3390f9e4fc61788f05b6e8a50
parent c54827391f444ea4f11e8fba8b63380cd635461e
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Mon,  4 May 2020 23:17:04 +0200

vim: modify statusline & add vimtex indicator

Former-commit-id: bbcf346fd6a84208509321955ef8a8fd1d8a5892
Diffstat:
Mvim/autoload/statusline.vim | 8++++++++
Mvim/plugin/statusline.vim | 3+++
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/vim/autoload/statusline.vim b/vim/autoload/statusline.vim @@ -78,3 +78,11 @@ endfunction function! statusline#StatuslineWordCount() return wordcount().words . " words" endfunction + +function! statusline#StatuslineVimtexCompiler() + if exists('b:vimtex.compiler') && b:vimtex.compiler.is_running() + return '⚙︎' + endif + return '' +endfunction + diff --git a/vim/plugin/statusline.vim b/vim/plugin/statusline.vim @@ -7,8 +7,10 @@ let g:loaded_statusline = 1 set laststatus=2 " Always show status bar set statusline=%#statuslinenormmode#%{(mode()=='n')?'\ \ N\ ':''} " Normal mode indicator set statusline+=%#DiffAdd#%{(mode()=='i')?'\ \ I\ ':''} " Insert mode indicator +set statusline+=%#DiffAdd#%{(mode()=='t')?'\ \ T\ ':''} " Insert mode indicator set statusline+=%#DiffDelete#%{(mode()=='r')?'\ \ R\ ':''} " Replace mode indicator set statusline+=%#Todo#%{(mode()=='v')?'\ \ V\ ':''} " Visual mode indicator +set statusline+=%#Todo#%{(mode()=='s')?'\ \ S\ ':''} " Visual mode indicator set statusline+=%#statuslinefile#\ %f\ %* " Relative path and filename set statusline+=%(\ %m%r%w\ %) " Flags (modified, readonly, help, preview). don't show if empty. set statusline+=%#error# " Start error highlighting @@ -20,6 +22,7 @@ set statusline+=%< " Start tru set statusline+=\ %{statusline#StatuslineBuildCwd()}\ " Current working directory, replacing home with ~ set statusline+=%#statuslinefile# " Highlight same as filename set statusline+=%(\ %{&spell?'[spell]\ ':''}%) " Show spellcheck status +set statusline+=%(\ %{statusline#StatuslineVimtexCompiler()}%) set statusline+=\ %y " File type set statusline+=\ [%{&expandtab?'spaces':'tabs'}, " Using spaces or tabs set statusline+=%{statusline#StatuslineSpacesUsed()}] " Spaces in a tab