summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-12-04 12:49:15 +0100
committerTor Andersson <tor@ccxvii.net>2024-12-04 12:49:15 +0100
commit93bba111900af7cbae7ec72c29e6bd0f8ab900e9 (patch)
tree4c3941777bc73a72d38078f54aa6dec0bc252f35
parent6e23b26f70f68c686e9f65af29bc35792b76938e (diff)
downloadrommel-in-the-desert-93bba111900af7cbae7ec72c29e6bd0f8ab900e9.tar.gz
Add .exrc for folding.
-rw-r--r--.exrc2
-rw-r--r--rules.js2
2 files changed, 4 insertions, 0 deletions
diff --git a/.exrc b/.exrc
new file mode 100644
index 0000000..07e6315
--- /dev/null
+++ b/.exrc
@@ -0,0 +1,2 @@
+set foldmethod=expr
+set foldexpr=getline(v:lnum)=~'//\ ==='?'>1':'='
diff --git a/rules.js b/rules.js
index b3e1385..40704eb 100644
--- a/rules.js
+++ b/rules.js
@@ -53,6 +53,8 @@ function debug_hexes(n, list) {
console.log("".padStart(y," ") + list.slice(y*hexw, (y+1)*hexw).map(x=>String(x).padStart(2, ' ')).join(""))
}
+// === CONSTS ===
+
const AXIS = 'Axis'
const ALLIED = 'Allied'