You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
5.9 KiB

  1. # News On Updates in F-Sy-H
  2. **2018-08-09**
  3. Added ideal string highlighting – FSH now handles any legal quoting and combination of `"`,`'` and `\` when
  4. highlighting program arguments. See the introduction for an example (item #14).
  5. **2018-08-02**
  6. Global aliases are now supported:
  7. ![image](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/global-alias.png)
  8. **2018-08-01**
  9. Hint – how to customize styles when using Zplugin and turbo mode:
  10. ```zsh
  11. zplugin ice wait"1" atload"set_fast_theme"
  12. zplugin light zdharma/fast-syntax-highlighting
  13. set_fast_theme() {
  14. FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}paired-bracket]='bg=blue'
  15. FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}bracket-level-1]='fg=red,bold'
  16. FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}bracket-level-2]='fg=magenta,bold'
  17. FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}bracket-level-3]='fg=cyan,bold'
  18. }
  19. ```
  20. If you have set theme before an update of styles (e.g. recent addition of bracket highlighting)
  21. then please repeat `fast-theme {theme}` call to regenerate theme files. (**2018-08-09**: FSH
  22. now has full user-theme support, refer to [appropriate section of README](#customization)).
  23. **2018-07-30**
  24. Ideal highlighting of brackets (pairing, etc.) – no quoting can disturb the result:
  25. ![image](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/brackets.gif)
  26. `FAST_HIGHLIGHT[use_brackets]=1` to enable this feature (**2018-07-31**: not needed anymore, this highlighting is active by default).
  27. **2018-07-21**
  28. Chroma architecture now supports aliases. You can have `alias mygit="git commit"` and when `mygit`
  29. will be invoked everything will work as expected (Git chroma will be ran).
  30. **2018-07-11**
  31. There were problems with Ctrl-C not working when using FSH. After many days I've found a fix
  32. for this, it's pushed to master.
  33. Second, asynchronous path checking (useful on e.g. slow network drives, or when there are many files in directory)
  34. is now optional. Set `FAST_HIGHLIGHT[use_async]=1` to enable it. This saves some users from Zshell crashes
  35. – there's an unknown bug in Zsh.
  36. **2018-06-09**
  37. New chroma functions: `awk`, `make`, `perl`, `vim`. Checkout the [video](https://asciinema.org/a/186234),
  38. it shows functionality of `awk` – compiling of code and NOT running it. Perl can do this too:
  39. [video](https://asciinema.org/a/186098).
  40. **2018-06-06**
  41. FSH gained a new architecture – "chroma functions". They are similar to "completion functions", i.e. they
  42. are defined **per-command**, but instead of completing that command, they colorize it. Two chroma exist,
  43. for `Git` ([video](https://asciinema.org/a/185707), [video](https://asciinema.org/a/185811)) and for `grep`
  44. ([video](https://asciinema.org/a/185942)). Checkout
  45. [example chroma](https://github.com/zdharma/fast-syntax-highlighting/blob/master/chroma/-example.ch) if you
  46. would like to highlight a command.
  47. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/git_chroma.png)
  48. **2018-06-01**
  49. Highlighting of command substitution (i.e. `$(...)`) with alternate theme – two themes at once! It was just white before:
  50. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/cmdsubst.png)
  51. To select which theme to use for `$(...)` set the key `secondary=` in [theme ini file](https://github.com/zdharma/fast-syntax-highlighting/blob/master/themes/free.ini#L7).
  52. All shipped themes have this key set (only the `default` theme doesn't use second theme).
  53. Also added correct highlighting of descriptor-variables passed to `exec`:
  54. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/execfd.png)
  55. **2018-05-30**
  56. For-loop is highlighted, it has separate settings in [theme file](https://github.com/zdharma/fast-syntax-highlighting/blob/master/themes/free.ini).
  57. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/for-loop.png)
  58. **2018-05-27**
  59. Added support for 256-color themes. There are six themes shipped with FSH. The command to
  60. switch theme is `fast-theme {theme-name}`, it has a completion which lists available themes
  61. and options. Checkout [asciinema recording](https://asciinema.org/a/183814) that presents
  62. the themes.
  63. **2018-05-25**
  64. Hash holding paths that shouldn't be grepped (globbed) – blacklist for slow disks, mounts, etc.:
  65. ```zsh
  66. typeset -gA FAST_BLIST_PATTERNS
  67. FAST_BLIST_PATTERNS[/mount/nfs1/*]=1
  68. FAST_BLIST_PATTERNS[/mount/disk2/*]=1
  69. ```
  70. **2018-05-23**
  71. Assign colorizing now spans to variables defined by `typeset`, `export`, `local`, etc.:
  72. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/typeset.png)
  73. Also, `zcalc` has a separate math mode and specialized highlighting – no more light-red colors because of
  74. treating `zcalc` like a regular command-line:
  75. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/zcalc.png)
  76. **2018-05-22**
  77. Array assignments were still boring, so I throwed in bracked colorizing:
  78. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/array-assign.png)
  79. **2018-05-22**<a name="assign-update"></a>
  80. Assignments are no more one-colour default-white. When used in assignment, highlighted are:
  81. - variables (outside strings),
  82. - strings (double-quoted and single-quoted),
  83. - math-mode (`val=$(( ... ))`).
  84. ![sshot](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/assign.png)
  85. **2018-01-06**
  86. Math mode is highlighted – expressions `(( ... ))` and `$(( ... ))`. Empty variables are colorized as red.
  87. There are 3 style names (fields of
  88. [FAST_HIGHLIGHT_STYLES](https://github.com/zdharma/fast-syntax-highlighting/blob/master/fast-highlight#L34)
  89. hash) for math-variable, number and empty variable (error): `mathvar`, `mathnum`, `matherr`. You can set
  90. them (like the animation below shows) to change colors.
  91. ![animation](https://raw.githubusercontent.com/zdharma/fast-syntax-highlighting/master/images/math.gif)