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

Does not play along with c-toggle-auto-newline #79

Closed
llvilanova opened this issue Apr 18, 2013 · 5 comments
Closed

Does not play along with c-toggle-auto-newline #79

llvilanova opened this issue Apr 18, 2013 · 5 comments

Comments

@llvilanova
Copy link

Not sure if it will ever, though, as c-toggle-auto-newline is also trying to perform text insertions.

@Fuco1
Copy link
Owner

Fuco1 commented Apr 18, 2013

Well, basically, this can be simulated with SP's post-action hooks (it's one of the reasons they exist). I'd be cool if someone wrote a C/C++ setup I could include in the default implementation (like the extra latex support). I guess it would need multiple styles (k&r/GNU etc.) but that can be extended gradually. Possibly reusing built-in C/C++ mode flags would be a bonus.

Here's an example for the { brace, using "java" style: https://github.com/Fuco1/smartparens/wiki/Permissions#wiki-pre-and-post-insertion-hooks

@llvilanova
Copy link
Author

Yes, but cc-mode already has lots of language+style specific formatting goodies. I just hoped there could be a way they could all play along, but I suppose that was asking for too much :)

Feel free to close this issue.

@Fuco1
Copy link
Owner

Fuco1 commented Apr 18, 2013

Well, it's not easily possible, because the c-electric-whatever hard-binds the keys. In theory, I could work around it using some hacks. But I don't have time to do the research now, unfortunately.

@llvilanova
Copy link
Author

Yes, I looked at the code and didn't look simple to fix to me either.

@Fuco1
Copy link
Owner

Fuco1 commented Apr 23, 2013

This will be partially solved by implementing #80. If you have some ideas regarding that, please post them there. I'm going to close this issue for now.

@Fuco1 Fuco1 closed this as completed Apr 23, 2013
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