diff --git a/doc/_static/custom.css b/doc/_static/custom.css index 4b36230c7..cca33ff9f 100644 --- a/doc/_static/custom.css +++ b/doc/_static/custom.css @@ -1,5 +1,4 @@ -@import url(https://fonts.googleapis.com/css?family=Patua+One); -@import url(https://fonts.googleapis.com/css?family=JetBrains+Mono); +@import url(https://fonts.googleapis.com/css2?family=Patua+One&family=JetBrains+Mono:wght@400;700&display=swap); h1, h2, diff --git a/doc/translation_language.md b/doc/translation_language.md index 79b4e2cae..7d23e40f5 100644 --- a/doc/translation_language.md +++ b/doc/translation_language.md @@ -92,22 +92,23 @@ Glues the text. The operators below add or remove spaces between your last stroke and the one before that. -The names of the operators should say "retroactive", but have remained -"retrospective" for backward compatibility. - -:::{plover:operator} {\*?}; =retrospective_insert_space +:::{plover:operator} {*?}; =retro_insert_space; =retrospective_insert_space Adds a space between the last two strokes. For example, if your dictionary contained `PER` for 'perfect', `SWAEUGS` for 'situation' and `PER/SWAEUGS` for 'persuasion', you can force Plover to output 'perfect situation' by writing `{*?}`. +The name `=retrospective_insert_space` is _deprecated_; prefer `=retro_insert_space` instead. + _Suggested outline_: `AFPS` ("**A**dd **SP**a**C**e") ::: -:::{plover:operator} {\*!}; =retrospective_delete_space +:::{plover:operator} {*!}; =retro_delete_space; =retrospective_delete_space Delete the space between the last two strokes. For example, if you wrote 'basket ball', you could force them together into 'basketball' by writing `{*!}`. +The name `=retrospective_delete_space` is _deprecated_; prefer `=retro_delete_space` instead. + _Suggested outline_: `TK-FPS` ("**D**elete **SP**a**C**e") ::: @@ -153,7 +154,7 @@ _Default outline_: `KPA*` ::: :::: -:::{plover:operator} {\*-|}; {:retro_case:cap_first_word} +:::{plover:operator} {*-|}; {:retro_case:cap_first_word} Capitalizes the first letter of the previous word. This is useful in case you realize that a word should be capitalized after you've written it. For example, `cat` + `{*-|}{^ville}` = `Catville`. @@ -167,7 +168,7 @@ Forces the next letter to be lowercase, for example `{>}Plover` = `plover`. _Suggested outline_: `HRO*ER` ("lower") ::: -:::{plover:operator} {\*>}; {:retro_case:lower_first_char} +:::{plover:operator} {*>}; {:retro_case:lower_first_char} Rewrites the previous word to start with a lowercase letter, for example `Plover{*>}` = `plover`. @@ -180,7 +181,7 @@ Outputs the next word in all capital letters, for example `{<}cat` = `CAT`. _Suggested outline_: `KPA*L` ("cap all") ::: -:::{plover:operator} {\*<}; {:retro_case:upper_first_word} +:::{plover:operator} {*<}; {:retro_case:upper_first_word} Rewrites the previous word in all capital letters, for example `cat{*<}` = `CAT`. _Suggested outline_: `*UPD` @@ -281,7 +282,7 @@ Plover has an operator to format the last written number as a currency amount. The amount is written with either no decimal places or two, and commas are added every 3 digits. -:::{plover:operator} {\*([prefix]c[suffix])}; {:retro_currency:[prefix]c[suffix]} +:::{plover:operator} {*([prefix]c[suffix])}; {:retro_currency:[prefix]c[suffix]} Retroactively converts the previously written number into a currency amount. The number takes the place of the `c` in the format specification. @@ -377,7 +378,7 @@ Undoes the last stroke. _Default outline_: `*` ::: -:::{plover:operator} {\*+}; =repeat_last_stroke +:::{plover:operator} {*+}; =repeat_last_stroke Sends the last stroke entered. For example, `KAT{*+}{*+}` translates to `cat cat cat`. Especially useful for repeated keys, such as navigating around a document. @@ -385,9 +386,11 @@ a document. _Suggested outline_: `#` ::: -:::{plover:operator} {\*}; =toggle_asterisk +:::{plover:operator} {*}; =retro_toggle_asterisk; =retrospective_toggle_asterisk Toggles the asterisk key on the last stroke entered. For example, `KAT{*}` will -translate as if you wrote `KA*T`. +translate as if you wrote `KA*T`, and `KA*T{*}` will translate as if you wrote `KAT`. + +The name `=retrospective_toggle_asterisk` is _deprecated_; prefer `=retro_toggle_asterisk` instead. _Suggested outline_: `#*` ::: diff --git a/news.d/api/1639.new.md b/news.d/api/1639.new.md new file mode 100644 index 000000000..08cf02b65 --- /dev/null +++ b/news.d/api/1639.new.md @@ -0,0 +1 @@ +Renamed the `=retrospective_*` macros to simply `=retro_*`. The previous names are retained for backwards compatibility, but are now deprecated. diff --git a/plover/macro/retrospective.py b/plover/macro/retro.py similarity index 100% rename from plover/macro/retrospective.py rename to plover/macro/retro.py diff --git a/plover/translation.py b/plover/translation.py index 68abcfbcf..f619ad829 100644 --- a/plover/translation.py +++ b/plover/translation.py @@ -53,9 +53,9 @@ def unescape_translation(translation): _LEGACY_MACROS_ALIASES = { - '{*}': 'retrospective_toggle_asterisk', - '{*!}': 'retrospective_delete_space', - '{*?}': 'retrospective_insert_space', + '{*}': 'retro_toggle_asterisk', + '{*!}': 'retro_delete_space', + '{*?}': 'retro_insert_space', '{*+}': 'repeat_last_stroke', } diff --git a/setup.cfg b/setup.cfg index 0ed0a2eee..75b11b1d2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -82,9 +82,12 @@ plover.machine = TX Bolt = plover.machine.txbolt:TxBolt plover.macro = repeat_last_stroke = plover.macro.repeat:last_stroke - retrospective_delete_space = plover.macro.retrospective:delete_space - retrospective_insert_space = plover.macro.retrospective:insert_space - retrospective_toggle_asterisk = plover.macro.retrospective:toggle_asterisk + retro_delete_space = plover.macro.retro:delete_space + retro_insert_space = plover.macro.retro:insert_space + retro_toggle_asterisk = plover.macro.retro:toggle_asterisk + retrospective_delete_space = plover.macro.retro:delete_space + retrospective_insert_space = plover.macro.retro:insert_space + retrospective_toggle_asterisk = plover.macro.retro:toggle_asterisk undo = plover.macro.undo:undo plover.meta = attach = plover.meta.attach:meta_attach