ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Scalex Documentation Search

by pkukielka ST3

Search Scala and Scalaz documentation right from Sublime Text.

Details

  • 1.0.2
  • github.​com
  • github.​com
  • 10 years ago
  • 51 minutes ago
  • 10 years ago

Installs

  • Total 1K
  • Win 498
  • Mac 462
  • Linux 315
May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimeScalex

Introduction

This plugin provides integration between Sublime Text and Scalex.
It allows you to search for any Scala or Scalaz function directly from ST.
Quoting Scalex main page:

Names and Types

Searches can be either textual (a list of words), or by type (a type signature) or both. A search is considered a text search unless it contains a combination of text and symbols, or if it starts with :. To search for both a type and a name, place a : between them, for example size: List[A] => Int.

Example queries
  • map Search for the text map
  • list map Search for the text list and the text map
  • list[a] => (a => boolean) => list[a] Search for the type List[A] => (A => Boolean) => List[A]
  • : list[a] => a Search for the type List[A] => A
  • conserve: List[a] => (a => b) => List[b] Search for the text conserve and the type List[A] => (A => B) => List[B]
Packages

You can reduce the search scope to one or more packages:

  • foldl +scala Search foldl only in scala
  • foldl +scalaz Search foldl only in scalaz
  • foldl -scalaz Search foldl everywhere except in scalaz

Installation

Right now SublimeScalex works only under ST3 (or at least was not tested under ST2 yet). If there will be enough interest I'll port it to older version as well.

The easiest way to install SublimeScalex is to use Package Control. You can also install it from here, by downloading and copying this folder to your packages directory.

Usage

Open the Command Palette and search for 'SublimeScalex' or just hit Ctrl + Alt + F to open Function search bar:

Describe what you are looking for as explained in the Introduction section and hit Enter. You will see list filled with entries matching your query. You can filter it further using standard Sublime fuzzy search.

If you want to see more details about any entry highlight it and hit Enter again (or just click it with the mouse). You will be moved to appropriate scaladoc, if it exists.
If you down want to open scaladoc just hit Esc.

Default number of showed results is limited to 20 to speed up querying, but you can change it in settings if you like.

Final notes

For bigger Scala projects I still prefer to use IntelliJ, but for simple scripts and snippets I found Sublime to be more pleasant. If you want to turn your Sublime into powerful Scala development environment then I recommend you to look at few more plugins:

  • sublime-ensime - error checking with Scala presentation compiler, and more
  • SublimeREPL - Scala REPL inside Sublime, let you play with your code in more interactive way
  • LoadFileToRepl - load current file into REPL, very comfortable to use