diff options
| author | Xiao Pan <xyz@flylightning.xyz> | 2026-04-13 06:01:46 +0800 |
|---|---|---|
| committer | Xiao Pan <xyz@flylightning.xyz> | 2026-05-03 01:50:19 +0800 |
| commit | acfa0d4d212f9fdfaee23e6f26feb3a8865a82e8 (patch) | |
| tree | ea2838de910457c535dfa8e4911c80dcddd09d48 /home/xyz | |
| parent | 09dcd3062892b253f7fb34048142733db5309a4e (diff) | |
make nvim init.vim more compatible with vim
Diffstat (limited to 'home/xyz')
| -rw-r--r-- | home/xyz/.config/nvim/init.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim index bc124ca1..2be62cfe 100644 --- a/home/xyz/.config/nvim/init.vim +++ b/home/xyz/.config/nvim/init.vim @@ -112,8 +112,10 @@ augroup mycmd " https://github.com/neovim/neovim/pull/25336 " https://github.com/neovim/neovim/commit/29fe883aa9166bdbcae3f935523c75a8aa56fe45 " remove nvim.swapfile autocmd is more correct, without also works but I think it change to 'e' then to 'o' which is not ideal, also it will echo "W325: ..." which is not what I want - autocmd! nvim.swapfile - autocmd SwapExists * let v:swapchoice = 'o' + if has('nvim') + autocmd! nvim.swapfile + autocmd SwapExists * let v:swapchoice = 'o' + endif augroup END " :h markdown, for vim default tpope/vim-markdown @@ -213,6 +215,9 @@ map <leader>* /\*\*.*\*\*<CR> " toggle markdown folding and re-edit current file map <leader>m :call Md_toggle_fold()<CR> +" Consider vim need `set laststatus=2` to always show status line above +" command line, vim default to 1, nvim default to 2 +set laststatus=2 " Default statusline shows in the `:h statusline` first example: " set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P " |
