Language Specific Macro?

I’ve got the following macro which allows one to press “shift+enter” from the middle of a line to make a new line.

if (komodo.view) { komodo.view.setFocus(); }

This works as expected when I’m editing any PHP file, but when I’m editing a Javascript file, it doesn’t work at all. Is there some kind of setting that is making this macro only work for certain languages?

var lang = require("ko/editor").getLanguage();
if (lang == "PHP") {
//do php stuff
1 Like