How to duplicate text in PHPStorm?


Example:

  • I enter - ;
  • I press some combination of hot keys;
  • I enter the number 30 ;
  • I press Enter ;
  • I get ------------------------------ .

Like in Vim.

1 answer 1

'File | Settings | Editor | Live Templates'

You can also create your own expressions using variables.

  • I actively use Live Templates, that's why the question arose :) At the moment I made snippets ala -40 , -80 etc, which are expanded into a corresponding number of characters, but maybe there is some plugin or this feature “embedded” in JetBrains , but we do not know :) - Roman Grinyov
  • By the way, do not know by chance, why they can not be imported? That is, I export settings from one PHPStorm (I looked: they (templates) are inside the archive) and import them into another: all settings are applied, except for my Live Templates . Tried also through the Settings Repository... - the same trouble? - Roman Grinyov