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

fish

by Phidica ALL

A robust Sublime Text syntax package for fish

Details

  • 3.4.2
    3.2.0
    2.5.0
  • github.​com
  • github.​com
  • 2 weeks ago
  • 16 minutes ago
  • 12 years ago

Installs

  • Total 14K
  • Win 1K
  • Mac 8K
  • Linux 4K
Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28
Windows 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1
Mac 2 0 1 0 3 1 3 0 1 3 3 1 0 2 3 1 0 1 2 1 3 0 2 3 2 2 0 4 2 3 1 4 1 1 3 0 2 2 1 0 0 1 0 1 0 0
Linux 0 0 0 2 0 1 1 4 2 2 2 1 0 3 1 0 2 0 0 0 0 2 0 0 3 2 1 2 0 1 1 1 2 0 3 0 1 1 1 1 0 0 1 0 3 0
0246Jan 12Jan 9Jan 6Jan 3Dec 31Dec 28Dec 25Dec 22Dec 19Dec 16Dec 13Dec 10Dec 7Dec 4Dec 1Nov 28Jan 12 Linux: 0 Mac: 2 Windows: 0Jan 11 Linux: 0 Mac: 0 Windows: 1Jan 10 Linux: 0 Mac: 1 Windows: 2Jan 9 Linux: 2 Mac: 0 Windows: 0Jan 8 Linux: 0 Mac: 3 Windows: 0Jan 7 Linux: 1 Mac: 1 Windows: 0Jan 6 Linux: 1 Mac: 3 Windows: 0Jan 5 Linux: 4 Mac: 0 Windows: 0Jan 4 Linux: 2 Mac: 1 Windows: 0Jan 3 Linux: 2 Mac: 3 Windows: 0Jan 2 Linux: 2 Mac: 3 Windows: 0Jan 1 Linux: 1 Mac: 1 Windows: 0Dec 31 Linux: 0 Mac: 0 Windows: 0Dec 30 Linux: 3 Mac: 2 Windows: 0Dec 29 Linux: 1 Mac: 3 Windows: 0Dec 28 Linux: 0 Mac: 1 Windows: 0Dec 27 Linux: 2 Mac: 0 Windows: 0Dec 26 Linux: 0 Mac: 1 Windows: 0Dec 25 Linux: 0 Mac: 2 Windows: 0Dec 24 Linux: 0 Mac: 1 Windows: 0Dec 23 Linux: 0 Mac: 3 Windows: 0Dec 22 Linux: 2 Mac: 0 Windows: 1Dec 21 Linux: 0 Mac: 2 Windows: 0Dec 20 Linux: 0 Mac: 3 Windows: 0Dec 19 Linux: 3 Mac: 2 Windows: 0Dec 18 Linux: 2 Mac: 2 Windows: 1Dec 17 Linux: 1 Mac: 0 Windows: 0Dec 16 Linux: 2 Mac: 4 Windows: 0Dec 15 Linux: 0 Mac: 2 Windows: 1Dec 14 Linux: 1 Mac: 3 Windows: 0Dec 13 Linux: 1 Mac: 1 Windows: 0Dec 12 Linux: 1 Mac: 4 Windows: 0Dec 11 Linux: 2 Mac: 1 Windows: 0Dec 10 Linux: 0 Mac: 1 Windows: 0Dec 9 Linux: 3 Mac: 3 Windows: 0Dec 8 Linux: 0 Mac: 0 Windows: 0Dec 7 Linux: 1 Mac: 2 Windows: 0Dec 6 Linux: 1 Mac: 2 Windows: 0Dec 5 Linux: 1 Mac: 1 Windows: 0Dec 4 Linux: 1 Mac: 0 Windows: 1Dec 3 Linux: 0 Mac: 0 Windows: 0Dec 2 Linux: 0 Mac: 1 Windows: 1Dec 1 Linux: 1 Mac: 0 Windows: 1Nov 30 Linux: 0 Mac: 1 Windows: 1Nov 29 Linux: 3 Mac: 0 Windows: 0Nov 28 Linux: 0 Mac: 0 Windows: 1Jan 12 Linux: 0 Mac: 2 Windows: 0Jan 11 Linux: 0 Mac: 0 Windows: 1Jan 10 Linux: 0 Mac: 1 Windows: 2Jan 9 Linux: 2 Mac: 0 Windows: 0Jan 8 Linux: 0 Mac: 3 Windows: 0Jan 7 Linux: 1 Mac: 1 Windows: 0Jan 6 Linux: 1 Mac: 3 Windows: 0Jan 5 Linux: 4 Mac: 0 Windows: 0Jan 4 Linux: 2 Mac: 1 Windows: 0Jan 3 Linux: 2 Mac: 3 Windows: 0Jan 2 Linux: 2 Mac: 3 Windows: 0Jan 1 Linux: 1 Mac: 1 Windows: 0Dec 31 Linux: 0 Mac: 0 Windows: 0Dec 30 Linux: 3 Mac: 2 Windows: 0Dec 29 Linux: 1 Mac: 3 Windows: 0Dec 28 Linux: 0 Mac: 1 Windows: 0Dec 27 Linux: 2 Mac: 0 Windows: 0Dec 26 Linux: 0 Mac: 1 Windows: 0Dec 25 Linux: 0 Mac: 2 Windows: 0Dec 24 Linux: 0 Mac: 1 Windows: 0Dec 23 Linux: 0 Mac: 3 Windows: 0Dec 22 Linux: 2 Mac: 0 Windows: 1Dec 21 Linux: 0 Mac: 2 Windows: 0Dec 20 Linux: 0 Mac: 3 Windows: 0Dec 19 Linux: 3 Mac: 2 Windows: 0Dec 18 Linux: 2 Mac: 2 Windows: 1Dec 17 Linux: 1 Mac: 0 Windows: 0Dec 16 Linux: 2 Mac: 4 Windows: 0Dec 15 Linux: 0 Mac: 2 Windows: 1Dec 14 Linux: 1 Mac: 3 Windows: 0Dec 13 Linux: 1 Mac: 1 Windows: 0Dec 12 Linux: 1 Mac: 4 Windows: 0Dec 11 Linux: 2 Mac: 1 Windows: 0Dec 10 Linux: 0 Mac: 1 Windows: 0Dec 9 Linux: 3 Mac: 3 Windows: 0Dec 8 Linux: 0 Mac: 0 Windows: 0Dec 7 Linux: 1 Mac: 2 Windows: 0Dec 6 Linux: 1 Mac: 2 Windows: 0Dec 5 Linux: 1 Mac: 1 Windows: 0Dec 4 Linux: 1 Mac: 0 Windows: 1Dec 3 Linux: 0 Mac: 0 Windows: 0Dec 2 Linux: 0 Mac: 1 Windows: 1Dec 1 Linux: 1 Mac: 0 Windows: 1Nov 30 Linux: 0 Mac: 1 Windows: 1Nov 29 Linux: 3 Mac: 0 Windows: 0Nov 28 Linux: 0 Mac: 0 Windows: 1Jan 12 Linux: 0 Mac: 2 Windows: 0Jan 11 Linux: 0 Mac: 0 Windows: 1Jan 10 Linux: 0 Mac: 1 Windows: 2Jan 9 Linux: 2 Mac: 0 Windows: 0Jan 8 Linux: 0 Mac: 3 Windows: 0Jan 7 Linux: 1 Mac: 1 Windows: 0Jan 6 Linux: 1 Mac: 3 Windows: 0Jan 5 Linux: 4 Mac: 0 Windows: 0Jan 4 Linux: 2 Mac: 1 Windows: 0Jan 3 Linux: 2 Mac: 3 Windows: 0Jan 2 Linux: 2 Mac: 3 Windows: 0Jan 1 Linux: 1 Mac: 1 Windows: 0Dec 31 Linux: 0 Mac: 0 Windows: 0Dec 30 Linux: 3 Mac: 2 Windows: 0Dec 29 Linux: 1 Mac: 3 Windows: 0Dec 28 Linux: 0 Mac: 1 Windows: 0Dec 27 Linux: 2 Mac: 0 Windows: 0Dec 26 Linux: 0 Mac: 1 Windows: 0Dec 25 Linux: 0 Mac: 2 Windows: 0Dec 24 Linux: 0 Mac: 1 Windows: 0Dec 23 Linux: 0 Mac: 3 Windows: 0Dec 22 Linux: 2 Mac: 0 Windows: 1Dec 21 Linux: 0 Mac: 2 Windows: 0Dec 20 Linux: 0 Mac: 3 Windows: 0Dec 19 Linux: 3 Mac: 2 Windows: 0Dec 18 Linux: 2 Mac: 2 Windows: 1Dec 17 Linux: 1 Mac: 0 Windows: 0Dec 16 Linux: 2 Mac: 4 Windows: 0Dec 15 Linux: 0 Mac: 2 Windows: 1Dec 14 Linux: 1 Mac: 3 Windows: 0Dec 13 Linux: 1 Mac: 1 Windows: 0Dec 12 Linux: 1 Mac: 4 Windows: 0Dec 11 Linux: 2 Mac: 1 Windows: 0Dec 10 Linux: 0 Mac: 1 Windows: 0Dec 9 Linux: 3 Mac: 3 Windows: 0Dec 8 Linux: 0 Mac: 0 Windows: 0Dec 7 Linux: 1 Mac: 2 Windows: 0Dec 6 Linux: 1 Mac: 2 Windows: 0Dec 5 Linux: 1 Mac: 1 Windows: 0Dec 4 Linux: 1 Mac: 0 Windows: 1Dec 3 Linux: 0 Mac: 0 Windows: 0Dec 2 Linux: 0 Mac: 1 Windows: 1Dec 1 Linux: 1 Mac: 0 Windows: 1Nov 30 Linux: 0 Mac: 1 Windows: 1Nov 29 Linux: 3 Mac: 0 Windows: 0Nov 28 Linux: 0 Mac: 0 Windows: 1

