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

Pressing enter caused newline when the wildmenu is open #31

Open
ansman opened this issue Nov 22, 2013 · 3 comments
Open

Pressing enter caused newline when the wildmenu is open #31

ansman opened this issue Nov 22, 2013 · 3 comments

Comments

@ansman
Copy link

ansman commented Nov 22, 2013

I'm trying to use wildmenu for autocompletion but every time I try to select something in the dropdown xmledit inserts a newline.

Is there any way to disable this behaviour?

@sukima
Copy link
Owner

sukima commented Nov 23, 2013

I've never used wildmenu any chance you could help investigate? I really have no idea what behaviour is in use.

@ansman
Copy link
Author

ansman commented Nov 23, 2013

So the problem seems to be this line:

execute "inoremap <buffer> <expr> <cr> \"" . <SID>MoveCursor() . "\""

I'm really sure if it actually does something since removing it doesn't seem to remove any functionality.

@sukima
Copy link
Owner

sukima commented Nov 24, 2013

That mapping is to offer convinience when using multi-lined tags. For example, if you just completed a tag and you press enter then this mapping creates:

<tag>
    *cursor position
</tag>

Instead of

<tag>
    *cursor position</tag>

I think it would be a good idea with compatibility conflicts to offer some kind of configuration option to enable / disable this. Call for Pull-Request? 😁

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

No branches or pull requests

2 participants