#134 Customizing XBrackets's Behaviour


I would very much like it if it were possible to customize XBrackets more.

Right now, either you ask it to complete all kinds of brackets (Double quotation marks (!), square brackets, curly brackets, parentheses), either you ask it to complete nothing. However, to me and, I believe, to many people, auto-closing brackets are only relevant on kinds of brackets that often contain multiple lines of code. That is... {curly brackets} only. Since quotation marks, parentheses and square brackets are almost always followed by something else, be it a space or a semicolon, the automatically added closing one is very superfluous: it takes the very same time to type it normally than to press the right arrow key to skip it. Some people might want to disable it for some or most kinds of brackets, and I'm definitely one of them.

Also, it might be nice to have it create closing curly brackets in the right place and with the right timing, instead of always right next to it. I do not like Adobe Flash Professional much, but this one feature is desirable. Here is how I would like XBrackets to work with curly brackets (like in Flash):

First, you type the following:

function myFunction(parameter) {

So far, Flash has added nothing. Then you press Enter. Here is what the code becomes.

function myFunction(parameter) {
[TAB]| <-----Cursor is here

1. If the { was a mistake and is erased right away, without pressing Enter, then there is no annoying automatically generated closing bracket to erase on top.
2. Most importantly, the bracket is correctly placed and indented, which gives the plugin its whole purpose!

So you can type your function very naturally, without worrying about where or when to close tags. Everything is nicely, and automatically, aligned. Of course, some people might do inline short functions more often. That's why an additional setting for this would be nice.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks