Initial vim syntax for just
including: - operators - quotes/strings - raw quotes/strings - backtick sub-shells - curly substitutions - "set shell" handling
This commit is contained in:
55
vim-just/example/justfile
Normal file
55
vim-just/example/justfile
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env oh-no
|
||||
# vim:filetype=just
|
||||
|
||||
set shell := ["python", "-c"]
|
||||
set something
|
||||
|
||||
alias d := dogs
|
||||
|
||||
export HOTDOGPARTY := hats
|
||||
|
||||
now_ish := `print("oh gee")` + `print(sum([1, 2, 5]))`
|
||||
|
||||
an_string := "sit ready \"for reals\" 'uh huh' {{an_raw_string + '{{what' }}"
|
||||
|
||||
an_raw_string := 'sit ready "wow" {{not_gonna}}'
|
||||
|
||||
hats := '''
|
||||
very serious hat's
|
||||
'''
|
||||
|
||||
wats := """
|
||||
{{an_string}} \"yay\" 'ok'
|
||||
|
||||
{{ 'dog' + just_executable()}}
|
||||
|
||||
{{justfile()}}
|
||||
|
||||
{{justfile_directory()}}
|
||||
|
||||
{{arch()}} {{os()}}
|
||||
"""
|
||||
|
||||
serious_business := ```
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import datetime
|
||||
|
||||
print(f"home: {os.environ.get("HOME", "?")}")
|
||||
print(f"now-ish: {datetime.datetime.now()}")
|
||||
```
|
||||
|
||||
dogs: aminal manimal _secret
|
||||
|
||||
# show the aminal by kind
|
||||
aminal kind='dog':
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
import os
|
||||
print('\n'.join(os.environ.keys()), file=sys.stderr)
|
||||
|
||||
_secret +WHATEVER='OK':
|
||||
@echo "don't tell anyone {{WHATEVER}}"
|
||||
|
||||
manimal:
|
||||
@echo wow
|
||||
Reference in New Issue
Block a user