Shorthand abbreviations expand to full text.

Latest Version

Version
1.1.0
Update
June 14, 2021
Size
7.0KiB
Developer
Category
Users
125
Rating
3.5 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
Storage
ActiveTab
Scripting
See more

Text Expander Extension

Expand a snippet of text to a longer form, using a hotkey (e.g., \"so\" → \"site:stackoverflow.com\"). Works in most text inputs, such as search boxes and multi-line comment fields.

Adding a text snippet:
• Click/open the extension.
• In the first box: enter the abbreviated text, without spaces, to be replaced a longer form in the second text box.
• In the second box: enter the expanded form, replacing the \"prefix\" text from the first box.

To use a saved snippet:
• In any input box, type your prefix text and use the assigned shortcut (default is \"Ctrl+Shift+G\".
• For the expansion to work, the prefix text must be separated from other words by a space.
• The caret (blinking text cursor) must be on or around the prefix word. For example, lets say the pipe character (|) is your caret placement:

how to exit vim? so| (valid)
how to exit vim? s|o (valid)
how to exit vim? |so (valid)
how to exit vim?| so (invalid)

To remove a text snippet:
• Click/open the extension.
• Check any boxes you'd like removed.
• Click the \"Remove\" button and reopen the extension.

Notes and limitations:
• Expansion won't work in some input fields.
• Expansion won't work in the Omnibox (Chrome's address bar/search bar).
• Expansion won't work in the startup page search bar.
• The prefix text doesn't need to be highlighted.
• The prefix-expansion pair is saved locally on your browser.

Change Notes:
[1.1.0]
• Changes: 2nd input box now changed to
 to allow multi-line expansions.
• Bug fix: Long expansions in the extension are now scrollable.
• Bug fix: Removing local storage items doesn't refresh list.

Check the source code on GitHub:
https://github.com/ssmooncoder/text-expander
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "name": "Text Expander", "author": "Samuel Moon", "description": "Shorthand abbreviations expand to full text.", "version": "1.1.0", "manifest_version": 3, "background": { "service_worker": "background.js" }, "action": { "default_title": "Add or Remove Entries", "default_popup": "popup.html" }, "permissions": ["storage", "activeTab", "scripting"], "commands": { "expand": { "suggested_key": { "default": "Ctrl+Shift+G", "mac": "MacCtrl+Shift+G" }, "description": "Expand text under cursor if available." } }, "content_scripts": [ { "matches": ["http://*/*"], "js": ["expand.js"] } ]}
Read more