From 58a4d009fa2c7ea024353d3ae4d44a052297d32a Mon Sep 17 00:00:00 2001 From: Florian Pigorsch Date: Mon, 21 Oct 2019 21:56:24 +0200 Subject: [PATCH] Add fstab file syntax --- assets/syntaxes/Fstab.sublime-syntax | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 assets/syntaxes/Fstab.sublime-syntax diff --git a/assets/syntaxes/Fstab.sublime-syntax b/assets/syntaxes/Fstab.sublime-syntax new file mode 100644 index 00000000..ae86c0a1 --- /dev/null +++ b/assets/syntaxes/Fstab.sublime-syntax @@ -0,0 +1,22 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: fstab +file_extensions: + - fstab +scope: source.fstab + +contexts: + main: + - match: '^\s*\#.*' + scope: comment.line.number-sign + - match: ^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(0|1)\s+(0|1|2)\s*$ + captures: + 1: entity.name.device.fstab + 2: entity.name.mountpoint.fstab + 3: entity.name.type.fstab + 4: entity.name.options.fstab + 5: constant.numeric.dump.fstab + 6: constant.numeric.pass.fstab + - match: '^.*$' + scope: invalid.illegal.fstab \ No newline at end of file