You can create a corresponding Live Template (Settings / Live Templates) as shown below:
(function () {
'use strict';
$SELECTION$
}());
Be sure to set the context (Applicable B ...) to "JavaScript".
The template can be applied using Code/Surround with live template (Ctrl+Alt+J)
source
to share