Quantcast
Channel: Active questions tagged keymapping - Stack Overflow
Viewing all articles
Browse latest Browse all 80

Is it possible to insert an exact live template using keymap shortcut in WebStorm?

$
0
0

I am currently using WebStorm for dev, so I want to know is it possible to insert an exact live template using keymap shortcut in WebStorm ?

For example:

  1. Select a variable;
  2. Then press Ctrl + L, it will inset a template code to next line.

Like this one in VS Code:VS Code gif example

I know some usage like .log, but seems it will break the original code and it not what I expecting.

And I also found a plugin called logit accroding to this post, but it seems just can insert one pattern, not so 'customize'.

AFAIK I can implement this in VSCode like this below:

// keybindings.json{"key": "ctrl+l","command": "runCommands","when": "editorHasSelection && editorTextFocus && !editorReadonly","args": {"commands": ["editor.action.clipboardCopyAction","editor.action.insertLineAfter",        {"command": "editor.action.insertSnippet","args": {"snippet": "console.log('${1:$CLIPBOARD} :>>', ${1:$CLIPBOARD});"          }        }      ]    }}

Viewing all articles
Browse latest Browse all 80

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>