Open pjg opened 12 years ago
There is a test in endwise.vim which invokes/includes the previously defined mapping:
elseif maparg('<CR>','i') =~ '<CR>'
exe "imap <script> <C-X><CR> ".maparg('<CR>','i')."<SID>AlwaysEnd"
exe "imap <script> <CR> ".maparg('<CR>','i')."<SID>DiscretionaryEnd"
Considering the recommended mapping of inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
this will result in the text itself being inserted.
This could maybe be solved by endwise checking for the mapping to be a script (e.g. via maparg's dict option/mode) and acting accordingly (if that is possible), by using another mapping method with neocomplcache (e.g. without " Githubissues.
This is cross-posting from neocomplcache issues as recommended by @Shougo.
Note that I'm also using vim-endwise. Using the recommended snippet from
doc/neocomplcache.txt
(see 351a2f102460):when pressing enter when choosing autocompletion from the menu it selects this autocompletion and also moves you to the next line (i.e.
<CR>
is literally inserted), while using the previous snippet for<CR>
mapping in insert mode (inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
) without the vim-endwise plugin when pressing<cr>
in insert mode on autocomplete menu item it would only select the item from the autocompletion menu and would not insert a<cr>
in the code.Also note that using this snippet:
inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
conflicts with vim-endwise, which is issue #88.