0
Declined

Add prefix/suffix to selection

Khánh Lê 12 років тому оновлено Jon Skinner 12 років тому 4
Allow adding prefix/suffix to all lines in selection (similar to TextWrangler)

Відповідь

Відповідь
Declined
Thanks for providing the detailed followup information.

Sublime Text provides a natural way to edit multiple lines simultaneously: select the lines of interest, then use the "Selection/Split Selection into Lines" menu item to get one selection per line.

Once you have per-line selections, you can easily make batch edits modifying each line, without requiring a separate dialog.
Please provide more details for suggestions, this doesn't give much to go off
Can this not be achieved with multi-line typing? - you can add lines to the selection, then move the carets to the start or end of the lines and start typing/pasting.
Sorry for not stating my idea clearly.
Add and Remove Prefix or Suffix: These actions will prepend or append the supplied string to each line processed (or remove same).

This is how TextWrangler did it:

01. Select multi-line texts you want to add prefix/suffix, choose Prefix/Suffix Lines... from menu

02. Enter prefix and/or suffix values you want in the dialog

03. You have prefix/suffixed added to each lines
04. Now you want to remove suffix. Choose Prefix/Suffix Lines... from menu, then enter suffix value to be removed

05. If lines have same entered suffix, it will be removed as below



Відповідь
Declined
Thanks for providing the detailed followup information.

Sublime Text provides a natural way to edit multiple lines simultaneously: select the lines of interest, then use the "Selection/Split Selection into Lines" menu item to get one selection per line.

Once you have per-line selections, you can easily make batch edits modifying each line, without requiring a separate dialog.
I didn't know that. This implementation is much more convenient and powerful than TextWrangler's.
Thanks for your prompt support,