diff options
| author | Thomas Schmucker <ts@its1.de> | 2025-12-22 17:28:43 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2025-12-22 17:28:43 +0100 |
| commit | 6f6457b7397247a34e25d4d9bfca434d8306283e (patch) | |
| tree | 2b9d9ab2580d7fe5d6f2be31eb34c1899b7ffcd8 /nvim_alt/statusline.vim | |
| parent | d662ef8d258234b6602cae1b1d9060f71d29e9c1 (diff) | |
| download | dotfiles-6f6457b7397247a34e25d4d9bfca434d8306283e.tar.gz dotfiles-6f6457b7397247a34e25d4d9bfca434d8306283e.tar.bz2 dotfiles-6f6457b7397247a34e25d4d9bfca434d8306283e.zip | |
Backup: Alte Neovim-Konfiguration
Diffstat (limited to 'nvim_alt/statusline.vim')
| -rw-r--r-- | nvim_alt/statusline.vim | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nvim_alt/statusline.vim b/nvim_alt/statusline.vim new file mode 100644 index 0000000..069e632 --- /dev/null +++ b/nvim_alt/statusline.vim | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | " Statusline | ||
| 2 | function! GitBranch() | ||
| 3 | return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") | ||
| 4 | endfunction | ||
| 5 | |||
| 6 | function! StatuslineGit() | ||
| 7 | let l:branchname = GitBranch() | ||
| 8 | return strlen(l:branchname) > 0?' '.l:branchname.' ':'' | ||
| 9 | endfunction | ||
| 10 | |||
| 11 | let g:currentmode={ | ||
| 12 | \ 'n' : 'n', | ||
| 13 | \ 'v' : 'v', | ||
| 14 | \ 'V' : 'vl', | ||
| 15 | \ '' : 'vb', | ||
| 16 | \ 'i' : 'i', | ||
| 17 | \ 'R' : 'r', | ||
| 18 | \ 'Rv' : 'rv', | ||
| 19 | \ 'c' : 'c', | ||
| 20 | \ 't' : 'f', | ||
| 21 | \} | ||
| 22 | |||
| 23 | set laststatus=2 | ||
| 24 | set statusline= | ||
| 25 | set statusline+=%#PmenuSel# | ||
| 26 | set statusline+=%{StatuslineGit()} | ||
| 27 | set statusline+=%#Statusline# | ||
| 28 | set statusline+=\ %f | ||
| 29 | set statusline+=%m | ||
| 30 | set statusline+=%= | ||
| 31 | set statusline+=%#StatusLineNc# | ||
| 32 | set statusline+=\ %y | ||
| 33 | set statusline+=\ %{&fileencoding?&fileencoding:&encoding} | ||
| 34 | set statusline+=\ %p%% | ||
| 35 | set statusline+=\ %l:%c | ||
| 36 | |||
