-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enter conflicts with neocomplcache #22
Comments
There is a test in endwise.vim which invokes/includes the previously defined mapping:
Considering the recommended mapping of 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 "<script>" but with "="), or by handing neocomplcache explicitly in endwise. |
See also ervandew/supertab@c6d704c for inspiration. |
@blueyed that is a good pointer! I was using supertab previously with vim-endwise without any problems. |
Appreciate your effort! I have moved on to YouCompleteMe+Eclim for my tab-completion needs, though (cannot beat java parsing my ruby code and presenting me the best tab-completions possible). |
Great.
|
Seem to have this same problem with YouCompleteMe actually |
@chrisnicola (I am using a custom function, where I chain multiple plugins:)
|
@blueyed I know this is an old issue but I had to message you because this previous comment was the key for me and kept me from throwing my laptop out the window. Thank you so much for putting this here. ❤ |
I'm also experiencing this. It conflicts with coc.nvim causing hitting to result in printing out the expression to the buffer: before hitting enter for completion:
after:
The coc.nvim mapping definition is: inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" After endwise remaps it,
|
Is it possible to fix this inside this library? I had to disable it because I'm using CoC, but I really miss it. |
I also use Coc, and I'm having the same problem @bjeanes described :/ Is at least any workaround on this? For now, I disabled vim-endwise, but I'd like to continue using it |
inoremap <expr> <Plug>CustomCocCR pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
imap <CR> <Plug>CustomCocCR<Plug>DiscretionaryEnd Here's my solution to the CoC problem. Seems to work fine. |
That only writes def foo
<Plug>DiscretionaryEnd Did you miss some characters here? Maybe some literal escape characters? |
Make sure that all the modifiers to the mapping commands are correct. The Here is a test set rtp+=~/.vim
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-endwise'
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
call plug#end()
let g:endwise_no_mappings = v:true
inoremap <expr> <Plug>CustomCocCR pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
imap <CR> <Plug>CustomCocCR<Plug>DiscretionaryEnd |
vim-endwise mappings conflict with coc.nvim recommended mappings. autocompletion and colorscheme plugins rely on filetype plugins to provide syntax context for the current buffer. Port solution from tpope/vim-endwise#22 (comment) to make both work together.
vim-endwise mappings conflict with coc.nvim recommended mappings. autocompletion and colorscheme plugins rely on filetype plugins to provide syntax context for the current buffer. Port solution from tpope/vim-endwise#22 (comment) to make both work together.
I'm so glad I found this issues. I love this plugin and I really like coc. Some of you may like let g:endwise_no_mappings = v:true
inoremap <expr> <Plug>CustomCocCR pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
imap <CR> <Plug>CustomCocCR<Plug>DiscretionaryEnd To auto-select the first completion item and notify coc.nvim to |
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.The text was updated successfully, but these errors were encountered: