diff options
author | Eddy Pedroni <epedroni@pm.me> | 2024-09-22 15:58:20 +0200 |
---|---|---|
committer | Eddy Pedroni <epedroni@pm.me> | 2024-09-22 15:58:20 +0200 |
commit | a2c2ec734380e50689b110976c88770e5731dd24 (patch) | |
tree | 2fb8d9cd4355829b664fb71c5eae294a897af641 | |
parent | 89f86bec9198c0e298be53a13ca753b491197376 (diff) |
Add new data format
-rw-r--r-- | data-format/ftdetect/fcard.vim (renamed from ftdetect/fcard.vim) | 0 | ||||
-rw-r--r-- | data-format/syntax/fcard.vim (renamed from syntax/fcard.vim) | 9 | ||||
-rw-r--r-- | syntax/flashcard.lang | 20 |
3 files changed, 8 insertions, 21 deletions
diff --git a/ftdetect/fcard.vim b/data-format/ftdetect/fcard.vim index f1cfbbf..f1cfbbf 100644 --- a/ftdetect/fcard.vim +++ b/data-format/ftdetect/fcard.vim diff --git a/syntax/fcard.vim b/data-format/syntax/fcard.vim index b4a66d9..9a5cce8 100644 --- a/syntax/fcard.vim +++ b/data-format/syntax/fcard.vim @@ -6,6 +6,13 @@ if exists("b:current_syntax") finish endif +" Legacy format syn match cardTitle '^CARD: .*$' - hi def link cardTitle Structure + +" New format +syn match cardFront '^FRONT$' +hi def link cardFront Structure + +syn match cardBack '^BACK$' +hi def link cardBack Constant diff --git a/syntax/flashcard.lang b/syntax/flashcard.lang deleted file mode 100644 index 267f5b2..0000000 --- a/syntax/flashcard.lang +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<language id="flashcard" _name="Flashcard" version="2.0" _section="Markup"> - <metadata> - <property name="globs">*.fcard</property> - </metadata> - - <styles> - <style id="card_front" _name="card header" map-to="def:type" /> - </styles> - <definitions> - <context id="flashcard"> - <include> - <context id="card_front" style-ref="card_front"> - <start>CARD:</start> - <end>$</end> - </context> - </include> - </context> - </definitions> -</language> |