aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-04-20 00:56:29 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commit4319bde78b32d42d20b43c1ebd79095409db399e (patch)
treec129e13ba41e497de67f87cc2fc27358d9cce5ae /README.md
parentc2d0c6b0b699513ede65ecef40d7afaccff53ee4 (diff)
downloadrde-4319bde78b32d42d20b43c1ebd79095409db399e.tar.gz
rde-4319bde78b32d42d20b43c1ebd79095409db399e.tar.bz2
rde-4319bde78b32d42d20b43c1ebd79095409db399e.zip
Add macro support to WML.
Macros may be defined by using <M-d> <M-d>w begins defining a windowset macro <M-d>t begins defining a workspace macro The next character typed is the key chord to save the macro to. The next sequence of keys read up until the Return key is the macro value. This macro may then be used as WML objects. Macros are pretty primitive right now. I need to think about if it would be worthwhile to make these macros either take arguments or add some kind of state to WML a la sed to take a step to make the language Turing complete, and if such a development would actually be desirable. If anything it would be an academic exercise.
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 23 insertions, 4 deletions
diff --git a/README.md b/README.md
index 06a8631..0d6bfb9 100644
--- a/README.md
+++ b/README.md
@@ -155,10 +155,6 @@ workspaces.
* `.`: The current workspace
* `[`: The next non-visible workspace to the right of this one.
* `]`: The next non-visible workspace to the left of this one.
- * `{`: The workspace on the screen to the left of the current workspace
- (equivalent to `;.`)
- * `}`: The workspace on the screen to the right of the current workspace.
- (equivalent to `,.`)
* `(`: The next workspace to the right
* `)`: The next workspace to the left
* `^`: The workspace on the rightmost screen.
@@ -274,3 +270,26 @@ exactly what one is wanting to do.
workspace x to worksapce x.
* `,;x` is just references x for any x because the `;` undos the `,`
+
+#### Macros
+
+Remembering and using some of these key sequences can be troublesome, especially
+if that key sequences is used often. For this reason, RDE has the ability to
+record macros to reference these objects.
+
+To record a macro, type `<M-d>` then if
+ * You want to record a windowset macro, type `w`
+ 1. Type the key chord to record the macro to (Ctrl+characters work well)
+ 1. Type the key sequence to record and hit `<Return>`
+ * You want to record a workspace macro, type `t`
+ 1. Type the key chord to record the macro to (Ctrl+characters work well)
+ 1. Type the key sequence to record and hit `<Return>`
+
+Example:
+
+If one types `<M-d>w+\@..<Return>` this will record the macro `\@..` (Which
+references all windows on the current workspace except the current window) as
+`+`, so now one can type `<M-s>+_` to kill all the windows on the current
+workspace except the current window.
+
+NOTE: Recursive macros are not prohibited. Be careful!