Remove/Add Line Breaks after Specific String using Sublime Text

后端 未结 4 551
一生所求
一生所求 2021-01-29 17:54

Using Sublime Text 2 - Is it possible to insert a line break/text return after a specific String in a text file e.g. by using the FindReplace

4条回答
  •  借酒劲吻你
    2021-01-29 18:39

    You should probably use multiple cursors. See the unofficial documentation, or this nice tutorial. Here's some brief instructions to set you on your way:

    1. Put the cursor on the string of interest.
    2. Type Command+D (Mac) or Control+D (Windows/Linux) to select the current instance of the string.
    3. Type Command+D (Mac) or Control+D (Windows/Linux) to select successive instances of the string.
    4. Alternately, type Control+Command+G (Mac) or Control+Command+G to select all instances of your string.
    5. Now you have multiple cursors, so insert or remove your newline as you please.
    6. (type esc to exit multiple cursor mode.)

    Have fun!

提交回复
热议问题