force typo correct/replace

I want to have so that every time I mistype `cosnole` it is automatically corrected to `console` without me having to do anything. Any lead on how to accomplish this? I found no solutions on google.

 

Thanks

2 comments
Comment actions Permalink

Hi there,

What key do you usually press after mistyping your `cosnole`?

You could use Live Template for this if it's Space/Tab or alike. At very least I'm using this to automatically fix a few of my common mistypings. For example::

Other than that:

  • Try to use Code Completion so you can just select the right entry from the list.
  • You may use custom Live Template to expand a short abbreviation into a longer sequence (e.g. clog[TAB] -> console.log())

https://www.jetbrains.com/help/phpstorm/using-live-templates.html

0
Comment actions Permalink

Andriy, thanks, that's a great suggestion! I never looked into the live template but since the default JS live template already has a shortcut for console.log, I'll just be using that from now on!

Thanks

0

Please sign in to leave a comment.