Skip to content
r3a1ay edited this page Apr 9, 2015 · 8 revisions

Hxml files generation

Type generation

Create new types through the sidebar's context menu or command palette.

Implement interface

Press ctrl+shift+1 inside class with interface to implement all variables and methods.

Auto import

Press ctrl+I on a qualified class name to shorten it and generate the import statement. Safe to use if the class is already imported.

Organize imports

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

Generate fields

Press ctrl+shift+1 on word to generate variable or method.

Generate property

  1. Move your cursor on the variable name, press ctrl+shift+1 to convert variable to property.
  2. Move your cursor on the property name or declaration, press ctrl+shift+1 to generate variable.
  3. Move your cursor on the property name or declaration, press ctrl+shift+1 to generate getter and setter.

    If you don't want to group getter and setter with property, you can set haxe_group_property_and_accessors setting to false.
    You can change the number of blank lines between property, getter and setter in haxe_bl_property setting.

Extract local variable

Select a code inside a method and press ctrl+shift+1.

Code snippets

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
Clone this wiki locally