ENSIME TextMate Bundle
See a preview video here
NOTICE: You need to have an .ensime project file in the root of your project. For more information about this file please read the ENSIME manual or modify the sample one below:
Here's a sample .ensime file:
(:project-package "com.sidewayscoding" :use-sbt t :root-dir "/Users/Mads/dev/projects/functional_dictionary/")
Now open a file file in that project and hit ⌃⇧R and chose "Start ENSIME". This will start the ENSIME backend and the output will be written in a HTML output window. You can safely minimize this window now. Now initialize ENSIME by hitting ⌃⇧R and pick the command "Initialize ENSIME". This will send your project file to ENSIME and it will start analyzing your code. After a few seconds ENSIME is ready to help you out.
- Organize imports (⌃⇧H): This will organize your imports and remove any unused imports
- Reformat Document (⌃⇧H): This will reformat the current document
- Rename (⌃⇧H): This will rename the selected text.
- Navigation (⌘⇧C): Works just like Go-to-file expect it knows about the classes/objects/traits/etc. in your project. This will show all of the members in all of the packages in your project. You can navigate the list using the arrow-keys and filter it using the search field at the top. Hitting enter will open the file where the selected item was declared and move the caret to the appropriate line.
- Inspect (⌃⇧i): This will show a tooltip with the type of the expression under the caret.
- Type check project(⌃⇧V): This will type check your project. If there are any errors it will display a drop-down list with the errors. If you pick one of the items it will jump to that line in the file with the error.
- Code completion (⌥+⎋): This will do code-completion or either types or methods depending on when you call it.
NOTICE: You need to have ENSIME installed. You can download it here. Simply download it and unpack it anywhere you like.
To install the bundle simply run the following in your terminal:
git clone https://github.com/mads379/ensime.tmbundle.git open ensime.tmbundle
Add the shell variable ENSIME_HOME in TextMate -> Preferences... -> Advanced -> Shell Variables to the root of your ENSIME distribution (This would be the path to the folder you just unpacked). For me this is
This bundle takes advantage of the ENSIME backend to bring IDE features to TextMate Scala projects.