**NOTES:**
- PR is not yet merged in upstream repository (https://github.com/SalGnt/Sublime-VimL/pull/12),
but sublime-syntax file is already updated with changes.
- Updated syntax test files are added as well
This fixes#1064
Adds a syntax highlighting test for VimL
with source file based on parts of my own configuration
changed to cover as much of syntax as possible.
**NOTES:**
Last line of source (`syntax enable`) does not get highlighted,
since `syntax` keyword is not part of highlighting rules.
Related to #1213
SC2155: Declare and assign separately to avoid masking return values.
SC2164: Use cd ... || exit in case cd fails.
SC2230: which is non-standard. Use builtin 'command -v' instead.
The macOS version of mktemp does not recognize the --suffix option.
Using pure -d should work since, it seems [1], macOS 10.11 however.
So to make the script work on macOS, stop using the --suffix option.
The downside is of course that the temporary dir will have an anonymous
name, but I see no risk of confusion given how short-lived the usage of
the dir is, and given the context it is used.
[1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
This fixes#1438.
Note however, that using a pager such as less will add a newline itself.
So to actually not print a newline for such files, you need to either
disable paging:
bat --style=plain --paging=never no-newline-at-end-of-file.txt
or use a "pager" that does not add a newline:
bat --style=plain --pager=cat no-newline-at-end-of-file.txt
Note that we also update syntax tests file since a bunch of them had
missing newlines on the last lines.
Part of the work for issue #1213.
A short PowerShell script and the corresponding syntax-highlighted output
has been added. The script exhibits many of the peculiarities of the
PowerShell syntax.
This is to contribute to issue #1213. I took some of the more
complicated servers I am running as examples. Everything looks to be
correctly highlighted compared to vim's syntax highlighting.