Text Editing Commands via Compromise
An Obsidian Plugin
We're always doing the same text edits over and over again.
Any single change is fine -- but when you have to change a BUNCH of these across a whole sentence or paragraph, it can add up!
Can't the computer help us do these super-common changes?? (yes!)
This plugin uses the compromise library to automate these changes.
don't -> do not
4 -> four
four -> 4
5th -> fifth
seventh -> 7th
cacti -> cactus
cups of coffee -> cup of coffee
I will go to the store -> I went to the store
I will do it -> I will not do it
2/3 -> two thirds
two thirds -> 2/3
2, 3, 4 -> 1, 2, 3
- Install BRAT from the Community Plugins in Obsidian
- Open the command palette (
cmd+P
) - Select the
BRAT: Add a beta plugin for testing
command - Paste
https://github.com/caseywatts/obsidian-compromise
into the pop-up - Go to the
Community plugins
list and search forObsidian Compromise
to install AND enable the plugin - Voilá -- try it out with a test command
- Type
can't
, highlight that text, then run the command (cmd+p
)expand contraction
- Type
- clone this repo to
YourObsidianVaultFolder/
.obsidian/plugins
- Restart Obsidian
- enable the plugin in the settings
Usage:
- Highlight the text you want to change
- Run the command, either way:
- Command Palette
- Open the command palette (
cmd + p
) - Type the name of the command
- Open the command palette (
- Hotkeys (assign your own! the defaults here are bad so far -- what should they be?)
- Command Palette
- Nouns
- Pluralize
cat and dog -> cats and dogs
- Singularize
cats and dogs -> cat and dog
- Pluralize
- Sentence Tense
- To Past Tense
I will eat lunch -> I ate lunch
- To Present Tense
I will eat lunch -> I eat lunch
- To Future Tense
I ate lunch -> I will eat lunch
- To Past Tense
- Negative/Positive
- To Negative
I will do it -> I will not do it
- To Positive
I will not do it -> I will do it
- To Negative
- Contractions
- Expand Contractions
can't -> can not
- Contract Contractions
can not -> cann't
(warning: janky)
- Expand Contractions
- Cases
- To Uppercase
hello -> HELLO
- To Lowercase
Hello -> hello
- To Title Case
hello -> Hello
- To Camel Case
hi there -> hiThere
- To Uppercase
- Numbers
- Digits to Words
5 -> five
or5th -> fifth
or3/4
tothree fourths
- Words to Digits
five -> 5
orfifth -> 5th
- Ordinal to Cardinal
5 -> 5th
orfive -> fifth
- Cardinal to Ordinal
5th -> 5
orfifth -> five
- Digits to Words
- Math
- Increment Numbers
1, 2, 3 -> 2, 3, 4
- Decrement Numbers
2, 3, 4 -> 1, 2, 3
- Increment Numbers
- Acronyms
- Add Periods
FBI -> F.B.I.
- Remove Periods
F.B.I. -> FBI
- Add Periods