Search code examples
javascriptphpstormwebstorm

Is there a way to create a hotkey to print a specific string in PhpStorm


I wanted to bind a string-paste to a specific hotkey, I use console.log a lot and really would help to have it binded on a hotkey.


Solution

  • You can create a Live template in

    Preferences | Editor | Live templates

    that would expand into a code snippet once you type the selected abbreviation and hit Tab.

    For example, I write "cl" and when I press tab it transforms into console.log(|)