Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Expand_cr not working. #111

Closed
sddhrthrt opened this Issue Nov 24, 2012 · 8 comments

Comments

Projects
None yet
5 participants

I installed spf13-vim and then added delimitMate because no other comes nearly close to delimitMate.

But i cannot get the expand_cr working, which is annoying.

I have vim 7.3.429, and I have set

inoremap <Tab> <C-R>=delimitMate#JumpAny("\<C-Tab>")<CR>
let g:delimitMate_expand_cr=1
let g:delimitMate_expand_space=1

in my .vimrc.

Owner

Raimondi commented Dec 18, 2012

I'm sorry it took me this long to reply. What's the output of the following commands:

:verb imap <Space>
:verb imap <CR>

i @delimitMateSpace
Last set from
~/dotfiles/vim/bundle/delimitMate/plugin/delimitMate.vim
i * pumvisible() ? neocomplcache#close_popup() : ""
Last set from ~/.vimrc

On Tue, Dec 18, 2012 at 9:39 PM, Israel Chauca Fuentes <
notifications@github.com> wrote:

I'm sorry it took me this long to reply. What's the output of the
following commands:

:verb imap
:verb imap


Reply to this email directly or view it on GitHubhttps://github.com/Raimondi/delimitMate/issues/111#issuecomment-11492957.

Owner

Raimondi commented Dec 19, 2012

That's why, <CR> is being mapped in your vimrc. Try replacing that mapping in your vimrc with the following:

imap <expr> <CR> pumvisible() ? neocomplcache#close_popup() : '<Plug>delimitMateCR'

Updated the mapping as noted by @slindberg

@Raimondi Raimondi closed this Feb 9, 2013

To anyone that runs across this thread and tries the <expr> mapping solution, the plugin mapping currently begins with a lowercase 'd'. With the above, the mapping can't resolve and <Plug>DelimitMateCR gets inserted into your buffer. It should probably be:

imap <expr> <CR> pumvisible() ? neocomplcache#close_popup() : '<Plug>delimitMateCR'
Owner

Raimondi commented Feb 9, 2013

I have updated the mapping, glad you saw that.

no problems :)

On Sat, Feb 9, 2013 at 10:23 AM, Israel Chauca Fuentes <
notifications@github.com> wrote:

I have updated the mapping, glad you saw that.


Reply to this email directly or view it on GitHubhttps://github.com/Raimondi/delimitMate/issues/111#issuecomment-13326465..

artfulrobot commented Nov 1, 2016

With neocomplete I now need to use this:

imap <expr> <CR> pumvisible() 
                 \ ? "\<C-y>\<CR>"
                 \ : '<Plug>delimitMateCR'

(I also learnt that inoremap won't work here.)

ktilcu commented Oct 19, 2017

I wanted to add to this issue for others that may get here like I did. delimitMate_expand_cr wasn't working for me because vim-endwise remapped <CR>. The troubleshooting command :verb imap <CR> made it very clear the endwise had last mapped the action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment