• Stars
    star
    616
  • Rank 72,837 (Top 2 %)
  • Language
    Shell
  • License
    BSD 3-Clause "New...
  • Created about 3 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Feature-rich syntax highlighting for ZSH

Fast Syntax Highlighting (F-Sy-H) Gitter

Feature rich syntax highlighting for Zsh.

image could not be loaded

Table of Contents

Other Contents

News

  • 15-06-2019
    • A new architecture for defining the highlighting for specific commands: it now uses abstract definitions instead of top-down, regular code. The first effect is the highlighting for the git command it is now maximally faithful, it follows the git command almost completely. Screencast

Installation

Manual

Clone the Repository.

git clone https://github.com/zdharma-continuum/fast-syntax-highlighting ~/path/to/fsh

And add the following to your zshrc file.

source ~/path/to/fsh/fast-syntax-highlighting.plugin.zsh

Zinit

Add the following to your zshrc file.

zinit light zdharma-continuum/fast-syntax-highlighting

Here's an example of how to load the plugin together with a few other popular ones with the use of Turbo, i.e.: speeding up the Zsh startup by loading the plugin right after the first prompt, in background:

zinit wait lucid for \
 atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
    zdharma-continuum/fast-syntax-highlighting \
 blockf \
    zsh-users/zsh-completions \
 atload"!_zsh_autosuggest_start" \
    zsh-users/zsh-autosuggestions

Antigen

Add the following to your zshrc file.

antigen bundle zdharma-continuum/fast-syntax-highlighting

Fig

Fig adds apps, shortcuts, and autocomplete to your existing terminal.

Install fast-syntax-highlighting in just one click.

Zgen

Add the following to your .zshrc file in the same place you're doing your other zgen load calls in.

zgen load zdharma-continuum/fast-syntax-highlighting

Oh-My-Zsh

Clone the Repository.

git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git \
  ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting

And add fast-syntax-highlighting to your plugin list.

Features

Themes

Switch themes via fast-theme {theme-name}.

image could not be loaded

Run fast-theme -t {theme-name} option to obtain the snippet above.

Run fast-theme -l to list available themes.

Variables

Comparing to the project zsh-users/zsh-syntax-highlighting (the upper line):

image could not be loaded
image could not be loaded

Brackets

image could not be loaded

Conditions

Comparing to the project zsh-users/zsh-syntax-highlighting (the upper line):

image could not be loaded

Strings

Exact highlighting that recognizes quotings.

image could not be loaded

here-strings

image could not be loaded

exec descriptor-variables

Comparing to the project zsh-users/zsh-syntax-highlighting (the upper line):

image could not be loaded

for-loops and alternate syntax (brace {/} blocks)

image could not be loaded

Function definitions

Comparing to the project zsh-users/zsh-syntax-highlighting (the upper 2 lines):

image could not be loaded

Recursive eval and $( ) highlighting

Comparing to the project zsh-users/zsh-syntax-highlighting (the upper line):

image could not be loaded

Chroma functions

Highlighting that is specific for a given command.

image could not be loaded

The chromas that are enabled by default can be found here.

Math-mode highlighting

image could not be loaded

Zcalc highlighting

image could not be loaded

Performance

Performance differences can be observed in this Asciinema recording, where a 10 kB function is being edited.

More Repositories

1

zinit

🌻 Flexible and fast ZSH plugin manager
Shell
2,848
star
2

history-search-multi-word

Shell
54
star
3

I_WANT_TO_HELP

https://www.reddit.com/r/zsh/comments/qinb6j/httpsgithubcomzdharma_has_suddenly_disappeared_i/hil4oww/
29
star
4

zinit-configs

Real-world configuration files (basically zshrc-s) holding Zinit (former Zplugin) invocations
Shell
28
star
5

zinit-module

zsh module for automatically compiling sourced files
C
19
star
6

zshelldoc

Shell
15
star
7

zinit-packages

zinit package repository
Shell
12
star
8

zinit-vim-syntax

A Vim syntax definition for Zinit commands in any ft=zsh file
Vim Script
10
star
9

zsh-cmd-architect

Shell
9
star
10

zbrowse

Shell
8
star
11

Zsh-100-Commits-Club

Promote writing Zsh software not simple scripts
Shell
7
star
12

zui

⬢ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Shell
7
star
13

ztrace

Shell
7
star
14

zsh-navigation-tools

Curses-based tools for Zsh, e.g. multi-word history searcher
Shell
6
star
15

null

6
star
16

zinit-annex-patch-dl

Unmaintained mirror of zinit-zsh/z-a-patch-dl
Shell
4
star
17

zinit-annex-bin-gem-node

Unmaintained mirror of zinit-zsh/z-a-bin-gem-node
Shell
4
star
18

zinit-annex-readurl

Shell
4
star
19

zinit-annex-man

Shell
4
star
20

zinit-annex-meta-plugins

A Zsh-Zinit extension that allows to install predefined groups of plugins ↔ meta-plugins.
Shell
4
star
21

zsh-diff-so-fancy

Shell
3
star
22

zsh-editing-workbench

Shell
3
star
23

zflai

Shell
3
star
24

declare-zsh

Shell
3
star
25

pm-perf-test

Shell
2
star
26

zsh-lint

Shell
2
star
27

zinit-annex-submods

Shell
2
star
28

.github

2
star
29

zinit-console

Shell
2
star
30

zinit-annex-unscope

A Zinit-Zsh annex that allows to install plugins without specifying the GitHub user name.
Shell
2
star
31

zinit-annex-test

Shell
1
star
32

zdharma

1
star
33

zinit-annex-rust

Unmaintained mirror of zinit-zsh/z-a-rust
Shell
1
star
34

zsh-string-lib

Shell
1
star
35

discussions

Public open-ended discussions.
1
star
36

zsnapshot

Shell
1
star
37

zsh-github-issues

Shell
1
star
38

zredis

C
1
star
39

zconvey

Send notifications and commands to all or selected Zshell instances
Shell
1
star
40

zzcomplete

Shell
1
star
41

zinit-package-fzf

1
star
42

zinit-annex-default-ice

A Zsh-Zinit extension that allows to define ices active for multiple zinit commands
Shell
1
star
43

zinit-crasis

Semigraphical .zshrc editor for Zplugin commands
Shell
1
star