Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
549 views
in Technique[技术] by (71.8m points)

sublimetext2 - Sublime Text 2 multiple line edit

I want to edit multiple lines and every "word" within that line. For example:

45 28 42 65
24 87 47 95
01 25 87 98

I want to select every whole number in all lines and put a "0x" before it so it would look like:

0x45 0x28 0x42 0x65
0x24 0x87 0x47 0x95
0x01 0x25 0x87 0x98

I know the Ctrl+shift+L to get cursors on each line, but how can I get the cursors in front of every number to mass edit all at once?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Highlight the lines and use:

  • Windows: Ctrl+Shift+L
  • Mac: Cmd ?+Shift+L

You can then move the cursor to your heart's content and edit all lines at once.

It's also called "Split into Lines" in the "Selection" menu.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...