1

With abbrev mode, I can define abbreviations that trigger when I type a certain term. For example, typing "yn" would be expanded to "Your Name". For this, "yn" must have been defined as an abbreviation before hand.

What I'm looking for is a setup in which rather than specifying the abbreviation terms explicitly, I can specify a regular expression that when matched gets expanded by the defined instructions.

A simple example would be that everytime I type a website as

website_name.org 

it gets expanded to

https://website_name.org 

I'm specifically looking for a solution that works like abbrev in that I don't have to invoke a command after typing my abbreviation to have it converted.

  • 1
    Setabbrev-expand-function to a function that does what you want, in terms of matching a given regexp? – Drew Jan 9 '16 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.