@@ -56,7 +56,9 @@ Config Example:
56
56
-- use `std::unordered_map` instead of `absl::flat_hash_map`
57
57
extra_trig = {
58
58
{ trig = ' m' , params = 2 , template = ' std::unordered_map<%s, %s>' }
59
- }
59
+ },
60
+ -- enable qt-related snippets
61
+ qt = true ,
60
62
},
61
63
},
62
64
rust = {
@@ -139,39 +141,41 @@ Snippets with `*` are available only when `vim_snippet` is enabled.
139
141
140
142
#### Normal Snippets
141
143
142
- | Trig | Desc | Context Required |
143
- | :---------: | -------------------------------------------------------------------------------------------------- | :--------------: |
144
- | ` fn ` | Expands to lambda function in argument list or function body, otherwise expand to normal function. | No |
145
- | ` \|trans ` | Expands to ranges::views::transform pipe. | No |
146
- | ` \|filter ` | Expands to ranges::views::filter pipe. | No |
147
- | ` cpo ` | Expands to customize point object. | No |
148
- | ` ns%s(%S+) ` | Expands to namespace block (including comments). | No |
149
- | ` itf ` | Expands to a struct with default virtual destruction. | No |
150
- | ` pvf ` | Expands to a pure virtual function declaration. | No |
144
+ | Trig | Desc | Context Required | Qt |
145
+ | :---------: | -------------------------------------------------------------------------------------------------- | :--------------: | :-: |
146
+ | ` fn ` | Expands to lambda function in argument list or function body, otherwise expand to normal function. | No | |
147
+ | ` \|trans ` | Expands to ranges::views::transform pipe. | No | |
148
+ | ` \|filter ` | Expands to ranges::views::filter pipe. | No | |
149
+ | ` cpo ` | Expands to customize point object. | No | |
150
+ | ` ns%s(%S+) ` | Expands to namespace block (including comments). | No | |
151
+ | ` itf ` | Expands to a struct with default virtual destruction. | No | |
152
+ | ` pvf ` | Expands to a pure virtual function declaration. | No | |
153
+ | ` qcls ` | Expands to a class inherts from QObject. | No | Yes |
151
154
152
155
#### Auto-snippets
153
156
154
- | Trig | Desc | Context Required | Could Disable AutoExpansion |
155
- | :------: | --------------------------------------------------------- | :---------------------------: | :-------------------------: |
156
- | ` ctor! ` | Expands to default constructor. | In Class | No |
157
- | ` dtor! ` | Expands to default destructor. | In Class | No |
158
- | ` cc! ` | Expands to default copy constructor. | In Class | No |
159
- | ` mv! ` | Expands to default move constructor. | In Class | No |
160
- | ` ncc! ` | Expands to delete copy constructor. | In Class | No |
161
- | ` nmv! ` | Expands to delete move constructor. | In Class | No |
162
- | ` ncm! ` | Expands to delete copy and move constructor. | In Class | No |
163
- | ` once ` | Expands to ` pragma once ` marker at the front of the file. | All lines before are comments | Yes |
164
- | ` u8 ` | Expands to ` uint8_t ` . | No | Yes |
165
- | ` u16 ` | Expands to ` uint16_t ` . | No | Yes |
166
- | ` u32 ` | Expands to ` uint32_t ` . | No | Yes |
167
- | ` u64 ` | Expands to ` uint64_t ` . | No | Yes |
168
- | ` i8 ` | Expands to ` int8_t ` . | No | Yes |
169
- | ` i16 ` | Expands to ` int16_t ` . | No | Yes |
170
- | ` i32 ` | Expands to ` int32_t ` . | No | Yes |
171
- | ` i64 ` | Expands to ` int64_t ` . | No | Yes |
172
- | ` t(%s)! ` | Evaluates (QET) marker, and expand to typename. | No | No |
173
- | ` #" ` | Expands to include statement with quotes. ` #include "" ` . | No | Yes |
174
- | ` #< ` | Expands to include statement with ` <> ` . ` #include <> ` . | No | Yes |
157
+ | Trig | Desc | Context Required | Could Disable AutoExpansion | Qt |
158
+ | :------: | --------------------------------------------------------- | :---------------------------: | :-------------------------: | :-: |
159
+ | ` ctor! ` | Expands to default constructor. | In Class | No | |
160
+ | ` dtor! ` | Expands to default destructor. | In Class | No | |
161
+ | ` cc! ` | Expands to default copy constructor. | In Class | No | |
162
+ | ` mv! ` | Expands to default move constructor. | In Class | No | |
163
+ | ` ncc! ` | Expands to delete copy constructor. | In Class | No | |
164
+ | ` nmv! ` | Expands to delete move constructor. | In Class | No | |
165
+ | ` ncm! ` | Expands to delete copy and move constructor. | In Class | No | |
166
+ | ` once ` | Expands to ` pragma once ` marker at the front of the file. | All lines before are comments | Yes | |
167
+ | ` u8 ` | Expands to ` uint8_t ` . | No | Yes | |
168
+ | ` u16 ` | Expands to ` uint16_t ` . | No | Yes | |
169
+ | ` u32 ` | Expands to ` uint32_t ` . | No | Yes | |
170
+ | ` u64 ` | Expands to ` uint64_t ` . | No | Yes | |
171
+ | ` i8 ` | Expands to ` int8_t ` . | No | Yes | |
172
+ | ` i16 ` | Expands to ` int16_t ` . | No | Yes | |
173
+ | ` i32 ` | Expands to ` int32_t ` . | No | Yes | |
174
+ | ` i64 ` | Expands to ` int64_t ` . | No | Yes | |
175
+ | ` t(%s)! ` | Evaluates (QET) marker, and expand to typename. | No | No | |
176
+ | ` #" ` | Expands to include statement with quotes. ` #include "" ` . | No | Yes | |
177
+ | ` #< ` | Expands to include statement with ` <> ` . ` #include <> ` . | No | Yes | |
178
+ | ` #q ` | Expands to include qt generated moc file. | No | Yes | Yes |
175
179
176
180
##### Quick Expand Type markers
177
181
@@ -220,7 +224,7 @@ tmss! -> absl::flat_hash_map<std::string, std::string>
220
224
| ` .uu ` | Wraps with ` (void)? ` . | ` any_expr ` |
221
225
| ` .ts ` | Switches indent's coding style between ` CamelCase ` and ` snake_case ` . | ` indent ` |
222
226
| ` .sc ` | Wraps with ` static_cast<>(?) ` . | ` any_expr ` |
223
- | ` .rc ` | Wraps with ` reinterpret_cast<>(?) ` . | ` any_expr ` |
227
+ | ` .rc ` | Wraps with ` reinterpret_cast<>(?) ` . | ` any_expr ` |
224
228
| ` .single ` | Wraps with ` ranges::views::single(?) ` . | ` any_expr ` |
225
229
| ` .await ` | Expands to ` co_await ? ` . | ` any_expr ` |
226
230
| ` .in ` | Expands to ` if (...find) ` statements. | ` any_expr ` |
0 commit comments