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

Ability to automatically insert an opening curly bracket with proper indentation, without needing to press <CR> #490

Open
MonsieurTib opened this issue Dec 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@MonsieurTib
Copy link

MonsieurTib commented Dec 28, 2024

Is your feature request related to a problem? Please describe.
I'm trying to automatically add a closing curly bracket with proper indentation and a new line, without needing to press CR

Describe the solution you'd like
{
    |
}
after a '{' press, without needing to press CR

Describe alternatives you've considered
I tried using a custom rule with the replace_endpair method, but the cursor ends up positioned after the closing curly bracket.

@MonsieurTib MonsieurTib added the enhancement New feature or request label Dec 28, 2024
@windwp
Copy link
Owner

windwp commented Jan 8, 2025

I think you need to use replace_map_cr function

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

No branches or pull requests

2 participants