Alt-I: Custom Insert

Performs variable expansion on an environment variable, and insert the results at the cursor. You can define up to three variables, each with its own hotkey(s).

nDefault Hotkey:Set Hotkey With:Environment Variable:
1Alt-IEDITKEYS /K13:keyInsert-1
2noneEDITKEYS /K14:keyInsert-2
3noneEDITKEYS /K15:keyInsert-3

You can use internal variables and functions in the environment variable. Be sure to either double all percent signs, or else enclose the entire value in strong quotes, when you SET the variable.

If the corresponding environment variable is not defined, the plugin will use %_ISODATE as a default value. If the variable is defined, but variable expansion produces an empty string, the plugin will beep.


rem   Use Alt-T to insert the current time:
editkeys /k14:alt-t
set insert-2=`%_time`

rem   Use Alt-N for the current directory's name:
editkeys /k15:alt-n
set insert-3=`%@name[%_cwd]`

EDITKEYS /S saves the three environment variables Insert-1, Insert-2, and Insert-3 to the registry. They will be restored when the plugin is reloaded, or by EDITKEYS /R.