summaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
authorEduardo Pedroni <e.pedroni91@gmail.com>2017-07-10 07:54:52 +0200
committerEduardo Pedroni <e.pedroni91@gmail.com>2017-07-10 07:54:52 +0200
commit89f86bec9198c0e298be53a13ca753b491197376 (patch)
treeb39af303314ac5a491832490a9aa72c47c205706 /syntax
parentb3b6da8ae08a738b5548109e42eaad749d3234e3 (diff)
Added syntax highlighting for vim
Diffstat (limited to 'syntax')
-rw-r--r--syntax/fcard.vim11
-rw-r--r--syntax/flashcard.lang20
2 files changed, 31 insertions, 0 deletions
diff --git a/syntax/fcard.vim b/syntax/fcard.vim
new file mode 100644
index 0000000..b4a66d9
--- /dev/null
+++ b/syntax/fcard.vim
@@ -0,0 +1,11 @@
+" Vim syntax file
+" Language: flashcard files
+" Latest Revision: 10/07/2017
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn match cardTitle '^CARD: .*$'
+
+hi def link cardTitle Structure
diff --git a/syntax/flashcard.lang b/syntax/flashcard.lang
new file mode 100644
index 0000000..267f5b2
--- /dev/null
+++ b/syntax/flashcard.lang
@@ -0,0 +1,20 @@
+<?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>