Readme

Source
raw.​githubusercontent.​com

Friendly Interactive Shell (fish)

A Sublime Text package for the friendly interactive shell. It features a robust syntax highlighting scheme that mimics the native highlighting behaviour of fish.

The package currently supports up to fish version: 3.7

Note: ST3 support will cease in a future release. ST2 support is capped at fish 2.7 with a limited set of the following features.

Features

  • Snippets for common constructs.
  • Extensive syntax highlighting:
  • Indent and prettify: Reformat the active file with fish_indent:
    • Use ctrl+alt+i or your build system shortcut (eg, ctrl+b).
    • Optional setting to run automatically when file is saved.

Installation

Via Package Control

Install Package Control, then go to Command Palette (Ctrl+Shift+P) > Package Control: Install Package > fish.

Manual

Clone the repository to your Packages directory and rename it to fish.

cd /path/to/sublime/packages/directory
git clone https://github.com/Phidica/sublime-fish.git
mv sublime-fish fish

Open a .fish file and verify the selected syntax is “Fish”.

Screenshots

As of release 3.0.0, a fish script (for example, fish-shell/share/functions/ls.fish) will look something like:

Figure 1: Default Monokai colour scheme

Figure 2: Example custom Monokai colour scheme formatting additional scopes

Exposed scopes

