• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 14 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TextMate bundle for the Scala programming language

Scala TextMate Bundle

Textmate bundle for the Scala Programming Language.

Using it

Snippets

As any good textmate bundle this one comes with a bunch of snippets that will make you more productive. To make it easier for you to remember all of the tab-completions the bundle strives to use the keywords as tab-triggers. As an example: If you wanted to create a new class you would simply write "class" and hit tab. If you wanted to create a case class you would type "case class" and hit tab and so on.

This of course means that the tab-triggers aren't as short as they could have been. If you're programming Scala every day you would probably prefer that you would only have to type "cc" and hit tab and it would expand into a case class. Now, Textmate doesn't allow a snippet to have multiple tab trigger (i.e. both "case class" and "cc") and having duplicated snippets would be a mess to maintain. So to fix this most of the snippets have a shorter version with expand to the "larger" version which in turn can expand to the full source. Here's and example

cc <tab> => case class <tab> => proper source for a case class

This means you have to hit tab twice but I think that's a fair tradeoff.

Playing with the code

The bundle offers several ways to play around with Scala code in your document - Hit โŒ˜R and see the options possible

  • Scala REPL: This will start the Scala REPL in a new tab in the a frontmost terminal window or create a new window if one doesn't exist.
  • Scala REPL: Preload file This will start the Scala REPL like above but it will preload the current file
  • Scala REPL: Paste selection This will paste the current selection in TextMate to active Terminal tab.

Other cool stuff

  • Align Assignments: This will align anything according to =>,=,->,<-.
  • Comments
    • Javadoc for line (โŒ˜โ‡งD): Will analyze the the current line and add the appropriate documentation for the line (i.e. correct @param etc.)
    • New javadoc line (โ‡งโŽ in comment scope): Will create a new correctly indented comment line.

Shell variables

  • SCALA_DOC: If you want to browse the documentation offline, set this shell variable. Here's how mine is set: /Users/Mads/dev/programming_languages/scala-2.8.1.final-devel-docs
  • SCALA_HOME:If you want to be able to run and/or compile single files from within textmate /Users/Mads/dev/programming_languages/scala-2.8.0.final/
  • SCALA_COMPILER:Defaults to scalac.

Installation

git clone git://github.com/mads379/scala.tmbundle.git
open scala.tmbundle

Contributors

  • Mads Hartmann Jensen
  • Paul Phillips (paulp)
  • (murr4y)
  • (mikemckibben)
  • (fizx)

More Repositories

1

TextMate-Fullscreen-Plugin

TextMate plugin that enables you to edit files in fullscreen-mode. For native OS X Lion Fullscreen support see https://github.com/enormego/EGOTextMateFullScreen
Objective-C
67
star
2

Whitespace.tmbundle

TextMate bundle for whitespace
55
star
3

ensime.tmbundle

Textmate port of ensime using the ensime backend.
Ruby
36
star
4

SBT-Console-Textmate-Plugin

NOT ACTIVELY MAINTAINED: This is a Textmate plugin that adds a view at the bottom of a Textmate project window which allows you to type SBT commands like compile, test
Objective-C
21
star
5

lt-ocaml

LightTable plugin for OCaml
Clojure
18
star
6

sbt-plugin-examples

Example SBT plugins
Scala
14
star
7

Functional-Dictionary

A Lift based web application. It's a dictionary of Functional Programming terms.
Scala
10
star
8

random

Random hacks ๐Ÿ™ƒ Experiments, examples, and everything in between.
Scala
10
star
9

dotfiles

I โค๏ธ dotfiles
9
star
10

opa-chess

A multiplayer (no AI) chess game implemented using the Opa Programming Language
Ruby
9
star
11

mugs

Mugs is a immutable collections library for JavaScript written in Coffeescript
CoffeeScript
9
star
12

scala-formlets

Formlet implementation in Scala
Scala
8
star
13

ocaml-utop-emacs-example

A small example to accompany a blog post on using utop in Emacs with your own OCaml projects
OCaml
8
star
14

blog.mads-hartmann.com

My personal blog ๐Ÿ“
SCSS
6
star
15

javascript_console.tmbundle

This is a bundle for TextMate which uses the Javascript Console written by Remy Sharp (http://github.com/remy/console)
Ruby
6
star
16

CTAGS-Improved.tmbundle

Improved CTAGS bundle for TextMate
5
star
17

Multisets

Multiset implementation in Scala
Scala
5
star
18

align.tmbundle

Improved alignment command
5
star
19

opa.tmbundle

Textmate bundle for the Opa programming language
4
star
20

polyglots.dk

polyglots.dk
HTML
3
star
21

mads-hartmann.com

mads-hartmann.com
HCL
2
star
22

monad-transformers-presentation

Code used for a presentation on Monad Transformers in Scalaz 7
Scala
2
star
23

dotfilesv2

Dotfiles v2
Shell
2
star
24

computer.mads-hartmann.com

Notes about my computer
CSS
1
star
25

.emacs.d

This has been moved to https://github.com/mads-hartmann/dotfiles
Emacs Lisp
1
star
26

docker-compose-runner

A CLI for managing Docker Compose applications
Go
1
star
27

pullies

๐Ÿค– Tiny command line tool to help you keep track of your pull request responsibilities.
OCaml
1
star
28

vscode-yassnippet

Use your yassnippets in vscode
TypeScript
1
star
29

Logic-of-Scientific-Discovery

JavaScript
1
star
30

cloud.mads-hartmann.com

How I manage the cloud resources for my own personal sites. As well as a few different experiments to better understand how various bits and pieces work in practice.
HCL
1
star