Auto-replace text with symbols in IntelliJ IDE?

Viewed 111

VSCode has an awesome plugin Symbol Complete that auto-replaces phrases with symbols based on regular expression rules. For example, if I type "lambda", it gets replaced by λ as soon as I type the last character "a". I'd like to have this same functionality in IntelliJ, but I can't seem to find a similar plugin. Does something like what I'm looking for exist?

1 Answers

This doesn't directly answer the question, but I solved the problem (on Windows) by using AutoHotKey with its HotStrings.

Script:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

::lambda::λ
::pi::π

On MacOS, AHK isn't available, so I followed mwk's answer on this AHK forum post:

First, you may be able to accomplish all the key mapping you need via the stock system preferences on MacOS. Unlike, Windows, the Mac is very flexible > when it comes to managing keyboard shortcuts.

Apple Menu -> System Preferences -> Keyboard -> Shortcuts. You'll see a list > of the left side of the preference panel with a number of categories (Spotlight, etc.). The last item, "App Shortcuts", is where you can set your > own shortcuts for all applications or specific applications. It's amazing that Microsoft still doesn't offer this in Windows 10.

Related