# HG changeset patch # User zegervdv # Date 1598855632 -7200 # Node ID 3c5523f18d0a1a65549f49acb36b7afc6854637e # Parent a795980b700ed077e93c74716d3c5f65b77ebff1 Clean up autocomplete options diff -r a795980b700e -r 3c5523f18d0a dot_config/nvim/init.vim --- a/dot_config/nvim/init.vim Sun Aug 30 17:34:32 2020 +0200 +++ b/dot_config/nvim/init.vim Mon Aug 31 08:33:52 2020 +0200 @@ -59,7 +59,7 @@ " Brackets Plug 'tpope/vim-surround' Plug 'raimondi/delimitMate' -Plug 'tommcdo/vim-exchange' +Plug 'zegervdv/vim-endwise' " Formatting Plug 'junegunn/vim-easy-align', { 'on' : [] } @@ -1205,27 +1205,19 @@ return !col || getline('.')[col - 1] =~# '\s' endfunction -" inoremap -" \ pumvisible() ? "\" : -" \ check_back_space() ? "\" : -" \ coc#refresh() -" inoremap pumvisible() ? "\" : "\" -" " Use to confirm completion, `u` means break undo chain at current position. -" " Coc only does snippet and additional edit on confirm. -" inoremap pumvisible() ? "\" : "\u\" -" " Or use `complete_info` if your vim support it, like: -" " inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" -" autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif -" Use and to navigate through popup menu -" inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" " Auto close popup menu when finish completion autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ completion#trigger_completion() + +" Use and to navigate through popup menu +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" + +" Set completeopt to have a better completion experience +set completeopt=menuone,noinsert,noselect + +" Avoid showing message extra message when using completion +set shortmess+=c let g:completion_enable_snippet = 'UltiSnips' "Fallback for https://github.com/Raimondi/delimitMate expanding on enter