fish construct Scope name
Unquoted string meta.string.unquoted
Command name meta.function-call.name
Parameters meta.function-call.parameter.option/argument
File path (in argument) meta.function-call.parameter.argument.path
File path (in redirection) meta.function-call.operator.redirection.path
Redirection meta.function-call.operator.redirection.{stdin,stdout,stderr}.{explicit,implicit} and keyword.operator.redirect.{truncate,append}
Job expansion meta.function-call.parameter.argument.job-expansion and punctuation.definition.job
Process expansion meta.function-call.parameter.argument.process-expansion and punctuation.definition.process
Variable expansion meta.variable-expansion and punctuation.definition.variable
Command substitution meta.parens.command-substitution and punctuation.section.parens.begin/end
Index expansion meta.brackets.index-expansion and punctuation.section.brackets.begin/end
Brace expansion meta.braces.brace-expansion and punctuation.section.braces.begin/separator/end
Wildcard expansion meta.wildcard-expansion and keyword.operator.question-mark/single-star/double-star
Home directory expansion keyword.operator.tilde

Branches and releases

Support for different ST major versions is separated between several branches:

  • master: Plugins compatible with ST4, and syntax provides highlighting for fish versions 2.7 and up.
  • st3: Plugins compatible with ST3 and above (via backwards compatibility features), and syntax provides highlighting for fish versions 2.7 and up.
  • st2: Plugins only compatible with ST2, syntax uses the more limited tmLanguage scheme instead of sublime-syntax, and provides highlighting for fish 2.7 only.

The particular fish major version supported by a tagged release is indicated by the version number:

  • The 2.x.x series (on st2 and st3) only supports fish 2.7.
  • The 3.x.x series (on st3 and master) includes support for fish 3.0 and beyond.

Contribution

Requirements:

  • PackageDev, only for ST2 development and changing the tmPreferences file.

ST2 development: The source file of the syntax is fish.YAML-tmLanguage. When editing this file, “compile” it with the PackageDev build system to automatically generate the fish.tmLanguage file which is used by Sublime Text 2.

ST3+ development: The source file of the syntax is fish.sublime-syntax.

Guide for contributing is located here.

History

The first Sublime Text fish syntax highlighter was by toru hamaguchi. When that project became unmaintained, @Phidica fully rewrote the schema and replaced the links on Package Control.