diff options
author | ben <ben@nagy.contact> | 2025-05-03 14:25:55 -0700 |
---|---|---|
committer | ben <ben@nagy.contact> | 2025-05-03 14:25:55 -0700 |
commit | dec61653987f584822f87515281e9f82aaac972f (patch) | |
tree | f357e6fe4254ceb3da5cff9788127308cc3d8b6f /config/nvim-archive/external_settings/status-line.vim | |
parent | 0670c4910a615244900af884a7919509d99e2176 (diff) |
old neovim config
Diffstat (limited to 'config/nvim-archive/external_settings/status-line.vim')
-rw-r--r-- | config/nvim-archive/external_settings/status-line.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/config/nvim-archive/external_settings/status-line.vim b/config/nvim-archive/external_settings/status-line.vim new file mode 100644 index 0000000..b2b4d94 --- /dev/null +++ b/config/nvim-archive/external_settings/status-line.vim @@ -0,0 +1,31 @@ +function! GitBranch() + return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") +endfunction + +function! StatuslineGit() + let l:branchname = GitBranch() + return strlen(l:branchname) > 0?' '.l:branchname.' ':'' +endfunction + + +set number " Show line number +set statusline= " Enable status line +set statusline+=%{StatuslineGit()} +set statusline +=%1*\ %n\ %* " buffer number +set statusline +=%5*%{&ff}%* " file format +set statusline +=%3*%y%* " file type +set statusline +=%4*\ %<%{expand('%:p:h')}/%* " full path excluding file name +set statusline+=\%f " file name +set statusline +=%2*%m%* " modified flag +set statusline +=%1*%=%5l%* " current line +set statusline +=%2*/%L:%* " total lines +set statusline +=%1*%1v\ %* " virtual column number +set statusline +=%1*\ %* " add a space for separation +set statusline +=%2*%{char2nr(getline('.')[col('.')-1])}\ %* " character under cursor ASCII code" + + +"set statusline +=%4*\ %<%F%* " full path +"set statusline +=%2*0x%02B\ %* " character under cursor hexadecimal +"set statusline +=%8*\ [%{strftime('%u/%d/%m/%y\ %R:%S\')}\] " Date & Time +"set statusline +=%8*\ [%{strftime('%u/%d/%m/%y')}] " Just the date +"set statusline+=%#PmenuSel# |