I’ve been searching for ways to make my code more concise, so I want to find a way to automatically replace an identifier with an abbrevation of that identifier (whenever I type that identifier). It would be similar to the “autocorrect” feature that is found in some word processors.
Example:
var con = console.log;
//from this point on, whenever I type "console.log" as a variable name, I want the text to be automatically replaced with "con"
use
It looks like you want to be able to use a kind of intellisense or autocomplete. Your editor should provide that. You can try Komodo Edit or Visual Studio (2012). In Komodo Edit the above code example leads to autocompletion (it shows
conif you typed ‘co’).