vim-endwise icon indicating copy to clipboard operation
vim-endwise copied to clipboard

Improve setup of mappings

Open blueyed opened this issue 11 years ago • 1 comments

  • Use <unique> maps, catch already-exists error and provide help
  • Prefer remapping of <Plug> over <CR>
  • Only call maparg once

blueyed avatar Feb 03 '14 20:02 blueyed

Hi blueyed, I'm trying to get endwise to work with neocomplete, which I use the following mapping with, in order to use <CR> to accept the first autosuggestion:

imap <silent> <expr> <CR> <SID>my_cr_function()
function! s:my_cr_function()
  return pumvisible() ? "\<c-y>\<Plug>(neosnippet_expand_or_jump)" : "\<CR>"
endfunction

I've tried your patch, and I get the endwise: not overwriting existing map (mapping already exists for ^M). error with it. Can you suggest a solution? Thanks.

jonahx avatar Jan 15 '16 07:01 jonahx