Skip to content
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

AutoPairsMapCR conflicts with neocomplete #91

Open
marlun opened this issue Aug 15, 2014 · 1 comment
Open

AutoPairsMapCR conflicts with neocomplete #91

marlun opened this issue Aug 15, 2014 · 1 comment

Comments

@marlun
Copy link

marlun commented Aug 15, 2014

You can take a look here Shougo/neocomplete.vim#281 for a problem summary. The AutoPairsMapCR conflicts with neocomplete in a way shown here https://cloudup.com/coUNwukTSRj

In the following code X stands for the cursor. My starting point is the following code:

Plugin 'sjl/gundo.vim'
X

I want to be able to write

Plugin 'sjl/gundo.vim'
Plugin 'ShoX'

get the neocomplete popup window, hit ENTER to select the chosen item and get

Plugin 'sjl/gundo.vim'
Plugin 'ShougoX'

but still be able to use auto-pairs functionality to change

... {X}

into the following

... {
  X
}

You can read more about it on the neocomplete issue Shougo/neocomplete.vim#281

I can write more about the problem here if you're not OK with reading the neocomplete issue.

Also, I'm aware of #16 but it does not seem to help me.

@ysolis
Copy link

ysolis commented Aug 23, 2016

I use deoplete (from the same author of neocomplete for vim 7.x but for NeoVim), neosnippets and autopairs. I did have the original problem described in Shougo/neocomplete.vim#281 and yes, this problem did "resolve" with:

let g:AutoPairsMapCR=0

Now, for recover the AutoPairsMapCR functionality, I wrote this in my config (must be modified for vim with neovim but this have the idea):

let g:AutoPairsMapCR=0
imap <expr><CR> pumvisible() ? deoplete#mappings#close_popup() : "\<CR>\<Plug>AutoPairsReturn"

You can use this like base for a config change in vim. The only condition is that AutoPairsReturn only can be used alone in vim 7.4+ or neovim 1.4+, I think that must be more complicated with 7.3/7.2/old versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants