closes#1510
The change in `create_highlighted_versions.py` fixes a "unknown theme
"'1337'" warning. The single quotes were wrong. `bat` was always falling
back to the default theme, so let's use that for now.
**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.
I added a sample etc/hosts file and a sample requirements.txt file. I didn't know there was already a sample YAML file because it wasn't ticked in the issue so I added some extra syntax that I had in my own to the previous example.yaml file.
#1244 Slightly optimized create_highlighted_versions.py so that it won't walk the source path when it should be skipping the file
#1244 Updated README.md in plaintext source folder
#1244 Added extra option loading from `bat_options` file in directory and significantly reduced size of plaintext source
#1244 Updated create_highlighted_versions.py to ignore README.md files and use the --show-all option for manually-defined binary files
#1244 Updated plaintext file with command
bat -A --no-config --style=plain --color=always --theme='1337' --italic-text=always src/Plaintext/plaintext.txt > highlighted/Plaintext/plaintext.txt
#1244 Added example plaintext file