forked from joa/haxe-sublime2-bundle
-
Notifications
You must be signed in to change notification settings - Fork 85
Code generation
r3a1ay edited this page Apr 2, 2015
·
8 revisions
Create new types through the sidebar's context menu or command palette.
Press ctrl+shift+1 inside class with interface to implement all variables and methods.
Press ctrl+shift+h, ctrl+shift+o to add missing, remove unused and sort imports.
All three operations are optional. You can customize the command by passing these arguments:
Argument | Description | Default |
---|---|---|
add |
add missing imports | true |
sort |
sort imports | true |
remove |
remove unused imports | true |
auto_remove |
automaticaly remove all suggested unused imports | false |
Press ctrl+shift+1 on word to generate variable or method.
Select a code inside a method and press ctrl+shift+1.
Edit your classes (check the cool snippets, like for
).
You can use these shell variables in snippets:
Variable | Description |
---|---|
$HX_W_ORB | whitespaces before opening round bracket |
$HX_K_W_ORB | whitespaces between keyword and opening round bracket |
$HX_ORB_W | whitespaces after opening roundbracket |
$HX_W_CRB | whitespaces before closing round bracket |
$HX_CRB_W_C | whitespaces between closing round bracket and colon |
$HX_W_C | whitespaces before colon |
$HX_C_W | whitespaces after colon |
$HX_W_OAB | whitespaces before opening angle bracket |
$HX_OAB_W | whitespaces after opening angle bracket |
$HX_W_CAB | whitespaces before closing angle bracket |
$HX_W_CM | whitespaces before comma |
$HX_CM_W | whitespaces after comma |
$HX_W_A | whitespaces before assignment |
$HX_A_W | whitespaces after assignment |
$HX_W_AR | whitespaces before arrow |
$HX_AR_W | whitespaces after arrow |
$HX_W_SC | whitespaces before semicolon |
$HX_W_TD | whitespaces before triple dot |
$HX_TD_W | whitespaces after triple dot |
$HX_W_OCB | whitespaces before opening curly bracket |
$HX_CCB_W | whitespaces after closing curly bracket |