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

fish

by Phidica ST2/ST3

A robust Sublime Text syntax package for fish

Details

Installs

  • Total 9K
  • Win 780
  • OS X 5K
  • Linux 2K
Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9
Windows 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 2 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1
OS X 0 3 5 0 2 1 3 5 6 3 5 1 4 3 5 2 2 2 1 3 2 2 4 3 0 3 2 2 3 3 1 2 2 2 7 3 7 5 2 5 4 6 8 3 4 1
Linux 0 1 0 0 0 1 1 4 1 3 0 1 3 2 3 1 0 2 1 0 1 2 0 0 0 0 2 1 0 2 0 0 1 1 1 3 1 1 2 2 1 5 5 3 2 3

Readme

Source
raw.​githubusercontent.​com

friendly interactive shell (fish)

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

All the general syntax of fish is completely implemented, however a number of additional features are planned and suggestions or bug reports are welcome.

To do:

  • Rewrite for .sublime-syntax
  • Support fish 3
  • Optimise scope nesting

Features

  • Extensive syntax highlighting
  • Snippets for common constructs
  • Indentation and prettification of the active file (with fish_indent)
    • Use ctrl+alt+i or your build system shortcut (eg, ctrl+b)
    • Optional setting to run automatically on save
    • More information here

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 ensure the default syntax highlighting is “friendly interactive shell (fish)”.

Screenshots

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

Screenshot of text in Monokai

Figure 1: Default Monokai colour scheme

Screenshot of text in custom Monokai

Figure 2: Example custom Monokai colour scheme formatting additional scopes

Exposed scopes

fish construct Scope name
Parameters meta.parameter.option/argument
Unquoted string meta.string.unquoted
File path (in redirection) meta.redirection.path
Variable expansion meta.variable-expansion and punctuation.definition.variable
Process expansion meta.parameter.argument.process-expansion and punctuation.definition.process
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
Home directory expansion meta.parameter.argument.path and keyword.operator.tilde
Wildcard expansion meta.wildcard-expansion and keyword.operator.question-mark/single-star/double-star

Contribution

This package is built with PackageDev.

The source file for 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.

History

This project was forked from original groundwork laid by toru hamaguchi.