davidcelis / language-fish-shell

:fish: Atom snippets and syntax highlighting for Fish, the friendly interactive shell.
MIT License
12 stars 4 forks source link

Fix variables highlighting #9

Closed nomaed closed 8 years ago

nomaed commented 8 years ago

Two changes:

  1. First tries to match $__fish... variables, only then other $_...
  2. Matches 2 or more underscores between $ and fish. Very helpful in files like __fish_git_prompt.fish that has stuff like
printf "%s$format%s" "$___fish_git_prompt_color_prefix" "$___fish_git_prompt_color_prefix_done$c$b$f$r$p$informative_status$___fish_git_prompt_color_suffix" "$___git_ps_color_suffix_done"
ghost commented 8 years ago

Nice. Can you post a screenshot?

nomaed commented 8 years ago

Sure. This is after the patch:

image

ghost commented 8 years ago

This is very cool. Usually, $__variables are not highlighted, so LGTM.

@davidcelis

davidcelis commented 8 years ago

Thanks so much, @nomaed!