Created
July 26, 2021 03:24
-
-
Save doitian/e2c67ef19bf7c3eb4a3262eacfb0741f to your computer and use it in GitHub Desktop.
tpope/vim-endwise + hrsh7th/nvim-compe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:endwise_no_mappings = 1 | |
inoremap <silent><expr> <CR> compe#confirm('<CR>') | |
inoremap <silent><expr> <A-/> compe#complete() | |
inoremap <silent><expr> <C-e> compe#close('<C-e>') | |
imap <silent><expr> <CR> | |
\ (pumvisible() ? | |
\ (complete_info()["selected"] == -1 ? "\<C-g>u\<CR>\<Plug>DiscretionaryEnd" : "\<C-y>") | |
\ : "\<CR>\<Plug>DiscretionaryEnd" ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment