How To Insert Incrementing Numbers with words by Multicursor in jetbrains IDE(IntelliJ IDEA)?

后端 未结 5 1038
既然无缘
既然无缘 2021-02-03 21:53

I want to add Incrementing Numbers with words by Multicursor in jetbrains IDE(IntelliJ IDEA) .

Is there any way to do it by Live template? I want to do things like this

相关标签:
5条回答
  • 2021-02-03 21:58

    The plugin is not working on my WebStorm, there could be another way using unix command line:

    seq 1 10 | xargs printf 'string%d\n'

    0 讨论(0)
  • 2021-02-03 21:58

    in Visual Studio Code:

    block select using alt+shift+a

    then ctrl+shift+p

    type increment and you will see Emmet: Increment by 1. Hit enter.

    you can do your custom emmet by typing the correct line, e.g. Emmet: Decrement by 5.3

    0 讨论(0)
  • 2021-02-03 22:11

    Tried plugin "String Manipulation" ... But (7.2.182.000.3 June18, 2019) does not work in Clion 2019.2

    0 讨论(0)
  • 2021-02-03 22:15

    I thought the String Manipulation plugin was broke, but it was just because I didn't get things set up correctly. I guess I thought it was automagical.

    Make sure that you have a "0" for each string/line that you'd like to increment.

    Try copying this HTML and pasting it into your JetBrains IDE:

    <label>
      <textarea>String 0</textarea>
      <textarea>String 0</textarea>
      <textarea>String 0</textarea>
      <textarea>String 0</textarea>
      <textarea>String 0</textarea>
    </label>
    

    Select everything between the <label> tags...

    And use the shortcut ⌥M (or search everywhere with ⇧⇧) and use Repeat - Create Sequence.

    0 讨论(0)
  • 2021-02-03 22:16

    You could use String Manipulation plugin to do that (Increment/Decrement | Increment duplicate numbers).

    0 讨论(0)
提交回复
热议问题