|
That's very cool, even if VS 2013 does give each paste the same name, "HTML Fragment," and force you to context-click and select "Edit Name" to edit their titles.
I note you can also add multiple new tabs to the ToolBox view in code-edit mode.
thanks for a great find !
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
You haven't been watching any coding related video's on Chennel 9, have you? They've been using that trick since it was implemented in VIsual Studio.
|
|
|
|
|
So, I'm a slow learner...9 years isn't bad!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
This has been a fairly common technique for doing coding sessions. Even faster when you assign keyboard shortcuts.
|
|
|
|
|
Thanks, Nish-ji,
I have just been searching for information on assigning a keyboard short-cut to a text-edit window saved ToolBox item without success. I can't find anything in VS's in Tools/Options/Environment/KeyBoard configuration Panel that looks relevant.
Appreciate a pointer to how to do this !
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
BillWoodruff wrote: -ji,
By any chance are you a fan of C. J. Cherryh's Foreigner[^] series of novels? That looks suspiciously like an atevi familiar form of address.
Yes, it's an Obscure Reference Friday™ .
Software Zen: delete this;
|
|
|
|
|
Hi Gary-ji,
No, I have not heard of Cherryh's work, but it sounds interesting; in Hindi, suffixing "ji" onto a first name is a kind of affectionate honorific, an expression of esteem for the one addressed, but perhaps less formal (?) than prefixing the name with "Sri."
It would be wonderful to find out after all these years I am using "ji" incorrectly, or inappropriately !
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
It sounds like she's copied the Hindi usage.
Software Zen: delete this;
|
|
|
|
|
So, OriginalGriff, create a basic function with a Try/Catch, copy it, paste it into the VS toolbox, rename it accordingly (I use 00_NewFunctTryCatch to cause it to show at the top of the list of Boilerplates, as you noted) then assign a keyboard shortcut, and off ya go!
I also have 00_TryCatch which only puts in a try catch.
Now, if you *REALLY* wanna beef up your entire computer, go get QuicKeys 3.0 for Windows at Startly.com[^] (I have no connection to this biz, other than I use their product).
I've used QuicKeys for 23+ of my programming years. QuicKeys works in Win7; haven't tried Win8, though.
Best damned macro/automation/keyboard shortcut tool/app there ever was and is.
Example: I had to change 6,500+ records through an archaic GUI, having no access to the SQL database. Took me 10 minutes to setup a "repeat" QuicKeys sequence (7 minutes testing/refining it...), fired it up, went on a 15 minute break, came back and all the records were updated. Saved about 2 hours of flustering manual repetitive keyboard data entry.
modified 6-Feb-14 12:32pm.
|
|
|
|
|
No, I didn't know you could do that. I suspect tomorrow I won't know either.
[Edit] - Apologies, that sounded flippant. Can't really see it being useful though.
Regards,
Rob Philpott.
|
|
|
|
|
I noticed today that you can drag-and-drop those "ersatz snippets." The advantage of drag-and-drop over double-clicking the ToolBox item seems to be that drag-and-drop doesn't offset the first line of a tabbed text block.
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
Just read your post and improved my copy/paste mastery!
I have to say I saw someone used this feature a while ago in a video and I always wondered, ever since, what was going on!!
|
|
|
|
|
Write an article about it.
|
|
|
|
|
That's gonna be a very, very padded article!
Grief, I'd have to pad it out to get it up to a Tip!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Custom 'control' based on code snippet? Nice.
|
|
|
|
|
Thanks for your tip. It's useful...
|
|
|
|
|
Hey, that works in VS2008 too. Nice find!
|
|
|
|
|
Doesn't this 'feature' tend to promote 'Copy-Paste' programming?
|
|
|
|
|
[Go on work out the initials]
1806 – Battle of San Domingo: British naval victory against the French in the Caribbean.
What got me was the fact that not only did they lose [again], but they ran away [again] and in doing so ran aground[^] two ships.
Oh France, you must be proud!
speramus in juniperus
|
|
|
|
|
The difference between the French and the English version of the wikipedia article is impressive, and shows the ability of the English, land of the Tabloids, to make a whole story out of nothing. That the English article is biased is the least we can say ...
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
Are you trying to insinuate that France won?
speramus in juniperus
|
|
|
|
|
No, France clearly lost. But they were outnumbered, and had half of the ships wrecked before even engaging the battle due to the trouble they experienced on the way. So no exceptional situation here, or at least nothing to brag about on a 4-page article.
Plus, the intention of the float was to go from A to B, not to go hunting British ships as the English version may suggest it.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
what rubbish, the French had 1 first rate of 120 guns (actually had 138 at the time) 1 3rd rate of 80 and 3 x 3rd rates of 74 and as of the French practice all these shipped more guns that the rating, the British had 1 3rd of 80 5 3rd of 74 and an old 64 all carrying the rated guns.
so the actual difference wasn't that great one report has it as Brits 514 and France 480
the French certainly had the bigger ship in the first rate.
the French set to sea with the order to attack British shipping in (not travel a to b)
the French ships were fresh from port whilst the Brits had been at sea for months (in 2 cases over a year)
no French ship was lost prior to that start of the engagement all the grounding were due to them trying to avoid the British
and the loss of 1500+ French men for the loss to the British of < 300 I would say was a convincing loss as to the loss of 5 of the few remaining ship of the line was hardly chick feed.
major naval engagements prior to Nelson rarely resulted in such one sided results
You cant outrun the world, but there is no harm in getting a head start
Real stupidity beats artificial intelligence every time.
|
|
|
|
|
Bergholt Stuttley Johnson wrote: the French certainly had the bigger ship in the first rate.
The French article states that they had bad wheather and had severe damages on the ship 14 days before the battle actually took place.
Bergholt Stuttley Johnson wrote: the French set to sea with the order to attack British shipping in (not travel a to b)
The French article states that they had to go from A to B.
Quote: the French ships were fresh from port whilst the Brits had been at sea for months (in 2 cases over a year)
See above.
Bergholt Stuttley Johnson wrote: no French ship was lost prior to that start of the engagement all the grounding were due to them trying to avoid the British
The French article states that the 14 days were merely sufficient to repair the biggest damages to the ships, so they had to go on in a really bad ship already.
Bergholt Stuttley Johnson wrote: and the loss of 1500+ French men for the loss to the British of < 300 I would say was a convincing loss
Never said anything else, I only said that under said circumstances, this was plain normal.
But again, I know how picky and proud you brits are about all this, so : Yes, we have lost, yes, that was veeeeery convincing, and I should be very ashamed to see a light bit of bias in the English article.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
Rage wrote:
Bergholt Stuttley Johnson wrote: the French certainly had
the bigger ship in the first rate.
The French article states
that they had bad wheather and had severe damages on the ship 14 days before the
battle actually took place.
rubbish, they did suffer damage in late December but they were pretty well repaired by the battle (true they had to cut short the caulking which would have meant they would have been wet ships in a storm) but hull masts were all 100%
Rage wrote:
Bergholt Stuttley Johnson wrote: the French set to sea
with the order to attack British shipping in (not travel a to
b)
The French article states that they had to go from A to B.
Emperor Napoleon ordered two squadrons to put to sea with orders to raid the British trade routes that crossed the Atlantic. These forces were to inflict as much economic damage to Britain as possible
hardly just sailing from a to b
Rage wrote:
Rage wrote:
Bergholt Stuttley Johnson wrote: no French ship was lost
prior to that start of the engagement all the grounding were due to them trying
to avoid the British
The French article states that the 14 days
were merely sufficient to repair the biggest damages to the ships, so they had
to go on in a really bad ship already.
Quote: the French ships were fresh from port whilst the
Brits had been at sea for months (in 2 cases over a year)
rubbish again, the French set sail from Breast in December and were in port by mid Jan about a month at sea, Duckworth sales from Cadiz about 5 days after the French left , however Duckworth was on blockage duty at Cadiz and had been at sea for many months (HMS Spencer had not been in port for over two years )
the Bottom line was that the French ships had all their guns and all their masts, while perhaps not suitable for a long trip across the Atlantic they were certainly fully capable of combat, and were probable in not much worse state than the British
Rage wrote:
Bergholt Stuttley Johnson wrote: and the loss of 1500+
French men for the loss to the British of < 300 I would say was a convincing
loss
Never said anything else, I only said that under said
circumstances, this was plain normal. But again, I know how picky
and proud you brits are about all this, so : Yes, we have lost, yes, that was
veeeeery convincing, and I should be very ashamed to see a light bit of bias in
the English article.
what was unusual was that it was one of the few times the British outnumbered the French
actually the Battle is pretty much unknown to none historians, and if anything It would seem that it is made light of in the French version (oh surprise), and Duckworth received no awards for it (other than prize money) as even his bosses didn't think much of it
You cant outrun the world, but there is no harm in getting a head start
Real stupidity beats artificial intelligence every time.
|
|
|
|
|