Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@doitian
Created July 26, 2021 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doitian/e2c67ef19bf7c3eb4a3262eacfb0741f to your computer and use it in GitHub Desktop.
Save doitian/e2c67ef19bf7c3eb4a3262eacfb0741f to your computer and use it in GitHub Desktop.
tpope/vim-endwise + hrsh7th/nvim-compe
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