Search code examples
linesublimetext2text-editorcopy-pastesublimetext

How to paste text to end of every line? Sublime 2


I'm curious if there is a way to paste text to the end of every line in Sublime 2? And conversely, to the beginning of every line.

test line one

test line two

test line three

test line four

...

Say you have 100 lines of text in the editor, and you want to paste quotation marks to the beginning and end of each line.

Is there an easy way to do this or a plugin that anyone would know of? This would often save me a lot of time on various projects.

Thanks.


Solution

  • You can use the Search & Replace feature with this regex ^([\w\d\_\.\s\-]*)$ to find text and the replaced text is "$1".