Plugin to expand abbreviations

Hey :wave:

I tried to make a little plugin for the first time a little while ago, so I decided to share it.

My plugin allows you to define abbreviations for words that will be expanded when you type them. This is useful for words that you often misspell or for words that you want to expand into longer words or sentences.

It’s name is Abbreviations Plugin, it is waiting for validation atm. When I will fix my screen recording issues, I will showcase it here and on the project’s README.

Feel free to try it and give feedback. :smile:

Yann “WoodenMaiden”

2 Likes

How is it better than or different from plugins already on the market like Typing Transformer and several others?

Thanks for this. I was just looking for something similar to this plugin a few days ago.

So far, so good! (Installed with BRAT)

But why would anyone limit themselves to just Obsidian? I think that’s a bad decision to make in the long run.

Instead of using a plugin that lets you expand abbreviations in Obsidian, you should consider a more global approach like Espanso (if you’re a cross-platform yaml fan) or PhraseExpress (if you’re on windows) that lets you do that in every app, be it your email, word processor, browser, you name it.

1 Like

Thank you very much for this. In answer to another post, I think it is more user-friendly than Typing Transformer. Some possible refinements would be an abbreviation which expanded into a word the case of which depended on the abbreviation - so cm = claimant, Cm = Claimant. Also as well as the space being a trigger for an expansion, it would be useful to have any punctuation to trigger the expansion - so including a full stop, apostrophe, closing bracket etc. This would mean prefixes like “w/” for “with” could be expanded for words like “withheld”. I don’t know if it would be possible to get CTRL+Z to unmake an expansion, but that would also be really useful. Many thanks!

What could be easier than having typed something in and have automatically trigger (as in iOS built-in replacements), where you can even specify where you want your cursor to be after the replacements.

Some rules you feed the plugin’s settings:

