Is it possible to automatic add semicolon in sublime?
// 1
Route::get(|
// 2
Route::get(|);
After closing bracket insert ;
at the end of line?
You can do that with the Auto Semi-Colon plugin. It does exactly what you ask for, and it works with version 2 and version 3 of Sublime Text.
I seriously doubt that this useful. Text editor has no way of knowing where are you going to end the line. Closing bracket does not indicate the end of the line. I am not sure what language are you programming in. But in most languages that use (), there are multiple scenarios when you would continue the line after closing bracket. Consider following examples in C:
if(condition)
{
statement;
}
also
variable = functionA() + functionB();
and finally
object.methodReturningObject().method();
As you can see, you will end up manually deleting semicolon in all these cases (and many more)
if (...)
orfor (...)
orwhile (...)
and such.