Now "Paste As.." in VS.NET with Smart Paster Add-In

I don't know about you guys (and gals), but I often find myself pasting large string literals (SQL queries or dialogs) into code. It started to become quite a hassle to fire up EditPlus, paste, replace line breaks with quote characters, copy, and paste it into Visual Studio. So, I put together an add-in to help with this task and called it Smart Paster.

It works for both VB and C#, and will wordwrap if you'd like it to. Not sure if you'll find it useful, but it's yours for the taking, along with the source code (which is installed in it's Program Files folder). If you'd like, you can grab it here: <removed, get the newer version instead, see below> 

I'd really appreciate some feedback if you find it useful, or if can think of any other features to add. Oh, and if there is already one of these out there, sorry about that. I was more in a Write-An-Add-In mood than a Search-For-An-Add-In mood.

OMISSION: I forgot to give props to Jason Mauss for suggesting the Paste As Region option. Thanks Jason!

EDIT: Version 1.1 is avaiable here:


  • Very very nice, thanks Alex!

  • Sweet! this looks very useful. Any chance of being able to customize the pasting options, in the next version? For example, to dynamically add the option: paste as Html. Or for another example, remove paste as Region, if not needed...

  • Have you submitted this to Royo's VS lugin contest? If not, whatcha waiting for??

  • Great util. I'd like to be able to set up keyboard shortcuts to each of the commands. However I could not find the commands in the keyboard mapping. Also the formatting of the region block was not to my liking I'd like to see auto formatting run on the paste region to clean up the code. Also it would be nice to paste returns as Environment.Newline for C#.

    I think you have made a great tool here. Keep it up.

  • ??

    Why don't you just do you strings like so?

    someStr = @&quot;



    string here.

    I don't need any quotes

    or pluses anywhere


  • chadbr,

    In 1.1, you can configure it to Paste As a line-spanning string literal.

    - Alex

Comments have been disabled for this content.