Sublime2 bundle for Haxe programming language
Python
Switch branches/tags
Nothing to show
Pull request Compare This branch is 429 commits behind clemos:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Macros
Snippets
Support
elementtree
.gitignore
Comments.Haxe.tmPreferences
HSS.tmLanguage
Haxe.tmLanguage
HaxeComplete.py
Hxml.tmLanguage
NMML.tmLanguage
README.markdown
erazor.tmLanguage

README.markdown

Introduction

An Haxe Bundle for Sublime Text 2

Features

  • Syntax highlighting for Haxe sources, hxml build files and HSS
  • Haxe compiler completion, code hints and error highlighting
  • Package and classes discovery/completion supporting hxml classpath (-cp) and haxelib libraries (-lib)
  • NME completion, target selection and compilation
  • Multiple build/hxml management and automatic generation of hxml files
  • Haxelib integration (install / remove libs) with -lib autocompletion
  • Code snippets, auto-import, Sublime build system integration
  • HScript, Erazor and HSS support

and more to come :)

Installation

Sublime Package Control

The most straight-forward way to install the bundle and to keep it up-to-date is through Package Control.

Manual installation

If you want to develop on a forked repo, you can clone it into the Packages folder:

Mac OSX

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone https://github.com/<fork author>/haxe-sublime2-bundle.git Haxe

Linux

cd ~/.config/sublime-text-2/Packages
git clone https://github.com/<fork author>/haxe-sublime2-bundle.git Haxe

Windows

Using git bash http://code.google.com/p/msysgit/

cd /c/Users/<username>/AppData/Roaming/Sublime\ Text\ 2/Packages
git clone https://github.com/<fork author>/haxe-sublime2-bundle.git Haxe

Restart Sublime Text 2.

Usage

  • Open your project's directory (where the .hxml or .nmml resides) in Sublime Text, the build file should be detected automatically,
  • Create new types through the sidebar's context menu
  • Edit your classes (check the cool snippets, like 'prop'-Tab)
  • Completion is triggered either automatically by dot and colon keys, or manually by Ctrl+Space.
  • Open parenthesis and comma keys display Haxe type hints in the status bar

Shortcuts

  • Press Ctrl+Shift+B to either automatically generate an hxml file if none exist, edit the build file if only one build exists or select among multiple builds (--next)
  • Press Ctrl+Enter to run the current/selected build
  • 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.
  • Press Ctrl+Shift+L to install a library via haxelib
  • Press Ctrl+Shift+H and then :
    • Ctrl+Shift+C to create a new class,
    • Ctrl+Shift+I to create a new interface,
    • Ctrl+Shift+E to create a new enum,
    • Ctrl+Shift+T to create a new typedef

Settings

  • haxe_path : Full path to the Haxe compiler, if not already in your PATH ("/usr/bin/haxe" or "C:\Program Files\Haxe\haxe.exe")
  • haxe_library_path : Full path to the standard lib, overriding HAXE_LIBRARY_PATH
  • haxe_build_server_mode (true by default) : Uses compilation server for building. The server is always used for completion, and may be restarted if needed through the command palette.

Targeting NME

Haxe NME is based on a specific .nmml file (the .hxml is generated) which is supported by this bundle.

  • press Ctrl+Shift+B to select a NME target
  • press Ctrl+Enter to build and run (regular Sublime Text build system won't work)

Tips & tricks

As this bundle displays code hinting for method calls in the “status bar”, you may find it useful to increase its font-size.

Reviews

SublimeText Editor Video Tutorial

Haxe workflow with Sublime Text 2, Php & nme examples

Haxe IDE Choices for Mac OS X