- Make Hyphenated Lowercase
- Editor menu command
- 45 Installs
Readme
Editor menu command to change selected text to all-lowercase with hyphens between words ("kebab case") with common punctuation removed--such as to convert a mixed-case punctuated title or filename for use as an image name or URL slug.
Provided "as is." Use at your own risk.
By Morgan Adams, Adams Immersive
Keyboard shortcut: Cmd Ctrl - (minus)
Examples
"Why…?" (Why Not!)
becomes why-why-not
Fruit/PB & J
becomes fruit-pb-and-j
1 + 2 = 3
becomes 1-plus-2-equals-3
J.R.R. Tolkien's Work
becomes jrr-tolkiens-work
Notes
Removes leading/trailing whitespace (including line breaks) and converts all other runs of whitespace to a single hyphen each.
Any n-dashes, m-dashes, or any of the following characters are changed to ordinary hyphens (and existing hyphens are left as-is):
/ \ _ … ~
The following characters are simply removed:
. ! ? ¡ ¿ , ; : ( ) [ ] ' " ‘ ’ “ ” ` « » *
The following punctuation marks are converted to lowercase words (which may call for further human editing depending on context):
at\ number\ percent\ dollars\ equals\ plus\ degrees\ less-than\ greater-than
Other characters are left as-is.
Any runs of multiple hyphens are collapsed into single hyphens.
Changelog
Version 1.0
Initial release