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

Feature Request: Put braces/quotes at the end of a completed function #32

Closed
winfr34k opened this issue May 14, 2015 · 2 comments
Closed

Comments

@winfr34k
Copy link

Hello!

I've started to use Brackets and found this add-on. It's actually making Brackets a great deal better for me as someone who regularly codes in PHP.
What I miss, though, is that after hitting Return, the completed function doesn't get braces so I have to add them on my own - it's kind of a ridiculous request, but saving those keystrokes really improve much on my workflow. An exception list for functions like echo would be nice as well, because they shouldn't have the braces but quotes instead.

Example

If I type this: inc
It auto completes to this (if I hit Return): include
What I want it to do: include(); - and I want to have the text cursor jump inside the braces like so: include(|); (| marks the text cursor).

For echo, it would be completed to this: echo ""; where the cursor is in between the quotes, like so: echo "|";

Another thing that would be really cool is to have block statements complete in such a manner that the block is created as well.
Like, if I typed if and hit Return, it'll do something like this:

if(|) {

} 

If there's any way I can be helpful to this project, I'd like to offer my help as well.

@mackenza
Copy link
Contributor

I will look at this shortly.

@mackenza
Copy link
Contributor

I have made it so the predefined functions will append () and place the cursor in between the parens.

I have not done anything with echo as I consider this to be a pretty small exception to the normal rule and getting to what you want is 2 keystrokes away: insert echo stmt -> space -> "

As for the control structure blocks, can you enter a new issue asking for this? I think it's possible and somewhat reasonable but I don't think it's the same as this issue and I would like to treat it differently.

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