In emacs I can replace function (
with #(
in javascript with the following.
(font-lock-add-keywords
'js2-mode `(("\\(function *\\)(" ;; \\(function *\\
(0 (progn (compose-region (match-beginning 1) (match-end 1) "#") ;;ƒ
nil)))))
It's neat. But how would go about making the replacement # (
or something like fn (
.
I've tried hacking away at this to understand it... but not yet.