Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOptionally unindent when typing "}" at the beginning of a line #393
Comments
|
I think you are requesting the feature which removes an indent when typing "}"? |
This is what the indentation looks like now.
This is what i would like it to be. |
|
You want the second indentation, and that can be achieved by the feature I described (remove an indent when typing "}"). If you think that's what you want, reply with a simple "yes", otherwise, describe what you want exactly. |
|
Yes |
|
Seems like need to make changes in https://github.com/Megaxela/QCodeEditor |
We use QCodeEditor as submodule. We have our own fork of the above repository. So you need to make change to https://github.com/cpeditor/QCodeEditor and propose a PR to master branch. We will take care of updating the same for cpeditor. |
You can add some codes around here: When "}" is pressed, you can check whether the cursor has no selection and is at the beginning of the current line (all characters before it are whitespaces), and use You can ask us if you have any questions, and we'll help you to improve the codes when your PR is proposed. Looking forward to your pull request! |
|
@allcontributors add @sahil-ra as a contributor for the idea. |
|
I've put up a pull request to add @sahil-ra! |
Working on it. Thanks for the info. |
|
I am able to implement this. But I need to store the previous position of the opening curly brace("{") to make it work more better which will take more time. |
|
You can open up a draft PR and we will review or suggest and help you in improving your changes. |
|
Created PR:- cpeditor/QCodeEditor#22 |
Is your feature request related to a problem? Please describe.
When I turn off auto-completion, the indentation of the closing bracket is not correct.
e.g :
There is a tab space there when closing the bracket.
Geany, does the indentation correct for reference.
Describe the solution you'd like
When closing the bracket, it should align with the opening bracket.
e.g:
Describe alternatives you've considered
Additional context