From 290247d424e6a91fa04b69a1c17ace583bd92290 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Wed, 25 Jan 2023 10:47:00 -0700 Subject: update some vim stuff mostly --- vim/.vimrc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index e81cf09..cd27085 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -15,6 +15,8 @@ call plug#begin() Plug 'preservim/nerdtree' Plug 'itchyny/vim-gitbranch' Plug 'tpope/vim-commentary' + Plug 'godlygeek/tabular' + Plug 'preservim/vim-markdown' call plug#end() @@ -51,6 +53,9 @@ let g:python_recommended_style = 0 let g:NERDTreeFileExtensionHighlightFullName = 1 let g:NERDTreeExactMatchHighlightFullName = 1 let g:NERDTreePatternMatchHighlightFullName = 1 +let g:org_heading_shade_leading_stars = 0 +let g:vim_markdown_folding_disabled = 1 +let g:vim_markdown_new_list_item_indent = 2 " colorscheme stuff colorscheme gruvbox @@ -90,10 +95,11 @@ autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTa " Open the existing NERDTree on each new tab. autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif -" turn on spell checker for all markdown files +" turn on spell checker for certain files autocmd FileType markdown setlocal spell +autocmd FileType org setlocal spell hi clear SpellBad -hi SpellBad cterm=underline +hi SpellBad cterm=underline ctermbg=DARKRED hi clear SpellRare hi SpellRare cterm=underline hi clear SpellCap @@ -103,12 +109,17 @@ hi SpellLocal cterm=underline " Coc remaps inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : \ coc#refresh() -inoremap pumvisible() ? "\" : "\" +inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" -function! s:check_back_space() abort +" Make to accept selected completion item or notify coc.nvim to format +" u breaks current undo, please make your own choice +inoremap coc#pum#visible() ? coc#pum#confirm() + \: "\u\\=coc#on_enter()\" + +function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction -- cgit v1.2.3