From e43e0be9deca1b7057c7561939fc21b945c6ff11 Mon Sep 17 00:00:00 2001 From: arielherself Date: Wed, 1 Jan 2025 01:04:31 +0800 Subject: [PATCH] fix(vim): fix some stuff --- .vimrc | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index 848bc9e..0c62dba 100644 --- a/.vimrc +++ b/.vimrc @@ -52,7 +52,7 @@ set wildmenu set wildoptions=fuzzy,pum if has('nvim') set signcolumn=yes:2 - set cmdheight=0 + " set cmdheight=0 set pumblend=40 set winblend=40 endif @@ -154,7 +154,7 @@ let g:lsp_document_highlight_delay = 0 let g:lsp_preview_max_width = 50 let g:lsp_diagnostics_float_cursor = 1 let g:lsp_diagnostics_float_delay = 500 -let g:lsp_preview_autoclose = 0 +let g:lsp_preview_autoclose = 1 let g:lsp_float_max_width = 50 let g:lsp_inlay_hints_enabled = 1 let g:lsp_diagnostics_virtual_text_padding_left = 12 @@ -189,7 +189,11 @@ endfunction let g:asyncomplete_preprocessor = [function('s:truncate_labels')] " Personal keybindings -tnoremap N +if !has('nvim') + tnoremap N +else + tnoremap +endif nnoremap w (easymotion-bd-w) vnoremap w (easymotion-bd-w) nnoremap o Files @@ -217,6 +221,7 @@ if has('nvim') else nnoremap ` splitterm ++curwin zsh endif +nnoremap x %s/\s\+$//e """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Bclose @@ -310,5 +315,20 @@ let g:auto_save = 0 " recover cursor shape autocmd VimLeave * silent !echo -ne "\e[6 q" +" fix split line color +set fillchars+=vert:\│ +highlight VertSplit cterm=NONE +highlight VertSplit guifg=#585273 + +" airline styling +" ref: https://github.com/vim-airline/vim-airline/issues/323#issuecomment-27336312 +let g:airline_left_sep = '' +let g:airline_left_alt_sep = '' +let g:airline_right_sep = '' +let g:airline_right_alt_sep = '' + +" fix c++ comment style in Neovim +autocmd FileType cpp setl commentstring=//\ %s + " Why?! set noshowmode