Skip to content

Commit 83bb746

Browse files
committed
acro etc
1 parent e2e3c75 commit 83bb746

File tree

3 files changed

+39
-38
lines changed

3 files changed

+39
-38
lines changed

docs/ide/code-snippets-schema-reference.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Code snippets are preauthored pieces of code that are ready to insert into your
1919

2020
This article provides a reference to the Visual Studio IntelliSense Code Snippet XML schema. You can use the schema to create your own code snippets and add them to the code snippets that Visual Studio already includes.
2121

22-
For more information on creating code snippets, see [Walkthrough: Create a code snippet in Visual Studio](walkthrough-creating-a-code-snippet.md). For information about the code snippets that Visual Studio includes by default, see [C# code snippets](visual-csharp-code-snippets.md) or [Visual C++ code snippets](visual-cpp-code-snippets.md).
22+
- For more information on creating code snippets, see [Walkthrough: Create a code snippet in Visual Studio](walkthrough-creating-a-code-snippet.md).
23+
- For information about the code snippets that Visual Studio includes by default, see [C# code snippets](visual-csharp-code-snippets.md) or [Visual C++ code snippets](visual-cpp-code-snippets.md).
2324

2425
## Assembly element
2526

@@ -150,12 +151,12 @@ Allows you to specify a heading and multiple code snippets, which you can insert
150151

151152
|Attribute|Description|
152153
|---------------|-----------------|
153-
|`Format`|*Required* attribute. Specifies the schema version of the code snippet. The `Format` attribute must be a string in the syntax of `x.x.x`, where each `x` represents a numerical value of the version number. Visual Studio ignores code snippets with `Format` attributes that it doesn't understand.|
154+
|**Format**|*Required* attribute. Specifies the schema version of the code snippet. The **Format** attribute must be a string in the syntax of `x.x.x`, where each `x` represents a numerical value of the version number. Visual Studio ignores code snippets with **Format** attributes that it doesn't understand.|
154155

155156
|Child element|Description|
156157
|-------------------|-----------------|
157158
|[Header element](#header-element)|*Required* element. Contains general information about the code snippet. There must be exactly one `Header` element in a code snippet.|
158-
|[Snippet element](#snippet-element)|*Required* element. Contains the code that will be inserted by Visual Studio. There must be exactly one `Snippet` element in a code snippet.|
159+
|[Snippet element](#snippet-element)|*Required* element. Contains the code to be inserted by Visual Studio. There must be exactly one `Snippet` element in a code snippet.|
159160

160161
|Parent element|Description|
161162
| - |-----------------|
@@ -266,12 +267,12 @@ Specifies general information about the code snippet.
266267

267268
|Child element|Description|
268269
|-------------------|-----------------|
269-
|[Author element](#author-element)|Optional element. The name of the person or company that authored the code snippet. There may be zero or one `Author` elements in a `Header` element.|
270-
|[Description element](#description-element)|Optional element. A description of the code snippet. There may be zero or one `Description` elements in a `Header` element.|
271-
|[HelpUrl element](#helpurl-element)|Optional element. A URL that contains more information about the code snippet. There may be zero or one `HelpURL` elements in a `Header` element.|
272-
|[Keywords element](#keywords-element)|Optional element. Groups `Keyword` elements. There may be zero or one `Keywords` elements in a `Header` element.|
273-
|[Shortcut element](#shortcut-element)|Optional element. Specifies the shortcut text that can be used to insert the snippet. There may be zero or one `Shortcut` elements in a `Header` element.|
274-
|[SnippetTypes element](#snippettypes-element)|Optional element. Groups `SnippetType` elements. There may be zero or one `SnippetTypes` elements in a `Header` element. If there are no `SnippetTypes` elements, the code snippet is always valid.|
270+
|[Author element](#author-element)|Optional element. The name of the person or company that authored the code snippet. There may be zero or one `Author` element in a `Header` element.|
271+
|[Description element](#description-element)|Optional element. A description of the code snippet. There may be zero or one `Description` element in a `Header` element.|
272+
|[HelpUrl element](#helpurl-element)|Optional element. A URL that contains more information about the code snippet. There may be zero or one `HelpURL` element in a `Header` element.|
273+
|[Keywords element](#keywords-element)|Optional element. Groups `Keyword` elements. There may be zero or one `Keywords` element in a `Header` element.|
274+
|[Shortcut element](#shortcut-element)|Optional element. Specifies the shortcut text that can be used to insert the snippet. There may be zero or one `Shortcut` element in a `Header` element.|
275+
|[SnippetTypes element](#snippettypes-element)|Optional element. Groups `SnippetType` elements. There may be zero or one `SnippetTypes` element in a `Header` element. If there are no `SnippetTypes` elements, the code snippet is always valid.|
275276
|[Title element](#title-element)|*Required* element. The friendly name of the code snippet. There must be exactly one `Title` element in a `Header` element.|
276277

277278
|Parent element|Description|
@@ -368,7 +369,7 @@ A text value is required. The keyword for the code snippet.
368369

369370
## Keywords element
370371

371-
Groups individual `Keyword` elements. The code snippet keywords are used by Visual Studio and represent a standard way for online content providers to add custom keywords for searching or categorization
372+
Groups individual `Keyword` elements. The code snippet keywords are used by Visual Studio and represent a standard way for online content providers to add custom keywords for searching or categorization.
372373

373374
```xml
374375
<Keywords>
@@ -387,7 +388,7 @@ Groups individual `Keyword` elements. The code snippet keywords are used by Visu
387388

388389
## Literal element
389390

390-
Defines the literals of the code snippet that you can edit. The `Literal` element identifies a replacement for a piece of code that's entirely contained within the snippet, but can be customized after the snippet is inserted. For example, literal strings, numeric values, and some variable names should be declared as literals.
391+
Defines the literals of the code snippet that you can edit. The `Literal` element identifies a replacement for a piece of code entirely contained within the snippet that can be customized after the snippet is inserted. For example, literal strings, numeric values, and some variable names should be declared as literals.
391392

392393
Literals and objects can't contain an `ID` element with a value of `selected` or `end`. The value `$selected$` represents selected document text to be inserted into the snippet when the snippet is invoked. `$end$` marks the location to place the cursor after the code snippet is inserted.
393394

@@ -402,14 +403,14 @@ Literals and objects can't contain an `ID` element with a value of `selected` or
402403

403404
|Attribute|Description|
404405
|---------------|-----------------|
405-
|`Editable`|Optional `Boolean` attribute. Specifies whether or not you can edit the literal after the code snippet is inserted. The default value of this attribute is `true`.|
406+
|**Editable**|Optional `Boolean` attribute. Specifies whether or not you can edit the literal after the code snippet is inserted. The default value of this attribute is `true`.|
406407

407408
|Child element|Description|
408409
|-------------------|-----------------|
409410
|[Default element](#default-element)|*Required* element. Specifies the literal's default value when you insert the code snippet. There must be exactly one `Default` element in a `Literal` element.|
410-
|[Function element](#function-element)|Optional element. Specifies a function to execute when the literal receives focus in Visual Studio. There may be zero or one `Function` elements in a `Literal` element.|
411+
|[Function element](#function-element)|Optional element. Specifies a function to execute when the literal receives focus in Visual Studio. There may be zero or one `Function` element in a `Literal` element.|
411412
|[ID element](#id-element)|*Required* element. Specifies a unique identifier for the literal. There must be exactly one `ID` element in a `Literal` element.|
412-
|[ToolTip element](#tooltip-element)|Optional element. Describes the expected value and usage of the literal. There may be zero or one `ToolTip` elements in a `Literal` element.|
413+
|[ToolTip element](#tooltip-element)|Optional element. Describes the expected value and usage of the literal. There may be zero or one `ToolTip` element in a `Literal` element.|
413414

414415
|Parent element|Description|
415416
| - |-----------------|
@@ -433,7 +434,7 @@ A text value is required. This text specifies a namespace that the code snippet
433434

434435
## Object element
435436

436-
Defines the objects of the code snippet that you can edit. The `Object` element identifies an item that's required by the code snippet but is defined outside of the snippet itself. For example, Windows Forms controls, ASP.NET controls, object instances, and type instances should be declared as objects. Object declarations require a type to be specified, which is done with the `Type` element.
437+
Defines the objects of the code snippet that you can edit. The `Object` element identifies an item required by the code snippet that's defined outside of the snippet itself. For example, Windows Forms controls, ASP.NET controls, object instances, and type instances should be declared as objects. Object declarations require a type to be specified, which is done with the `Type` element.
437438

438439
```xml
439440
<Object Editable="true/false">
@@ -447,14 +448,14 @@ Defines the objects of the code snippet that you can edit. The `Object` element
447448

448449
|Attribute|Description|
449450
|---------------|-----------------|
450-
|`Editable`|Optional `Boolean` attribute. Specifies whether or not you can edit the literal after the code snippet is inserted. The default value of this attribute is `true`.|
451+
|**Editable**|Optional `Boolean` attribute. Specifies whether or not you can edit the literal after the code snippet is inserted. The default value of this attribute is `true`.|
451452

452453
|Child element|Description|
453454
|-------------------|-----------------|
454455
|[Default element](#default-element)|*Required* element. Specifies the literal's default value when you insert the code snippet. There must be exactly one `Default` element in a `Literal` element.|
455-
|[Function element](#function-element)|Optional element. Specifies a function to execute when the literal receives focus in Visual Studio. There may be zero or one `Function` elements in a `Literal` element.|
456+
|[Function element](#function-element)|Optional element. Specifies a function to execute when the literal receives focus in Visual Studio. There may be zero or one `Function` element in a `Literal` element.|
456457
|[ID element](#id-element)|*Required* element. Specifies a unique identifier for the literal. There must be exactly one `ID` element in a `Literal` element.|
457-
|[ToolTip element](#tooltip-element)|Optional element. Describes the expected value and usage of the literal. There may be zero or one `ToolTip` elements in a `Literal` element.|
458+
|[ToolTip element](#tooltip-element)|Optional element. Describes the expected value and usage of the literal. There may be zero or one `ToolTip` element in a `Literal` element.|
458459
|[Type element](#type-element)|*Required* element. Specifies the type of the object. There must be exactly one `Type` element in an `Object` element.|
459460

460461
|Parent element|Description|
@@ -475,7 +476,7 @@ Specifies information about the assembly references required by the code snippet
475476
|Child element|Description|
476477
|-------------------|-----------------|
477478
|[Assembly element](#assembly-element)|*Required* element. Contains the name of the assembly referenced by the code snippet. There must be exactly one `Assembly` element in a `Reference` element.|
478-
|[Url element](#url-element)|Optional element. Contains a URL that provides more information about the referenced assembly. There may be zero or one `Url` elements in a `Reference` element.|
479+
|[Url element](#url-element)|Optional element. Contains a URL that provides more information about the referenced assembly. There may be zero or one `Url` element in a `Reference` element.|
479480

480481
|Parent element|Description|
481482
| - |-----------------|
@@ -534,9 +535,9 @@ Specifies the references, imports, declarations, and code for the code snippet.
534535
|Child element|Description|
535536
|-------------------|-----------------|
536537
|[Code element](#code-element)|*Required* element. Specifies the code that you want to insert into a documentation file. There must be exactly one `Code` element in a `Snippet` element.|
537-
|[Declarations element](#declarations-element)|Optional element. Specifies the literals and objects that make up the parts of a code snippet that you can edit. There may be zero or one `Declarations` elements in a `Snippet` element.|
538-
|[Imports element](#imports-element)|Optional element. Groups individual `Import` elements. There may be zero or one `Imports` elements in a `Snippet` element.|
539-
|[References element](#references-element)|Optional element. Groups individual `Reference` elements. There may be zero or one `References` elements in a `Snippet` element.|
538+
|[Declarations element](#declarations-element)|Optional element. Specifies the literals and objects that make up the parts of a code snippet that you can edit. There may be zero or one `Declarations` element in a `Snippet` element.|
539+
|[Imports element](#imports-element)|Optional element. Groups individual `Import` elements. There may be zero or one `Imports` element in a `Snippet` element.|
540+
|[References element](#references-element)|Optional element. Groups individual `Reference` elements. There may be zero or one `References` element in a `Snippet` element.|
540541

541542
|Parent element|Description|
542543
| - |-----------------|
@@ -601,7 +602,7 @@ A text value is required. This text specifies the title of the code snippet.
601602

602603
## ToolTip element
603604

604-
Describes the expected value and usage of a literal or object in a code snippet, which Visual Studio displays in a ToolTip when it inserts the code snippet into a project. The ToolTip text is displayed when the mouse hovers over the literal or object after the code snippet has been inserted.
605+
Describes the expected value and usage of a literal or object in a code snippet. Visual Studio displays this information in a ToolTip when it inserts the code snippet into a project. The ToolTip also displays when the mouse hovers over the literal or object after the code snippet is inserted.
605606

606607
```xml
607608
<ToolTip>
@@ -618,7 +619,7 @@ A text value is required. This text specifies the ToolTip description to be asso
618619

619620
## Type element
620621

621-
Specifies the type of the object. The `Object` element is used to identify an item that's required by the code snippet but is probably defined outside of the snippet itself. For example, Windows Forms controls, ASP.NET controls, object instances, and type instances should be declared as objects. Object declarations require a type to be specified, which is done with the `Type` element.
622+
Specifies the type of the object. The `Object` element identifies an item that the code snippet requires but is probably defined outside of the snippet itself. For example, Windows Forms controls, ASP.NET controls, object instances, and type instances should be declared as objects. Object declarations require a type to be specified, which is done with the `Type` element.
622623

623624
```xml
624625
<Type>

docs/ide/visual-cpp-code-snippets.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dev_langs:
1111
---
1212
# Visual C++ code snippets
1313

14-
In Visual Studio, you can use code snippets to add commonly-used code to your C++ code files.
14+
In Visual Studio, you can use code snippets to add commonly used code to your C++ code files. Code snippets can make writing program code quicker, easier, and more reliable.
1515

1616
## Complete list of C++ code snippets
1717

@@ -73,7 +73,7 @@ The names of most C++ code snippets are self-explanatory, but some names might b
7373

7474
### Class, classi
7575

76-
The **class** snippet provides the definition of a class named `MyClass`. The definitions of the appropriate default constructor and destructor are located outside the class.
76+
The `class` snippet provides the definition of a class named `MyClass`. The definitions of the appropriate default constructor and destructor are located outside the class.
7777

7878
```cpp
7979
class MyClass
@@ -95,7 +95,7 @@ MyClass::~MyClass()
9595
}
9696
```
9797

98-
The **classi** code snippet also provides the definition of a class named `MyClass`, but the default constructor and destructor are defined inside the class definition.
98+
The `classi` code snippet also provides the definition of a class named `MyClass`, but the default constructor and destructor are defined inside the class definition.
9999

100100
```cpp
101101
class MyClass
@@ -116,9 +116,9 @@ private:
116116

117117
### For, forr, rfor
118118

119-
The three different **for** snippets provide different kinds of `for` loops.
119+
The three different `for` snippets provide different kinds of `for` loops.
120120

121-
- The **rfor** snippet provides a [range-based for loop](/cpp/cpp/range-based-for-statement-cpp). This construct is preferred over index-based `for` loops.
121+
- The `rfor` snippet provides a [range-based for loop](/cpp/cpp/range-based-for-statement-cpp). This construct is preferred over index-based `for` loops.
122122

123123
```cpp
124124
for (auto& i : v)
@@ -127,7 +127,7 @@ The three different **for** snippets provide different kinds of `for` loops.
127127
}
128128
```
129129
130-
- The **for** snippet provides a `for` loop in which the condition is based on the length of an object in `size_t`.
130+
- The `for` snippet provides a `for` loop in which the condition is based on the length of an object in `size_t`.
131131
132132
```cpp
133133
for (size_t i = 0; i < length; i++)
@@ -136,7 +136,7 @@ The three different **for** snippets provide different kinds of `for` loops.
136136
}
137137
```
138138

139-
- The **forr** snippet provides a reverse `for` loop in which the condition is based on the length of an object in integers.
139+
- The `forr` snippet provides a reverse `for` loop in which the condition is based on the length of an object in integers.
140140

141141
```cpp
142142
for (int i = length - 1; i >= 0; i--)
@@ -147,7 +147,7 @@ The three different **for** snippets provide different kinds of `for` loops.
147147
148148
### The destructor snippet (~)
149149
150-
The destructor snippet **~** shows different behavior in different contexts. If you insert this snippet inside a class, it provides a destructor for that class.
150+
The destructor snippet `~` shows different behavior in different contexts. If you insert this snippet inside a class, it provides a destructor for that class.
151151
152152
For example, if you insert the destructor snippet inside a class named `SomeClass`, it provides a destructor for `SomeClass`.
153153

0 commit comments

Comments
 (0)