# Typing Transformer rules:
'].3|' -> '\[...\]|'
'-3|' -> '---|'
'`3|' -> '```|'
',3|' -> '```|'
'`4|' -> '````|'
',4|' -> '````|'
'\'3|' -> '```|'
'\'4|' -> '````|'
'--|' -> '–|'
'–-|' -> '—|'
'-–|' -> '—|'
'<<|' -> '«|'
'>>|' -> '»|'
'>2|' -> '>>|'
'<-|' -> '←|'
'->| ' -> '→|'
'<==|' -> '⇐|'
'==>|' -> '⇒|'
'1/2|' -> '½|'
'1/3|' -> '⅓|'
'1/4|' -> '¼|'
'3/4|' -> '¾|'
'1/10|' -> '⅒|'
'1/5|' -> '⅕|'
'2/3|' -> '⅔|'
'4/5|' -> '⅘|'
'/=|' -> '≠|'
'=/|' -> '≠|'
'+-|' -> '±|'
'-+|' -> '±|'
'F1|' -> '[^1]|'
'F2|' -> '[^2]|'
'F3|' -> '[^3]|'
'F4|' -> '[^4]|'
'F5|' -> '[^5]|'
'F6|' -> '[^6]|'
'F7|' -> '[^7]|'
'F8|' -> '[^8]|'
'F9|' -> '[^9]|'
'f1|' -> '[^1]|'
'f2|' -> '[^2]|'
'f3|' -> '[^3]|'
'f4|' -> '[^4]|'
'f5|' -> '[^5]|'
'f6|' -> '[^6]|'
'f7|' -> '[^7]|'
'f8|' -> '[^8]|'
'f9|' -> '[^9]|'
'Yinfo|' -> '> [! ]|'
# Subscripts and Superscripts
'Ysub0|' -> '₀|'
'Ysub1|' -> '₁|'
'Ysub2|' -> '₂|'
'Ysub3|' -> '₃|'
'Ysub4|' -> '₄|'
'Ysub5|' -> '₅|'
'Ysub6|' -> '₆|'
'Ysub7|' -> '₇|'
'Ysub8|' -> '₈|'
'Ysub9|' -> '₉|'
'Ysup0|' -> '⁰|'
'Ysup1|' -> '¹|'
'Ysup2|' -> '²|'
'Ysup3|' -> '³|'
'Ysup4|' -> '⁴|'
'Ysup5|' -> '⁵|'
'Ysup6|' -> '⁶|'
'Ysup7|' -> '⁷|'
'Ysup8|' -> '⁸|'
'Ysup9|' -> '⁹|'
'Ysupa|' -> 'ᵃ|'
'Ysupb|' -> 'ᵇ|'
'Ysupc|' -> 'ᶜ|'
'Ysupd|' -> 'ᵈ|'
'Ysupe|' -> 'ᵉ|'
'Ysupf|' -> 'ᶠ|'
'Ysupg|' -> 'ᵍ|'
'Ysuph|' -> 'ʰ|'
'Ysupi|' -> 'ⁱ|'
'Ysupj|' -> 'ʲ|'
'Ysupk|' -> 'ᵏ|'
'Ysupl|' -> 'ˡ|'
'Ysupm|' -> 'ᵐ|'
'Ysupn|' -> 'ⁿ|'
'Ysupo|' -> 'ᵒ|'
'Ysupp|' -> 'ᵖ|'
'Ysupr|' -> 'ʳ|'
'Ysups|' -> 'ˢ|'
'Ysupt|' -> 'ᵗ|'
'Ysupu|' -> 'ᵘ|'
'Ysupv|' -> 'ᵛ|'
'Ysupw|' -> 'ʷ|'
'Ysupx|' -> 'ˣ|'
'Ysupy|' -> 'ʸ|'
'Ysupz|' -> 'ᶻ|'
'Ysup-|' -> '⁻|'
# Diacritics with all kinds of variants
'Yavar|' -> 'áāăặǎâấầẩäǟȧǡạȁàảȃąẚåǻḁãå̄|'
'YAvar|' -> 'ÁĂẶǍÂẤẦẨÄǞȦǠẠȀẢȂĀĄÅǺḀÃÀÅ̄|'
'Ybvar|' -> 'ḅḇƀᵬᶀƁɓƂ|'
'YBvar|' -> 'ḂḃḄḆɃ|'
'Ycvar|' -> 'çčĉćḉċc̄c̅ȼ|'
'YCvar|' -> 'ÇČĈĆḈĊC̄C̅Ȼ|'
'Ydvar|' -> 'ďđḋḍḏḑḓɖɗð|'
'YDvar|' -> 'ĎĐḊḌḎḐḒƉƊÐ|'
'Yevar|' -> 'ēééěèèȅêęęëėẹẽĕȇȩę̋ḕḗḙḛḝė̄ê̄ê̌|'
'YEvar|' -> 'ĒÉĚÈÊĘËĖẸẼḖ|'
'Yfvar|' -> 'ḟƒ|'
'YFvar|' -> 'ḞƑ|'
'Ygvar|' -> 'ǵġĝǧğģǥg̃|'
'YGvar|' -> 'ǴĠĜǦĞĢǤ₲|'
'Yhvar|' -> 'ȟĥħḩḫẖḣḥḧƕⱨ|'
'YHvar|' -> 'ȞĤĦḨḪḢḤḦǶⱧ|'
'Yivar|' -> 'ıīi̅íǐĭìîįį́ïḯɨ|'
'YIvar|' -> 'ĪI̅ÍǏĬÌÎİĮÏḮƗ|'
'Yjvar|' -> 'ĵ|'
'YJvar|' -> 'ĴJ̃|'
'Ykvar|' -> 'ķǩḱḳḵƙⱪ|'
'YKvar|' -> 'ĶǨḰḲḴƘ₭|'
'Ylvar|' -> 'ĺḹl̅ḷľŁłȽƚl̥|'
'YLvar|' -> 'ĹḸL̅Ḷ|'
'Ymvar|' -> 'ḿṁṃm̀ᵯm̂m̄m̌ɱ|'
'Ynvar|' -> 'ñńņňɲŋƞǹȵɳṅṇn̄ṉṋn̓|'
'YNvar|' -> 'ÑŃ|'
'Yovar|' -> 'ōō̂ṓóǒòôöőőøǫǫ́ȱṏȯo|'
'YOvar|' -> 'ŌŌ̂ṒÓǑÒÔÖŐŐØǪǪ́ȰṎȮ|'
'Ypvar|' -> 'ƥṕṗp̄|'
'Yrvar|' -> 'ŕřȑȓɼɽɾṙṛṝṟr̃|'
'YRvar|' -> 'Ř|'
'Ysvar|' -> 'şŝșṩṥṡṧšśṣ|'
'YSvar|' -> 'ŞŜṨṤṠṦŠŚ|'
'Ytvar|' -> 'ƫțţʈŧťṫṭ̄tẗṯ|'
'YTvar|' -> 'ȚŢƮŦŤṪṬṮ|'
'Yuvar|' -> 'ūúǔùŭûüůųũűȕṳṵṷṹṻ|'
'YUvar|' -> 'ŪǓÙŬÛÜŮŲŨŰȔṲṴṶṸṺ|'
'Yvvar|' -> 'ṽṿv̇v̅|'
'YVvar|' -> 'ṾṼV̇V̅|'
'Ywvar|' -> 'ẃẁŵẘẅẇẉʍʷʬ|'
'YWvar|' -> 'ẂẀŴẄẆẈ|'
'Yxvar|' -> 'ẍẋᶍx̂x̄x̱|'
'YXvar|' -> 'ẌẊX̂X̄X̲|'
'Yyvar|' -> 'ỳýÿȳƴẏȳɏŷ|'
'YYvar|' -> 'ỲÝŸȲƳẎȲɎŶ¥|'
'Yzvar|' -> 'žżẓźẕẑʐʑȥƶ|'
'YZvar|' -> 'ŽŻẒẔẐŹƵ|'
  • So when in the editor you type Yuvar – where Y is a function character, u refers to the letter and var refers to the command – you’ll get ūúǔùŭûüůųũűȕṳṵṷṹṻ. You can even specify elaborate callouts, e.g. 'Ycall|' -> '> [! ]\n> ##### Some heading \nSome line. \n>> Some more lines... \n> \n Some more \n>> Some more again \n> \n>- Some comment at the end|'.