summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2026-04-13 05:48:12 +0800
committerXiao Pan <xyz@flylightning.xyz>2026-05-03 01:50:15 +0800
commit92eb3eaff79763a1ac24bd92a54ed41e24526be5 (patch)
tree55e078302f6b2e88ce4430e82c74022f7ef3b2fa
parent4f6ca66d0d12fb39c47b72aeb0196209bfd7cd2b (diff)
fix: nvim 0.12.1 config statusline need = at first
Before nvim 0.12.1, statusline+=%< as first works, now it needs = instead of += else it will show two statuline. statusline+=%< as first seems still work with new version of vim. It maybe because now nvim `: set statusline?` is not empty but at vim it is empty
-rw-r--r--home/xyz/.config/nvim/init.vim12
1 files changed, 10 insertions, 2 deletions
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim
index b5c7be08..4ef51aa7 100644
--- a/home/xyz/.config/nvim/init.vim
+++ b/home/xyz/.config/nvim/init.vim
@@ -213,8 +213,16 @@ map <leader>* /\*\*.*\*\*<CR>
" toggle markdown folding and re-edit current file
map <leader>m :call Md_toggle_fold()<CR>
-" default statusline:set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
-set statusline+=%<
+" Default statusline shows in the `:h statusline` first example:
+" set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
+"
+" nvim `:set statusline?` shows more stuffs, not sure why
+"
+" Before nvim 0.12.1, statusline+=%< as first works, now it needs = instead of
+" += else it will show two statuline. statusline+=%< as first seems still work
+" with new version of vim. It maybe because now nvim `:set statusline?` is not
+" empty but at vim it is empty
+set statusline=%<
set statusline+=%f " %F or 1CTRL+G to show full path
set statusline+=\ %m
set statusline+=%=