This bundle lets you to use the Mac OS X editors TextMate or Textastic, as well as Windows editor E Text Editor, as an IDE for the monkey programming language. It is based in part on the existing blitzmax.bundle so thanks to Nilium for that.
Created by Matt Sephton, http://www.gingerbeardman.com/monkey/
Easily see keywords, constants, strings, comments, numbers and functions/classes/methods in your code
Auto Completion of Keywords
Press the Escape key to cycle through all matches after typing part of a keyword, Shift+Escape will take cycle backwards, Option+Escape will present a list of matches for you to choose from
Expand Keywords into Code
Press the Tab key to expand one keyword into one or more lines of code, subsequent presses of tab intelligently jump you through the resulting code allowing you to fill in multiple parameters with minimal key strokes
Specify target, config and run options in the source - no need for the command line
Quick and easy full build by pressing ⌘B, or a quicker update and run using ⌘R
Jump to Error
Automatically jump to error after update and run, or with a click after full build
Context Sensitive Help
View the monkey module docs in a popup window by pressing F13
Quick Start Template
One click skeleton template to get you started, build to see instant results
Easy Source Navigation
Navigate around your source using the index of functions, classes and methods
Bundle Update Check
Easily see if you're using the most recent version of the bundle
Code Folding, Configurable Shortcut Keys
All the above features are supported in TextMate 1.5 out of the box.
Support in other editors will vary. See a comparison table here: http://www.gingerbeardman.com/monkey/
Please ask the developer of your chosen editor about improving TextMate bundle support to enable any features you are missing.
Unzip download if it has not been automatically unzipped.
Double click, or manually move the bundle to:
Before you can use the monkey bundle, you must first set the
TM_MONKEY shell variable.
To do this, open TextMate's preferences (⌘,) and navigate to the Advanced pane. Select the Shell Variables tab and add the
TM_MONKEY variable, where its value is the location of your monkey installation. For example, "/Developer/Applications/monkey". Do not include a trailing slash in the path.
This variable allows you to build your applications (⌘B). Documentation and trans lookups are relative to this location.
When using projects, you can set the
TM_MONKEY_MAIN_FILE shell variable for your project and specify the main monkey file to build when you use the Build App (⌘B) command.
To set this variable, open the project drawer and deselect any files, then click the "i" button at the bottom of the drawer to open the project info. Add the
TM_MONKEY_MAIN_FILE variable, and set its value to the file relative to the main file project's directory.
When using the Build App and Run App commands, your main source file (either the file you have open or the one specified by
TM_MONKEY_MAIN_FILE) is quickly scanned for a set of build options to determine how to build and/or run the results. These build options are available under the Build Options snippets, and are as follows:
- Release & Debug -
Specifies whether or not to compile the program in debug mode.
- Target -
Specifies what type of target to produce. Only targets that are installed correctly on your machine will be available.
- Run After Build -
Executes the resulting output immediately after building it.
Build options are formatted as comments inside your source code and do not have any meaning outside of this bundle. They are written as:
' buildopt: option
where 'option' is the option you're enabling for the Build and Run commands. The comments must be on their own lines with only whitespace preceding them.
Use of the bundle under Windows using the E Text Editor is possible. I'll happily include any hints and tips here if you have them. Otherwise, please consult the E forum.
You can talk about the bundle on the official monkey forum.
Please file any pull requests, or issues on github.
- TextMate http://macromates.com
- monkey http://www.monkeycoder.co.nz
monkey.tmbundle is made available under the MIT License.
- Changed to MIT License
- Corrected version checking (issue 3)
- Moved Drawpoint to Declarations (issue 4)
- Renamed and relinked "download bundle" menu item
The following are courtesy of https://github.com/tluyben:
- Updated Build & Run and relevant snippets to v70
- Documentation target update (issue 5)
- Fixed the doc viewer and reworked the build option snippets so they work with the new targets
- Added Set, FloatSet, IntSet, StringSet (v54c)
- Added DrawPoint (v50)
- Improved DrawPoly support
- Included Shinkiro1's new View Documentation for current keyword (v53 and newer)
- Added new View Documentation (v53 and newer)
- Fixed the Update & Run (⌘R) command. Now displays tooltip rather than opening a blank document
- Renamed bundle update menu items for clarity
- Added "Check for bundle update" and "Open bundle page on github" commands
- Added FirstNode, LastNode, NextNode, PrevNode, Exp (v45c)
- Added DisableKeyboard, EnableKeyboard (v45)
- Added ACosr, ASinr, ATan2r, ATanr, Cosr, Sinr, Tanr (v44)
- Added DrawPoly (v43)
- Added App: UpdateRate
- Added Audio: music commands (v35), Discard
- Added Graphics: DeviceHeight, DeviceWidth, Frames, HandleX, HandleY, Height, Width
- Added Lang: Print, Length, Resize, Compare, ToLower, ToUpper, Trim
- Added List: Backwards, Clear, Count, First, IsEmpty, Last, LastNode, ObjectEnumerator, RemoveFirst, RemoveLast, Value, ToArray
- Added Map: Set, Values, Key
- Added Random: Seed
- Added Set: Insert
- Added Stack: Insert, Pop, Push, Top
- Added all of the above to completions list
- Jumps to error now opens the correct file containing the error
- Build now jumps to error
- Neater error reporting on Run
- Added jump to error capability
- Added LANG const
- Removed extraneous JOY constants
- Added missing JoyX/Y/Z keywords
- Added TARGET const
- Removed binary integer grammar which was resulting in incorrect display of numerical values
- Added else/elseif snippet
- Reduced number of foldable elements
- Added keyEquivalent ^⌥⇧+M to activate bundle
- Renamed bundle from monkey to Monkey
- Removed preprocessor grammar
- Removed framework grammar
- Removed module grammar
- Added better if/then/elseif/else/endif handling
- Added bitwise complement operator
- Removed superstrict reference
- Tidied block comment grammar
- Replaced instances of (?:(?:^|;)\s*) with neater \b (regexp boundary)
- Removed references to integer number symbol %
- Corrected PI constants regexp
- Removed pointerops grammar
- Removed unused types from types grammar
- Added support for ⌥⎋ (Option+Escape) auto-completion menu
- Added support for Discard method (v40)
- General cleaning up of scope endings for better syntax colouring
- Added support for Compare keyword
- Added Const and Local snippets and scope
- Changed Global snippet
- Scope changes to allow for better syntax highlighting of variable names and more
- Tweaked Commands regex in language definition
- Removed Block comment, now uses default TextMate behaviour
- Added Backwards to completions
- Added folding capability for #Rem...#End
- Reworked block code commenting: ⌘/ uses ' and ⌘? (⇧⌘/) uses #Rem...#End
- Fixed missing variable declaration in template app
- Added references to ⌘R and F13 in readme
- Update & Run (⌘R) now outputs build status to tool tip
- Added OnSuspend/OnResume to template app
- Small tweaks to tab order in some snippets
- Added support for Clamp command
- Tweak to build window output
- Fixed buildopts so that they work with CRLF/Windows line endings
- Added Update & Run option, bound to Cmd+R
- Renamed menu to 'Build as ios'
- Added clean buildopt
- Added update buildopt
- Rearranged menu
- Initial public release