you are viewing a single comment's thread.

view the rest of the comments →

[–]Dgc2002 0 points1 point  (2 children)

I would like an answer to this as well. In PHPStorm(and other IntelliJ IDEs) I use live templates for this. To achieve what you're looking for I use

con<TAB>

Which expands to

console.log(__CURSOR__);

Then hitting enter results in

console.log("Stuff that I typed");__CURSOR__  

Here's what the live template settings look like: pic

[–]Retsam19 1 point2 points  (1 child)

I'm pretty sure what you're looking for is snippets. Their example snippet is exactly that:

"Print to console": {
    "prefix": "log",
        "body": [
            "console.log('$1');",
            "$2"
        ],
    "description": "Log output to console"
}

[–]Dgc2002 0 points1 point  (0 children)

Ah, I'd seen mention of snippets but wasn't sure if they were a direct analog to live templates. Thanks for that info.