when someone posts vb.net code with the line numbers, how can i cut and paste this code into my program without having to do it line by line?
Printable View
when someone posts vb.net code with the line numbers, how can i cut and paste this code into my program without having to do it line by line?
The workaround I usually do is:
1. Copy the code and paste in Ms-Word
2. Select all text and Click the Bullets & Numbering button to remove the numbers.
3. Copy code and paste in Visual Studio.
The other thing I find people often speaking is that it works OK in Opera browser. i.e. Text is not copied with bullets/line numbers.
(Though don't personally use Opera, so I can't be 100% sure. Maybe you could give it a try if it suits you.)
Google Chrome does not copy and paste line numbers. I didn't even know that it can be otherwise :lol:
Thread moved to 'Forum Feedback', which is where questions about site usage etc belong
A much simpler method is to press "Quote", as that shows the code without the tags working on it.
Apparently it is just FireFox that has the issue, and IE is fine too.Quote:
The other thing I find people often speaking is that it works OK in Opera browser. i.e. Text is not copied with bullets/line numbers.
Previously it was all browsers, but an update of the tags fixed it for most of them.
There used to be a VS 2005 plugin that you'd use to paste the vbcode tag code and it'd paste it without the line numbers, but that plug bit the dust or something a few years ago.
Because of the line numbers, I still post code using the [code] [/code] tags instead of the [highlight=vb] [/highlight] tags
Apparently it shouldn't be too hard to alter the code highlighter so it works for all browsers... the problem is that most people here do VB etc rather than the web based language(s) that it uses, and of course any changes would have to be checked by the Admins who deal with it.
A Firefox plugin would be a good work-around for long-term members, but it wouldn't be great for new members etc.
Hey,
.paul.'s Addin is fairly recent, and from what I understand, will do exactly what the OP is after. Have a look at it here:
http://www.vbforums.com/showthread.php?t=543154
Hope that helps!!
Gary
Or you first click on Quote button (at lower right end) of post, and from the text editor of following page, you can copy the code from quoted text. Just make sure you don't hit the submit button by any chance.
I wouldn't mind a FF plugin that just does it's thing automatically when something's copied to the clipboard.
Hey,
That is essentially what the addin for Visual Studio provides, apart from the work is done on the paste, rather than the copy.
Gary
Yea, except that I use 3 versions of VS.Net (soon to be a 4th) and I even copy and paste code from the HighLight tags into NetBeans (Java editor) so I'd have to have 5 versions of the extension, when all I run is 1 version of FF so a FF add-on would make much more sense (to me at least).
So I could go for a FF add-on
Ah, I see what you mean, fair point.
Gary