aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/color.tes7
-rw-r--r--lib/fnkeys.tes23
2 files changed, 30 insertions, 0 deletions
diff --git a/lib/color.tes b/lib/color.tes
index f732848..dcf2065 100644
--- a/lib/color.tes
+++ b/lib/color.tes
@@ -79,4 +79,11 @@
!* Set up brace lightning *!
:M[color.bracelight],34M[color.set]
:M[color.error],35M[color.set]
+
+ !* Configure fold margin *!
+ :M[color.linenumber]U.fU.b
+ Q.b,1ESSETFOLDMARGINCOLOUR Q.b,1ESSETFOLDMARGINHICOLOUR
+ 10000++,30ESMARKERDEFINE Q.f,30ESMARKERSETFORE Q.b,30ESMARKERSETBACK
+ 10000+-,31ESMARKERDEFINE Q.f,31ESMARKERSETFORE Q.b,31ESMARKERSETBACK
+ (2^*30 # 2^*31),2ESSETMARGINMASKN 0,2ESSETMARGINTYPEN
}
diff --git a/lib/fnkeys.tes b/lib/fnkeys.tes
index 3fd0701..3445342 100644
--- a/lib/fnkeys.tes
+++ b/lib/fnkeys.tes
@@ -117,6 +117,12 @@
1U[ CLOSE]
!*
+ * F1 toggles __all__ folds.
+ *!
+@[ F1]{(2ESFOLDALL{-14D}}
+1U[ F1]
+
+!*
* Zoom with F9/F10 if function keys are enabled.
* This is automatically rubbed out.
*!
@@ -136,9 +142,26 @@
* Ctrl+right click: Insertion beginning of line
* Scroll wheel: scrolls (faster with shift)
* Ctrl+scroll wheel: zoom (GTK-only)
+ *
+ * Also, you can click on the folding margin to toggle folds.
*!
@[MOUSE]{
-2EJESCHARPOSITIONFROMPOINTU.p
+
+ -2EJU.x ESGETMARGINLEFTU.r
+ ESGETMARGINS<
+ Q.rU.l Q.iESGETMARGINWIDTHN%.r
+ Q.x-Q.l+1"> Q.x-Q.r"< !* mouse within margin i *!
+ Q.iESGETMARGINMASKN&(-33554432)"N !* folding margin *!
+ -EJ-2"= !* mouse released *!
+ Q.pESLINEFROMPOSITIONESTOGGLEFOLD
+ {-9D}
+ '
+ '
+ 1; !* handle like click in text area *!
+ ' '
+ %.i>
+
-4EJ&2"N Q.pESLINEFROMPOSITIONESPOSITIONFROMLINEU.p '
1,Q.pESWORDSTARTPOSITION:U.#ws
1,Q.pESWORDENDPOSITION:U.#we