Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | · | 1 | ·53f4094aa6c16fb5a16d4bcfbd138380·533972·lisp·optional·elpa-yasnippet_0.14.1~git20250112.5b315f1-1_all.deb |
2 | ·88f14f5adff70d8685e3b580440a8b0b·3708·lisp·optional·yasnippet_0.14.1~git20250112.5b315f1-1_all.deb | 2 | ·88f14f5adff70d8685e3b580440a8b0b·3708·lisp·optional·yasnippet_0.14.1~git20250112.5b315f1-1_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-02-28·12:48:59.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-02-28·12:48:59.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····2016·2025-02-28·12:48:59.000000·control.tar.xz | 2 | -rw-r--r--···0········0········0·····2016·2025-02-28·12:48:59.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0···531 | 3 | -rw-r--r--···0········0········0···531764·2025-02-28·12:48:59.000000·data.tar.xz |
Offset 214, 69 lines modified | Offset 214, 69 lines modified | ||
214 | </div> | 214 | </div> |
215 | <div·id="content"·class="content"> | 215 | <div·id="content"·class="content"> |
216 | <h1·class="title">Frequently·Asked·Questions</h1> | 216 | <h1·class="title">Frequently·Asked·Questions</h1> |
217 | <div·id="table-of-contents"·role="doc-toc"> | 217 | <div·id="table-of-contents"·role="doc-toc"> |
218 | <h2>Table·of·Contents</h2> | 218 | <h2>Table·of·Contents</h2> |
219 | <div·id="text-table-of-contents"·role="doc-toc"> | 219 | <div·id="text-table-of-contents"·role="doc-toc"> |
220 | <ul> | 220 | <ul> |
221 | <li><a·href="#org | 221 | <li><a·href="#orge174e40">Why·are·my·snippet·abbrev·keys·triggering·when·I·don't·want·them·too?</a></li> |
222 | <li><a·href="#org | 222 | <li><a·href="#org5194a83">Why·aren't·my·snippet·abbrev·keys·triggering·when·I·want·them·too?</a></li> |
223 | <li><a·href="#org8 | 223 | <li><a·href="#org896f3ee">Why·is·there·an·extra·newline?</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#org6435963">Why·doesn't·TAB·navigation·work·with·flyspell</a></li> |
225 | <li><a·href="#org | 225 | <li><a·href="#org0548e9a">How·do·I·use·alternative·keys,·i.e.·not·TAB?</a></li> |
226 | <li><a·href="#org | 226 | <li><a·href="#org007c1fc">How·do·I·define·an·abbrev·key·containing·characters·not·supported·by·the·filesystem?</a></li> |
227 | </ul> | 227 | </ul> |
228 | </div> | 228 | </div> |
229 | </div> | 229 | </div> |
230 | <ul·class="org-ul"> | 230 | <ul·class="org-ul"> |
231 | <li><b>Note</b>:·In·addition·to·the·questions·and·answers·presented·here, | 231 | <li><b>Note</b>:·In·addition·to·the·questions·and·answers·presented·here, |
232 | you·might·also·with·to·visit·the·list·of·<a·href="https://github.com/joaotavora/yasnippet/issues?q=label%3Asupport">solved·support·issues</a>·in | 232 | you·might·also·with·to·visit·the·list·of·<a·href="https://github.com/joaotavora/yasnippet/issues?q=label%3Asupport">solved·support·issues</a>·in |
233 | the·Github·issue·tracker.··It·might·be·more·up-to-date·than·this | 233 | the·Github·issue·tracker.··It·might·be·more·up-to-date·than·this |
234 | list.</li> | 234 | list.</li> |
235 | </ul> | 235 | </ul> |
236 | <div·id="outline-container-org | 236 | <div·id="outline-container-orge174e40"·class="outline-2"> |
237 | <h2·id="org | 237 | <h2·id="orge174e40">Why·are·my·snippet·abbrev·keys·triggering·when·I·don't·want·them·too?</h2> |
238 | <div·class="outline-text-2"·id="text-org | 238 | <div·class="outline-text-2"·id="text-orge174e40"> |
239 | <p> | 239 | <p> |
240 | Expansion·of·abbrev·keys·is·controlled·by·<a·href="snippet-reference.html#yas-key-syntaxes"><code>yas-key-syntaxes</code></a>.··Try | 240 | Expansion·of·abbrev·keys·is·controlled·by·<a·href="snippet-reference.html#yas-key-syntaxes"><code>yas-key-syntaxes</code></a>.··Try |
241 | removing·entries·which·correspond·to·the·abbrev·key·character·syntax. | 241 | removing·entries·which·correspond·to·the·abbrev·key·character·syntax. |
242 | For·example,·if·you·have·a·snippet·with·abbrev·key·"bar",·that·you | 242 | For·example,·if·you·have·a·snippet·with·abbrev·key·"bar",·that·you |
243 | don't·want·to·trigger·when·point·follows·the·text·<code>foo_bar</code>,·remove | 243 | don't·want·to·trigger·when·point·follows·the·text·<code>foo_bar</code>,·remove |
244 | the·<code>"w"</code>·entry·(since·"bar"·has·only·word·syntax·characters). | 244 | the·<code>"w"</code>·entry·(since·"bar"·has·only·word·syntax·characters). |
245 | </p> | 245 | </p> |
246 | </div> | 246 | </div> |
247 | </div> | 247 | </div> |
248 | <div·id="outline-container-org | 248 | <div·id="outline-container-org5194a83"·class="outline-2"> |
249 | <h2·id="org | 249 | <h2·id="org5194a83">Why·aren't·my·snippet·abbrev·keys·triggering·when·I·want·them·too?</h2> |
250 | <div·class="outline-text-2"·id="text-org | 250 | <div·class="outline-text-2"·id="text-org5194a83"> |
251 | <p> | 251 | <p> |
252 | See·previous·question,·but·in·reverse. | 252 | See·previous·question,·but·in·reverse. |
253 | </p> | 253 | </p> |
254 | </div> | 254 | </div> |
255 | </div> | 255 | </div> |
256 | <div·id="outline-container-org8 | 256 | <div·id="outline-container-org896f3ee"·class="outline-2"> |
257 | <h2·id="org8 | 257 | <h2·id="org896f3ee">Why·is·there·an·extra·newline?</h2> |
258 | <div·class="outline-text-2"·id="text-org8 | 258 | <div·class="outline-text-2"·id="text-org896f3ee"> |
259 | <p> | 259 | <p> |
260 | If·there·is·a·newline·at·the·end·of·a·snippet·definition·file, | 260 | If·there·is·a·newline·at·the·end·of·a·snippet·definition·file, |
261 | YASnippet·will·add·a·newline·when·expanding·that·snippet.·When·editing | 261 | YASnippet·will·add·a·newline·when·expanding·that·snippet.·When·editing |
262 | or·saving·a·snippet·file,·please·be·careful·not·to·accidentally·add·a | 262 | or·saving·a·snippet·file,·please·be·careful·not·to·accidentally·add·a |
263 | terminal·newline. | 263 | terminal·newline. |
264 | </p> | 264 | </p> |
265 | <p> | 265 | <p> |
266 | Note·that·some·editors·will·automatically·add·a·newline·for·you.·In | 266 | Note·that·some·editors·will·automatically·add·a·newline·for·you.·In |
267 | Emacs,·if·you·set·<code>require-final-newline</code>·to·<code>t</code>,·it·will·add·the | 267 | Emacs,·if·you·set·<code>require-final-newline</code>·to·<code>t</code>,·it·will·add·the |
268 | final·newline·automatically. | 268 | final·newline·automatically. |
269 | </p> | 269 | </p> |
270 | </div> | 270 | </div> |
271 | </div> | 271 | </div> |
272 | <div·id="outline-container-org | 272 | <div·id="outline-container-org6435963"·class="outline-2"> |
273 | <h2·id="org | 273 | <h2·id="org6435963">Why·doesn't·TAB·navigation·work·with·flyspell</h2> |
274 | <div·class="outline-text-2"·id="text-org | 274 | <div·class="outline-text-2"·id="text-org6435963"> |
275 | <p> | 275 | <p> |
276 | This·is·<a·href="https://debbugs.gnu.org/26672">Emacs·Bug#26672</a>,·so·you·should·upgrade·to·version·25.3·or | 276 | This·is·<a·href="https://debbugs.gnu.org/26672">Emacs·Bug#26672</a>,·so·you·should·upgrade·to·version·25.3·or |
277 | better.··Otherwise,·a·workaround·is·to·inhibit·flyspell·overlays·while | 277 | better.··Otherwise,·a·workaround·is·to·inhibit·flyspell·overlays·while |
278 | the·snippet·is·active: | 278 | the·snippet·is·active: |
279 | </p> | 279 | </p> |
280 | <div·class="org-src-container"> | 280 | <div·class="org-src-container"> |
Offset 284, 17 lines modified | Offset 284, 17 lines modified | ||
284 | ··········#'(<span·class="org-keyword">lambda</span>·(<span·class="org-type">&rest</span>·_) | 284 | ··········#'(<span·class="org-keyword">lambda</span>·(<span·class="org-type">&rest</span>·_) |
285 | ··············(<span·class="org-keyword">and</span>·yas-active-field-overlay | 285 | ··············(<span·class="org-keyword">and</span>·yas-active-field-overlay |
286 | ···················(overlay-buffer·yas-active-field-overlay)))) | 286 | ···················(overlay-buffer·yas-active-field-overlay)))) |
287 | </pre> | 287 | </pre> |
288 | </div> | 288 | </div> |
289 | </div> | 289 | </div> |
290 | </div> | 290 | </div> |
291 | <div·id="outline-container-org | 291 | <div·id="outline-container-org0548e9a"·class="outline-2"> |
292 | <h2·id="org | 292 | <h2·id="org0548e9a">How·do·I·use·alternative·keys,·i.e.·not·TAB?</h2> |
293 | <div·class="outline-text-2"·id="text-org | 293 | <div·class="outline-text-2"·id="text-org0548e9a"> |
294 | <p> | 294 | <p> |
295 | Edit·the·keymaps·<a·href="snippet-reference.html#yas-minor-mode-map"><code>yas-minor-mode-map</code></a>·and·<a·href="snippet-reference.html#yas-keymap"><code>yas-keymap</code></a>·as·you·would | 295 | Edit·the·keymaps·<a·href="snippet-reference.html#yas-minor-mode-map"><code>yas-minor-mode-map</code></a>·and·<a·href="snippet-reference.html#yas-keymap"><code>yas-keymap</code></a>·as·you·would |
296 | any·other·keymap,·but·use·<a·href="snippet-reference.html#yas-filtered-definition"><code>yas-filtered-definition</code></a>·on·the·definition | 296 | any·other·keymap,·but·use·<a·href="snippet-reference.html#yas-filtered-definition"><code>yas-filtered-definition</code></a>·on·the·definition |
297 | if·you·want·to·respect·<a·href="snippet-reference.html#yas-keymap-disable-hook"><code>yas-keymap-disable-hook</code></a>: | 297 | if·you·want·to·respect·<a·href="snippet-reference.html#yas-keymap-disable-hook"><code>yas-keymap-disable-hook</code></a>: |
298 | </p> | 298 | </p> |
299 | <div·class="org-src-container"> | 299 | <div·class="org-src-container"> |
Offset 311, 17 lines modified | Offset 311, 17 lines modified | ||
311 | ··(yas-filtered-definition·'yas-next-field-or-maybe-expand)) | 311 | ··(yas-filtered-definition·'yas-next-field-or-maybe-expand)) |
312 | (define-key·yas-keymap·(kbd·<span·class="org-string">"<new-prev-field-key>"</span>) | 312 | (define-key·yas-keymap·(kbd·<span·class="org-string">"<new-prev-field-key>"</span>) |
313 | ··(yas-filtered-definition·'yas-prev-field)) | 313 | ··(yas-filtered-definition·'yas-prev-field)) |
314 | </pre> | 314 | </pre> |
315 | </div> | 315 | </div> |
316 | </div> | 316 | </div> |
317 | </div> | 317 | </div> |
318 | <div·id="outline-container-org | 318 | <div·id="outline-container-org007c1fc"·class="outline-2"> |
319 | <h2·id="org | 319 | <h2·id="org007c1fc">How·do·I·define·an·abbrev·key·containing·characters·not·supported·by·the·filesystem?</h2> |
320 | <div·class="outline-text-2"·id="text-org | 320 | <div·class="outline-text-2"·id="text-org007c1fc"> |
321 | <ul·class="org-ul"> | 321 | <ul·class="org-ul"> |
322 | <li><b>Note</b>:·This·question·applies·if·you're·still·defining·snippets | 322 | <li><b>Note</b>:·This·question·applies·if·you're·still·defining·snippets |
323 | whose·key·<i>is</i>·the·filename.·This·is·behavior·still·provided·by | 323 | whose·key·<i>is</i>·the·filename.·This·is·behavior·still·provided·by |
324 | version·0.6·for·backward·compatibilty,·but·is·somewhat | 324 | version·0.6·for·backward·compatibilty,·but·is·somewhat |
325 | deprecated…</li> | 325 | deprecated…</li> |
326 | </ul> | 326 | </ul> |
Offset 214, 96 lines modified | Offset 214, 96 lines modified | ||
214 | </div> | 214 | </div> |
215 | <div·id="content"·class="content"> | 215 | <div·id="content"·class="content"> |
216 | <h1·class="title">Writing·snippets</h1> | 216 | <h1·class="title">Writing·snippets</h1> |
217 | <div·id="table-of-contents"·role="doc-toc"> | 217 | <div·id="table-of-contents"·role="doc-toc"> |
218 | <h2>Table·of·Contents</h2> | 218 | <h2>Table·of·Contents</h2> |
219 | <div·id="text-table-of-contents"·role="doc-toc"> | 219 | <div·id="text-table-of-contents"·role="doc-toc"> |
220 | <ul> | 220 | <ul> |
221 | <li><a·href="#org | 221 | <li><a·href="#org46efe0e">Snippet·development</a> |
222 | <ul> | 222 | <ul> |
223 | <li><a·href="#org | 223 | <li><a·href="#orge27e0bc">Quickly·finding·snippets</a></li> |
224 | <li><a·href="#org3 | 224 | <li><a·href="#org39d2df0">Using·the·<code>snippet-mode</code>·major·mode·</a></li> |
225 | </ul> | 225 | </ul> |
226 | </li> | 226 | </li> |
227 | <li><a·href="#org | 227 | <li><a·href="#org469e9f9">File·content</a> |
228 | <ul> | 228 | <ul> |
229 | <li><a·href="#org | 229 | <li><a·href="#org3771044"><code>#·key:</code>·snippet·abbrev</a></li> |
230 | <li><a·href="#org | 230 | <li><a·href="#orgd15386e"><code>#·name:</code>·snippet·name</a></li> |
231 | <li><a·href="#org | 231 | <li><a·href="#org09d7d16"><code>#·condition:</code>·snippet·condition</a></li> |
232 | <li><a·href="#org | 232 | <li><a·href="#org6f1485e"><code>#·group:</code>·snippet·menu·grouping</a></li> |
233 | <li><a·href="#org | 233 | <li><a·href="#orgfc02556"><code>#·expand-env:</code>·expand·environment</a></li> |
234 | <li><a·href="#org | 234 | <li><a·href="#orgf229a9e"><code>#·binding:</code>·direct·keybinding</a></li> |
235 | <li><a·href="#org | 235 | <li><a·href="#orge012b85"><code>#·type:</code>·<code>snippet</code>·or·<code>command</code></a></li> |
236 | <li><a·href="#org | 236 | <li><a·href="#org225cafe"><code>#·uuid:</code>·unique·identifier</a></li> |
237 | <li><a·href="#org2 | 237 | <li><a·href="#org213dda4"><code>#·contributor:</code>·snippet·author</a></li> |
238 | </ul> | 238 | </ul> |
239 | </li> | 239 | </li> |
240 | <li><a·href="#org58 | 240 | <li><a·href="#org58ad1bd">Template·Syntax</a> |
241 | <ul> | 241 | <ul> |
242 | <li><a·href="#org | 242 | <li><a·href="#org6912312">Plain·Text</a></li> |
243 | <li><a·href="#org | 243 | <li><a·href="#orga5f7a0f">Embedded·Emacs·Lisp·code</a> |
244 | <ul> | 244 | <ul> |
245 | <li><a·href="#org | 245 | <li><a·href="#orgea940e2">Note:·backquote·expressions·should·not·modify·the·buffer</a></li> |
246 | </ul> | 246 | </ul> |
247 | </li> | 247 | </li> |
248 | <li><a·href="#org | 248 | <li><a·href="#org12d7927">Tab·stop·fields</a></li> |
249 | <li><a·href="#org | 249 | <li><a·href="#org7a2080c">Placeholder·fields</a></li> |
250 | <li><a·href="#org | 250 | <li><a·href="#org178fea0">Mirrors·</a></li> |
251 | <li><a·href="#org | 251 | <li><a·href="#orgcc455f8">Mirrors·with·transformations·</a></li> |
252 | <li><a·href="#org | 252 | <li><a·href="#orgf4dd348">Fields·with·transformations</a></li> |
253 | <li><a·href="#org | 253 | <li><a·href="#orgfe4391b">Choosing·fields·value·from·a·list·and·other·tricks</a></li> |
254 | <li><a·href="#org | 254 | <li><a·href="#org0c7db79">Nested·placeholder·fields</a></li> |
255 | <li><a·href="#org0 | 255 | <li><a·href="#org0fecf56">Indentation·markers</a></li> |
256 | </ul> | 256 | </ul> |
257 | </li> | 257 | </li> |
258 | </ul> | 258 | </ul> |
259 | </div> | 259 | </div> |
260 | </div> | 260 | </div> |
261 | <div·id="outline-container-org | 261 | <div·id="outline-container-org46efe0e"·class="outline-2"> |
262 | <h2·id="org | 262 | <h2·id="org46efe0e">Snippet·development</h2> |
263 | <div·class="outline-text-2"·id="text-org | 263 | <div·class="outline-text-2"·id="text-org46efe0e"> |
264 | </div> | 264 | </div> |
265 | <div·id="outline-container-org | 265 | <div·id="outline-container-orge27e0bc"·class="outline-3"> |
266 | <h3·id="org | 266 | <h3·id="orge27e0bc">Quickly·finding·snippets</h3> |
267 | <div·class="outline-text-3"·id="text-org | 267 | <div·class="outline-text-3"·id="text-orge27e0bc"> |
268 | <p> | 268 | <p> |
269 | There·are·some·ways·you·can·quickly·find·a·snippet·file·or·create·a·new·one: | 269 | There·are·some·ways·you·can·quickly·find·a·snippet·file·or·create·a·new·one: |
270 | </p> | 270 | </p> |
271 | <ul·class="org-ul"> | 271 | <ul·class="org-ul"> |
272 | <li><p> | 272 | <li><p> |
273 | <code>M-x·yas-new-snippet</code>,·key·binding:·<code>C-c·&·C-n</code> | 273 | <code>M-x·yas-new-snippet</code>,·key·binding:·<code>C-c·&·C-n</code> |
274 | </p> | 274 | </p> |
275 | <p> | 275 | <p> |
276 | Creates·a·new·buffer·with·a·template·for·making·a·new·snippet.··The | 276 | Creates·a·new·buffer·with·a·template·for·making·a·new·snippet.··The |
277 | buffer·is·in·<code>snippet-mode</code>·(see·<a·href="#org | 277 | buffer·is·in·<code>snippet-mode</code>·(see·<a·href="#orgecb0f2a">below</a>).··When·you·are·done·editing |
278 | the·new·snippet,·use·<a·href="#org | 278 | the·new·snippet,·use·<a·href="#orge47caf9"><code>C-c·C-c</code></a>·to·save·it. |
279 | </p></li> | 279 | </p></li> |
280 | <li><p> | 280 | <li><p> |
281 | <code>M-x·yas-visit-snippet-file</code>,·key·binding:·<code>C-c·&·C-v</code> | 281 | <code>M-x·yas-visit-snippet-file</code>,·key·binding:·<code>C-c·&·C-v</code> |
282 | </p> | 282 | </p> |
283 | <p> | 283 | <p> |
284 | Prompts·you·for·possible·snippet·expansions·like | 284 | Prompts·you·for·possible·snippet·expansions·like |
285 | <a·href="snippet-reference.html#yas-insert-snippet"><code>yas-insert-snippet</code></a>,·but·instead·of·expanding·it,·takes·you·directly | 285 | <a·href="snippet-reference.html#yas-insert-snippet"><code>yas-insert-snippet</code></a>,·but·instead·of·expanding·it,·takes·you·directly |
286 | to·the·snippet·definition's·file,·if·it·exists. | 286 | to·the·snippet·definition's·file,·if·it·exists. |
287 | </p></li> | 287 | </p></li> |
288 | </ul> | 288 | </ul> |
289 | <p> | 289 | <p> |
290 | Once·you·find·this·file·it·will·be·set·to·<code>snippet-mode</code>·(see·<a·href="#org | 290 | Once·you·find·this·file·it·will·be·set·to·<code>snippet-mode</code>·(see·<a·href="#orgecb0f2a">ahead</a>) |
291 | and·you·can·start·editing·your·snippet. | 291 | and·you·can·start·editing·your·snippet. |
292 | </p> | 292 | </p> |
293 | </div> | 293 | </div> |
294 | </div> | 294 | </div> |
295 | <div·id="outline-container-org3 | 295 | <div·id="outline-container-org39d2df0"·class="outline-3"> |
296 | <h3·id="org3 | 296 | <h3·id="org39d2df0">Using·the·<code>snippet-mode</code>·major·mode·<a·id="orgecb0f2a"></a></h3> |
297 | <div·class="outline-text-3"·id="text-org3 | 297 | <div·class="outline-text-3"·id="text-org39d2df0"> |
298 | <p> | 298 | <p> |
299 | There·is·a·major·mode·<code>snippet-mode</code>·to·edit·snippets.·You·can·set·the | 299 | There·is·a·major·mode·<code>snippet-mode</code>·to·edit·snippets.·You·can·set·the |
300 | buffer·to·this·mode·with·<code>M-x·snippet-mode</code>.·It·provides·reasonably | 300 | buffer·to·this·mode·with·<code>M-x·snippet-mode</code>.·It·provides·reasonably |
301 | useful·syntax·highlighting. | 301 | useful·syntax·highlighting. |
302 | </p> | 302 | </p> |
303 | <p> | 303 | <p> |
Offset 318, 15 lines modified | Offset 318, 15 lines modified | ||
318 | <p> | 318 | <p> |
319 | Prompts·for·a·snippet·table·(with·a·default·based·on·snippet's | 319 | Prompts·for·a·snippet·table·(with·a·default·based·on·snippet's |
320 | major·mode)·and·loads·the·snippet·currently·being·edited. | 320 | major·mode)·and·loads·the·snippet·currently·being·edited. |
321 | </p></li> | 321 | </p></li> |
322 | <li><p> | 322 | <li><p> |
323 | <code>M-x·yas-load-snippet-buffer-and-close</code>,·key·binding:·<code>C-c·C-c</code> | 323 | <code>M-x·yas-load-snippet-buffer-and-close</code>,·key·binding:·<code>C-c·C-c</code> |
324 | <a·id="org | 324 | <a·id="orge47caf9"></a> |
325 | </p> | 325 | </p> |
326 | <p> | 326 | <p> |
327 | Like·<code>yas-load-snippet-buffer</code>,·but·also·saves·the·snippet·and | 327 | Like·<code>yas-load-snippet-buffer</code>,·but·also·saves·the·snippet·and |
328 | calls·<code>quit-window</code>.··The·destination·is·decided·based·on·the | 328 | calls·<code>quit-window</code>.··The·destination·is·decided·based·on·the |
329 | chosen·snippet·table·and·snippet·collection·directly·(defaulting·to | 329 | chosen·snippet·table·and·snippet·collection·directly·(defaulting·to |
330 | the·first·directory·in·<code>yas-snippet-dirs</code>·(see·<a·href="snippet-organization.html">Organizing·Snippets</a> | 330 | the·first·directory·in·<code>yas-snippet-dirs</code>·(see·<a·href="snippet-organization.html">Organizing·Snippets</a> |
Offset 347, 17 lines modified | Offset 347, 17 lines modified | ||
347 | <p> | 347 | <p> |
348 | There·are·also·<i>snippets·for·writing·snippets</i>:·<code>vars</code>,·<code>$f</code>·and·<code>$m</code> | 348 | There·are·also·<i>snippets·for·writing·snippets</i>:·<code>vars</code>,·<code>$f</code>·and·<code>$m</code> |
349 | :-). | 349 | :-). |
350 | </p> | 350 | </p> |
351 | </div> | 351 | </div> |
352 | </div> | 352 | </div> |
353 | </div> | 353 | </div> |
354 | <div·id="outline-container-org | 354 | <div·id="outline-container-org469e9f9"·class="outline-2"> |
355 | <h2·id="org | 355 | <h2·id="org469e9f9">File·content</h2> |
356 | <div·class="outline-text-2"·id="text-org | 356 | <div·class="outline-text-2"·id="text-org469e9f9"> |
357 | <p> | 357 | <p> |
358 | A·file·defining·a·snippet·generally·contains·the·template·to·be | 358 | A·file·defining·a·snippet·generally·contains·the·template·to·be |
359 | expanded. | 359 | expanded. |
360 | </p> | 360 | </p> |
Max diff block lines reached; 17021/24534 bytes (69.38%) of diff not shown. |
Offset 214, 42 lines modified | Offset 214, 42 lines modified | ||
214 | </div> | 214 | </div> |
215 | <div·id="content"·class="content"> | 215 | <div·id="content"·class="content"> |
216 | <h1·class="title">Expanding·snippets</h1> | 216 | <h1·class="title">Expanding·snippets</h1> |
217 | <div·id="table-of-contents"·role="doc-toc"> | 217 | <div·id="table-of-contents"·role="doc-toc"> |
218 | <h2>Table·of·Contents</h2> | 218 | <h2>Table·of·Contents</h2> |
219 | <div·id="text-table-of-contents"·role="doc-toc"> | 219 | <div·id="text-table-of-contents"·role="doc-toc"> |
220 | <ul> | 220 | <ul> |
221 | <li><a·href="#org | 221 | <li><a·href="#orgafa4d9e">Triggering·expansion</a> |
222 | <ul> | 222 | <ul> |
223 | <li><a·href="#org | 223 | <li><a·href="#org90552c5">Trigger·key</a> |
224 | <ul> | 224 | <ul> |
225 | <li><a·href="#org | 225 | <li><a·href="#orga227954">Fallback·behaviour</a></li> |
226 | </ul> | 226 | </ul> |
227 | </li> | 227 | </li> |
228 | <li><a·href="#org | 228 | <li><a·href="#org2ec345d">Insert·at·point</a> |
229 | <ul> | 229 | <ul> |
230 | <li><a·href="#org | 230 | <li><a·href="#orgca422dc">Inserting·region·or·register·contents·into·snippet</a></li> |
231 | </ul> | 231 | </ul> |
232 | </li> | 232 | </li> |
233 | <li><a·href="#org | 233 | <li><a·href="#orgc9b6615">Snippet·keybinding</a></li> |
234 | <li><a·href="#org | 234 | <li><a·href="#orgc0851a9">Expanding·from·the·menu</a></li> |
235 | <li><a·href="#org | 235 | <li><a·href="#org5d362c4">Expanding·with·<code>hippie-expand</code></a></li> |
236 | <li><a·href="#org | 236 | <li><a·href="#orgb4c83fe">Expanding·from·emacs-lisp·code</a></li> |
237 | </ul> | 237 | </ul> |
238 | </li> | 238 | </li> |
239 | <li><a·href="#org | 239 | <li><a·href="#org0941577">Controlling·expansion</a> |
240 | <ul> | 240 | <ul> |
241 | <li><a·href="#org | 241 | <li><a·href="#orga43f0c3">Eligible·snippets</a></li> |
242 | <li><a·href="#org | 242 | <li><a·href="#org1375970">The·condition·system·</a></li> |
243 | <li><a·href="#org | 243 | <li><a·href="#orgba4110d">Multiples·snippet·with·the·same·key</a> |
244 | <ul> | 244 | <ul> |
245 | <li><a·href="#org | 245 | <li><a·href="#orgc51d35a">Use·the·X·window·system</a></li> |
246 | <li><a·href="#org | 246 | <li><a·href="#org8fca6b1">Minibuffer·prompting</a></li> |
247 | <li><a·href="#org | 247 | <li><a·href="#orgfeffc46">Use·<code>dropdown-menu.el</code></a></li> |
248 | <li><a·href="#org | 248 | <li><a·href="#org482871e">Roll·your·own</a></li> |
249 | </ul> | 249 | </ul> |
250 | </li> | 250 | </li> |
251 | </ul> | 251 | </ul> |
252 | </li> | 252 | </li> |
253 | </ul> | 253 | </ul> |
254 | </div> | 254 | </div> |
255 | </div> | 255 | </div> |
Offset 257, 17 lines modified | Offset 257, 17 lines modified | ||
257 | This·section·describes·how·YASnippet·chooses·snippets·for·expansion·at·point. | 257 | This·section·describes·how·YASnippet·chooses·snippets·for·expansion·at·point. |
258 | </p> | 258 | </p> |
259 | <p> | 259 | <p> |
260 | Maybe,·you'll·want·some·snippets·to·be·expanded·in·a·particular | 260 | Maybe,·you'll·want·some·snippets·to·be·expanded·in·a·particular |
261 | mode,·or·only·under·certain·conditions,·or·be·prompted·using | 261 | mode,·or·only·under·certain·conditions,·or·be·prompted·using |
262 | </p> | 262 | </p> |
263 | <div·id="outline-container-org | 263 | <div·id="outline-container-orgafa4d9e"·class="outline-2"> |
264 | <h2·id="org | 264 | <h2·id="orgafa4d9e">Triggering·expansion</h2> |
265 | <div·class="outline-text-2"·id="text-org | 265 | <div·class="outline-text-2"·id="text-orgafa4d9e"> |
266 | <p> | 266 | <p> |
267 | You·can·use·YASnippet·to·expand·snippets·in·different·ways: | 267 | You·can·use·YASnippet·to·expand·snippets·in·different·ways: |
268 | </p> | 268 | </p> |
269 | <ul·class="org-ul"> | 269 | <ul·class="org-ul"> |
270 | <li>When·<a·href="snippet-reference.html#yas-minor-mode"><code>yas-minor-mode</code></a>·is·active: | 270 | <li>When·<a·href="snippet-reference.html#yas-minor-mode"><code>yas-minor-mode</code></a>·is·active: |
271 | <ul·class="org-ul"> | 271 | <ul·class="org-ul"> |
Offset 286, 17 lines modified | Offset 286, 17 lines modified | ||
286 | <li>Use·m2m's·excellent·auto-complete | 286 | <li>Use·m2m's·excellent·auto-complete |
287 | TODO:·example·for·this</li> | 287 | TODO:·example·for·this</li> |
288 | <li>Expanding·from·emacs-lisp·code</li> | 288 | <li>Expanding·from·emacs-lisp·code</li> |
289 | </ul> | 289 | </ul> |
290 | </div> | 290 | </div> |
291 | <div·id="outline-container-org | 291 | <div·id="outline-container-org90552c5"·class="outline-3"> |
292 | <h3·id="org | 292 | <h3·id="org90552c5">Trigger·key</h3> |
293 | <div·class="outline-text-3"·id="text-org | 293 | <div·class="outline-text-3"·id="text-org90552c5"> |
294 | <p> | 294 | <p> |
295 | <a·href="snippet-reference.html#yas-expand"><code>yas-expand</code></a>·tries·to·expand·a·<i>snippet·abbrev</i>·(also·known·as | 295 | <a·href="snippet-reference.html#yas-expand"><code>yas-expand</code></a>·tries·to·expand·a·<i>snippet·abbrev</i>·(also·known·as |
296 | <i>snippet·key</i>)·before·point.··YASnippet·also·provides·a·<i>conditional | 296 | <i>snippet·key</i>)·before·point.··YASnippet·also·provides·a·<i>conditional |
297 | binding</i>·for·this·command:·the·variable·<a·href="snippet-reference.html#yas-expand"><code>yas-maybe-expand</code></a>·contains·a | 297 | binding</i>·for·this·command:·the·variable·<a·href="snippet-reference.html#yas-expand"><code>yas-maybe-expand</code></a>·contains·a |
298 | special·value·which,·when·bound·in·a·keymap,·tells·Emacs·to·call | 298 | special·value·which,·when·bound·in·a·keymap,·tells·Emacs·to·call |
299 | <a·href="snippet-reference.html#yas-expand"><code>yas-expand</code></a>·if·and·only·if·there·is·a·snippet·abbrev·before·point. | 299 | <a·href="snippet-reference.html#yas-expand"><code>yas-expand</code></a>·if·and·only·if·there·is·a·snippet·abbrev·before·point. |
300 | If·there·is·no·snippet·to·expand,·Emacs·will·behave·as·if·<a·href="snippet-reference.html#yas-expand"><code>yas-expand</code></a> | 300 | If·there·is·no·snippet·to·expand,·Emacs·will·behave·as·if·<a·href="snippet-reference.html#yas-expand"><code>yas-expand</code></a> |
Offset 332, 39 lines modified | Offset 332, 39 lines modified | ||
332 | <p> | 332 | <p> |
333 | To·enable·the·YASnippet·minor·mode·in·all·buffers·globally·use·the | 333 | To·enable·the·YASnippet·minor·mode·in·all·buffers·globally·use·the |
334 | command·<a·href="snippet-reference.html#yas-global-mode"><code>yas-global-mode</code></a>.·This·will·enable·a·modeline·indicator, | 334 | command·<a·href="snippet-reference.html#yas-global-mode"><code>yas-global-mode</code></a>.·This·will·enable·a·modeline·indicator, |
335 | <code>yas</code>: | 335 | <code>yas</code>: |
336 | </p> | 336 | </p> |
337 | <div·id="org | 337 | <div·id="orgdf728a8"·class="figure"> |
338 | <p><img·src="./images/minor-mode-indicator.png"·alt="minor-mode-indicator.png"·/> | 338 | <p><img·src="./images/minor-mode-indicator.png"·alt="minor-mode-indicator.png"·/> |
339 | </p> | 339 | </p> |
340 | </div> | 340 | </div> |
341 | <p> | 341 | <p> |
342 | When·you·use·<a·href="snippet-reference.html#yas-global-mode"><code>yas-global-mode</code></a>·you·can·also·selectively·disable | 342 | When·you·use·<a·href="snippet-reference.html#yas-global-mode"><code>yas-global-mode</code></a>·you·can·also·selectively·disable |
343 | YASnippet·in·some·buffers·by·calling·<a·href="snippet-reference.html#yas-minor-mode"><code>yas-minor-mode</code></a>·with·a·negative | 343 | YASnippet·in·some·buffers·by·calling·<a·href="snippet-reference.html#yas-minor-mode"><code>yas-minor-mode</code></a>·with·a·negative |
344 | argument·in·the·buffer's·mode·hook. | 344 | argument·in·the·buffer's·mode·hook. |
345 | </p> | 345 | </p> |
346 | </div> | 346 | </div> |
347 | <div·id="outline-container-org | 347 | <div·id="outline-container-orga227954"·class="outline-4"> |
348 | <h4·id="org | 348 | <h4·id="orga227954">Fallback·behaviour</h4> |
349 | <div·class="outline-text-4"·id="text-org | 349 | <div·class="outline-text-4"·id="text-orga227954"> |
350 | <p> | 350 | <p> |
351 | YASnippet·used·to·support·a·more·complicated·way·of·sharing | 351 | YASnippet·used·to·support·a·more·complicated·way·of·sharing |
352 | keybindings·before·<a·href="snippet-reference.html#yas-expand"><code>yas-maybe-expand</code></a>·was·added.··This·is·now | 352 | keybindings·before·<a·href="snippet-reference.html#yas-expand"><code>yas-maybe-expand</code></a>·was·added.··This·is·now |
353 | obsolete. | 353 | obsolete. |
354 | </p> | 354 | </p> |
355 | </div> | 355 | </div> |
356 | </div> | 356 | </div> |
357 | </div> | 357 | </div> |
358 | <div·id="outline-container-org | 358 | <div·id="outline-container-org2ec345d"·class="outline-3"> |
359 | <h3·id="org | 359 | <h3·id="org2ec345d">Insert·at·point</h3> |
360 | <div·class="outline-text-3"·id="text-org | 360 | <div·class="outline-text-3"·id="text-org2ec345d"> |
361 | <p> | 361 | <p> |
362 | The·command·<a·href="snippet-reference.html#yas-insert-snippet"><code>yas-insert-snippet</code></a>·lets·you·insert·snippets·at·point | 362 | The·command·<a·href="snippet-reference.html#yas-insert-snippet"><code>yas-insert-snippet</code></a>·lets·you·insert·snippets·at·point |
363 | <i>for·your·current·major·mode</i>.·It·prompts·you·for·the·snippet·key | 363 | <i>for·your·current·major·mode</i>.·It·prompts·you·for·the·snippet·key |
364 | first,·and·then·for·a·snippet·template·if·more·than·one·template | 364 | first,·and·then·for·a·snippet·template·if·more·than·one·template |
365 | exists·for·the·same·key. | 365 | exists·for·the·same·key. |
366 | </p> | 366 | </p> |
Offset 375, 17 lines modified | Offset 375, 17 lines modified | ||
375 | </p> | 375 | </p> |
376 | <p> | 376 | <p> |
377 | The·prompting·methods·used·are·again·controlled·by | 377 | The·prompting·methods·used·are·again·controlled·by |
378 | <a·href="snippet-reference.html#yas-prompt-functions"><code>yas-prompt-functions</code></a>. | 378 | <a·href="snippet-reference.html#yas-prompt-functions"><code>yas-prompt-functions</code></a>. |
379 | </p> | 379 | </p> |
380 | </div> | 380 | </div> |
381 | <div·id="outline-container-org | 381 | <div·id="outline-container-orgca422dc"·class="outline-4"> |
Max diff block lines reached; 10283/17040 bytes (60.35%) of diff not shown. |
Offset 214, 19 lines modified | Offset 214, 19 lines modified | ||
214 | </div> | 214 | </div> |
215 | <div·id="content"·class="content"> | 215 | <div·id="content"·class="content"> |
216 | <h1·class="title">YASnippet·menu</h1> | 216 | <h1·class="title">YASnippet·menu</h1> |
217 | <div·id="table-of-contents"·role="doc-toc"> | 217 | <div·id="table-of-contents"·role="doc-toc"> |
218 | <h2>Table·of·Contents</h2> | 218 | <h2>Table·of·Contents</h2> |
219 | <div·id="text-table-of-contents"·role="doc-toc"> | 219 | <div·id="text-table-of-contents"·role="doc-toc"> |
220 | <ul> | 220 | <ul> |
221 | <li><a·href="#org | 221 | <li><a·href="#org33b4721">Loading·snippets·from·menu</a></li> |
222 | <li><a·href="#org | 222 | <li><a·href="#org527961a">Snippet·menu·behavior</a></li> |
223 | <li><a·href="#org | 223 | <li><a·href="#org54a59c2">Controlling·indenting</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#orga03e759">Prompting·method</a></li> |
225 | <li><a·href="#org2 | 225 | <li><a·href="#org2735c56">Misc</a></li> |
226 | </ul> | 226 | </ul> |
227 | </div> | 227 | </div> |
228 | </div> | 228 | </div> |
229 | <p> | 229 | <p> |
230 | When·<a·href="snippet-reference.html#yas-minor-mode"><code>yas-minor-mode</code></a>·is·active,·YASnippet·will·setup·a·menu·just·after | 230 | When·<a·href="snippet-reference.html#yas-minor-mode"><code>yas-minor-mode</code></a>·is·active,·YASnippet·will·setup·a·menu·just·after |
231 | the·"Buffers"·menu·in·the·menubar. | 231 | the·"Buffers"·menu·in·the·menubar. |
232 | </p> | 232 | </p> |
Offset 244, 36 lines modified | Offset 244, 36 lines modified | ||
244 | snippet·definitions.</li> | 244 | snippet·definitions.</li> |
245 | <li>A·series·of·submenus·for·customizing·and·exploring·YASnippet | 245 | <li>A·series·of·submenus·for·customizing·and·exploring·YASnippet |
246 | behavior.</li> | 246 | behavior.</li> |
247 | </ul> | 247 | </ul> |
248 | <div·id="org | 248 | <div·id="org22284cc"·class="figure"> |
249 | <p><img·src="./images/menu-1.png"·alt="menu-1.png"·/> | 249 | <p><img·src="./images/menu-1.png"·alt="menu-1.png"·/> |
250 | </p> | 250 | </p> |
251 | </div> | 251 | </div> |
252 | <div·id="outline-container-org | 252 | <div·id="outline-container-org33b4721"·class="outline-2"> |
253 | <h2·id="org | 253 | <h2·id="org33b4721">Loading·snippets·from·menu</h2> |
254 | <div·class="outline-text-2"·id="text-org | 254 | <div·class="outline-text-2"·id="text-org33b4721"> |
255 | <p> | 255 | <p> |
256 | Invoking·"Load·snippets…"·from·the·menu·invokes·<a·href="snippet-reference.html#yas-load-directory"><code>yas-load-directory</code></a> | 256 | Invoking·"Load·snippets…"·from·the·menu·invokes·<a·href="snippet-reference.html#yas-load-directory"><code>yas-load-directory</code></a> |
257 | and·prompts·you·for·a·snippet·directory·hierarchy·to·load. | 257 | and·prompts·you·for·a·snippet·directory·hierarchy·to·load. |
258 | </p> | 258 | </p> |
259 | <p> | 259 | <p> |
260 | Also·useful·is·the·"Reload·everything"·item·to·invoke·<a·href="snippet-reference.html#yas-reload-all"><code>yas-reload-all</code></a> | 260 | Also·useful·is·the·"Reload·everything"·item·to·invoke·<a·href="snippet-reference.html#yas-reload-all"><code>yas-reload-all</code></a> |
261 | which·uncondionally·reloads·all·the·snippets·directories·defined·in | 261 | which·uncondionally·reloads·all·the·snippets·directories·defined·in |
262 | <a·href="snippet-reference.html#yas-snippet-dirs"><code>yas-snippet-dirs</code></a>·and·rebuilds·the·menus. | 262 | <a·href="snippet-reference.html#yas-snippet-dirs"><code>yas-snippet-dirs</code></a>·and·rebuilds·the·menus. |
263 | </p> | 263 | </p> |
264 | </div> | 264 | </div> |
265 | </div> | 265 | </div> |
266 | <div·id="outline-container-org | 266 | <div·id="outline-container-org527961a"·class="outline-2"> |
267 | <h2·id="org | 267 | <h2·id="org527961a">Snippet·menu·behavior</h2> |
268 | <div·class="outline-text-2"·id="text-org | 268 | <div·class="outline-text-2"·id="text-org527961a"> |
269 | <p> | 269 | <p> |
270 | YASnippet·will·list·in·this·section·all·the·loaded·snippet·definitions | 270 | YASnippet·will·list·in·this·section·all·the·loaded·snippet·definitions |
271 | organized·by·snippet·table·name. | 271 | organized·by·snippet·table·name. |
272 | </p> | 272 | </p> |
273 | <p> | 273 | <p> |
274 | You·can·use·this·section·to·explore·currently·loaded·snippets.·If·you | 274 | You·can·use·this·section·to·explore·currently·loaded·snippets.·If·you |
Offset 300, 36 lines modified | Offset 300, 36 lines modified | ||
300 | <p> | 300 | <p> |
301 | These·customizations·can·also·be·found·in·the·menu·itself,·under·the | 301 | These·customizations·can·also·be·found·in·the·menu·itself,·under·the |
302 | "Snippet·menu·behavior"·submenu. | 302 | "Snippet·menu·behavior"·submenu. |
303 | </p> | 303 | </p> |
304 | </div> | 304 | </div> |
305 | </div> | 305 | </div> |
306 | <div·id="outline-container-org | 306 | <div·id="outline-container-org54a59c2"·class="outline-2"> |
307 | <h2·id="org | 307 | <h2·id="org54a59c2">Controlling·indenting</h2> |
308 | <div·class="outline-text-2"·id="text-org | 308 | <div·class="outline-text-2"·id="text-org54a59c2"> |
309 | <p> | 309 | <p> |
310 | The·"Indenting"·submenu·contains·options·to·control·the·values·of | 310 | The·"Indenting"·submenu·contains·options·to·control·the·values·of |
311 | <a·href="snippet-reference.html#yas-indent-line"><code>yas-indent-line</code></a>·and·<a·href="snippet-reference.html#yas-also-auto-indent-first-line"><code>yas-also-auto-indent-first-line</code></a>.·See | 311 | <a·href="snippet-reference.html#yas-indent-line"><code>yas-indent-line</code></a>·and·<a·href="snippet-reference.html#yas-also-auto-indent-first-line"><code>yas-also-auto-indent-first-line</code></a>.·See |
312 | <a·href="./snippet-development.html">Writing·snippets</a>. | 312 | <a·href="./snippet-development.html">Writing·snippets</a>. |
313 | </p> | 313 | </p> |
314 | </div> | 314 | </div> |
315 | </div> | 315 | </div> |
316 | <div·id="outline-container-org | 316 | <div·id="outline-container-orga03e759"·class="outline-2"> |
317 | <h2·id="org | 317 | <h2·id="orga03e759">Prompting·method</h2> |
318 | <div·class="outline-text-2"·id="text-org | 318 | <div·class="outline-text-2"·id="text-orga03e759"> |
319 | <p> | 319 | <p> |
320 | The·"Prompting·method"·submenu·contains·options·to·control·the·value·of | 320 | The·"Prompting·method"·submenu·contains·options·to·control·the·value·of |
321 | <a·href="snippet-reference.html#yas-prompt-functions"><code>yas-prompt-functions</code></a>.·See·<a·href="./snippet-expansion.html">Expanding·snippets</a>. | 321 | <a·href="snippet-reference.html#yas-prompt-functions"><code>yas-prompt-functions</code></a>.·See·<a·href="./snippet-expansion.html">Expanding·snippets</a>. |
322 | </p> | 322 | </p> |
323 | </div> | 323 | </div> |
324 | </div> | 324 | </div> |
325 | <div·id="outline-container-org2 | 325 | <div·id="outline-container-org2735c56"·class="outline-2"> |
326 | <h2·id="org2 | 326 | <h2·id="org2735c56">Misc</h2> |
327 | <div·class="outline-text-2"·id="text-org2 | 327 | <div·class="outline-text-2"·id="text-org2735c56"> |
328 | <p> | 328 | <p> |
329 | The·"Misc"·submenu·contains·options·to·control·the·values·of·more | 329 | The·"Misc"·submenu·contains·options·to·control·the·values·of·more |
330 | variables. | 330 | variables. |
331 | </p> | 331 | </p> |
332 | </div> | 332 | </div> |
333 | </div> | 333 | </div> |
334 | </div> | 334 | </div> |
Offset 214, 34 lines modified | Offset 214, 34 lines modified | ||
214 | </div> | 214 | </div> |
215 | <div·id="content"·class="content"> | 215 | <div·id="content"·class="content"> |
216 | <h1·class="title">Organizing·snippets</h1> | 216 | <h1·class="title">Organizing·snippets</h1> |
217 | <div·id="table-of-contents"·role="doc-toc"> | 217 | <div·id="table-of-contents"·role="doc-toc"> |
218 | <h2>Table·of·Contents</h2> | 218 | <h2>Table·of·Contents</h2> |
219 | <div·id="text-table-of-contents"·role="doc-toc"> | 219 | <div·id="text-table-of-contents"·role="doc-toc"> |
220 | <ul> | 220 | <ul> |
221 | <li><a·href="#org | 221 | <li><a·href="#org352b168">Basic·structure</a></li> |
222 | <li><a·href="#org | 222 | <li><a·href="#org4ec09d6">Setting·up·<code>yas-snippet-dirs</code></a></li> |
223 | <li><a·href="#org | 223 | <li><a·href="#orga72e968">The·<code>.yas-parents</code>·file</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#org791c40a"><span·class="todo·TODO">TODO</span>·The·<code>.yas-make-groups</code>·file</a></li> |
225 | <li><a·href="#org | 225 | <li><a·href="#org3ad2d66">The·<code>.yas-setup.el</code>·file</a></li> |
226 | <li><a·href="#org | 226 | <li><a·href="#org2b810d4">The·<code>.yas-compiled-snippet.el</code>·file</a></li> |
227 | <li><a·href="#org | 227 | <li><a·href="#org1bd0483">The·<code>.yas-skip</code>·file</a></li> |
228 | </ul> | 228 | </ul> |
229 | </div> | 229 | </div> |
230 | </div> | 230 | </div> |
231 | <div·id="outline-container-org | 231 | <div·id="outline-container-org352b168"·class="outline-2"> |
232 | <h2·id="org | 232 | <h2·id="org352b168">Basic·structure</h2> |
233 | <div·class="outline-text-2"·id="text-org | 233 | <div·class="outline-text-2"·id="text-org352b168"> |
234 | <p> | 234 | <p> |
235 | Snippet·collections·can·be·stored·in·plain·text·files.·They·are | 235 | Snippet·collections·can·be·stored·in·plain·text·files.·They·are |
236 | arranged·by·sub-directories·naming·<b>snippet·tables</b>.··These·mostly | 236 | arranged·by·sub-directories·naming·<b>snippet·tables</b>.··These·mostly |
237 | name·Emacs·major·mode·names. | 237 | name·Emacs·major·mode·names. |
238 | </p> | 238 | </p> |
239 | <pre·class="example"·id="org | 239 | <pre·class="example"·id="orgf62e3b9"> |
240 | . | 240 | . |
241 | |--·c-mode | 241 | |--·c-mode |
242 | |···`--·printf | 242 | |···`--·printf |
243 | |--·java-mode | 243 | |--·java-mode |
244 | |···`--·println | 244 | |···`--·println |
245 | `--·text-mode | 245 | `--·text-mode |
246 | 246 | ||
Offset 251, 17 lines modified | Offset 251, 17 lines modified | ||
251 | <p> | 251 | <p> |
252 | The·collections·are·loaded·into·<b>snippet·tables</b>·which·the | 252 | The·collections·are·loaded·into·<b>snippet·tables</b>·which·the |
253 | triggering·mechanism·(see·<a·href="snippet-expansion.html">Expanding·Snippets</a>)·looks·up·and | 253 | triggering·mechanism·(see·<a·href="snippet-expansion.html">Expanding·Snippets</a>)·looks·up·and |
254 | (hopefully)·causes·the·right·snippet·to·be·expanded·for·you. | 254 | (hopefully)·causes·the·right·snippet·to·be·expanded·for·you. |
255 | </p> | 255 | </p> |
256 | </div> | 256 | </div> |
257 | </div> | 257 | </div> |
258 | <div·id="outline-container-org | 258 | <div·id="outline-container-org4ec09d6"·class="outline-2"> |
259 | <h2·id="org | 259 | <h2·id="org4ec09d6">Setting·up·<code>yas-snippet-dirs</code></h2> |
260 | <div·class="outline-text-2"·id="text-org | 260 | <div·class="outline-text-2"·id="text-org4ec09d6"> |
261 | <p> | 261 | <p> |
262 | The·emacs·variable·<a·href="snippet-reference.html#yas-snippet-dirs"><code>yas-snippet-dirs</code></a>·tells·YASnippet | 262 | The·emacs·variable·<a·href="snippet-reference.html#yas-snippet-dirs"><code>yas-snippet-dirs</code></a>·tells·YASnippet |
263 | which·collections·to·consider.·It's·used·when·you·activate | 263 | which·collections·to·consider.·It's·used·when·you·activate |
264 | <a·href="snippet-reference.html#yas-global-mode"><code>yas-global-mode</code></a>·or·call | 264 | <a·href="snippet-reference.html#yas-global-mode"><code>yas-global-mode</code></a>·or·call |
265 | <a·href="snippet-reference.html#yas-reload-all"><code>yas-reload-all</code></a>·interactively. | 265 | <a·href="snippet-reference.html#yas-reload-all"><code>yas-reload-all</code></a>·interactively. |
266 | </p> | 266 | </p> |
Offset 294, 26 lines modified | Offset 294, 26 lines modified | ||
294 | <p> | 294 | <p> |
295 | Collections·appearing·earlier·in·the·list·override·snippets·with·same·names | 295 | Collections·appearing·earlier·in·the·list·override·snippets·with·same·names |
296 | appearing·in·collections·later·in·the·list.·<a·href="snippet-reference.html#yas-new-snippet"><code>yas-new-snippet</code></a>·always·stores | 296 | appearing·in·collections·later·in·the·list.·<a·href="snippet-reference.html#yas-new-snippet"><code>yas-new-snippet</code></a>·always·stores |
297 | snippets·in·the·first·collection. | 297 | snippets·in·the·first·collection. |
298 | </p> | 298 | </p> |
299 | </div> | 299 | </div> |
300 | </div> | 300 | </div> |
301 | <div·id="outline-container-org | 301 | <div·id="outline-container-orga72e968"·class="outline-2"> |
302 | <h2·id="org | 302 | <h2·id="orga72e968">The·<code>.yas-parents</code>·file</h2> |
303 | <div·class="outline-text-2"·id="text-org | 303 | <div·class="outline-text-2"·id="text-orga72e968"> |
304 | <p> | 304 | <p> |
305 | It's·very·useful·to·have·certain·modes·share·snippets·between | 305 | It's·very·useful·to·have·certain·modes·share·snippets·between |
306 | themselves.·To·do·this,·choose·a·mode·subdirectory·and·place·a | 306 | themselves.·To·do·this,·choose·a·mode·subdirectory·and·place·a |
307 | <code>.yas-parents</code>·containing·a·whitespace-separated·list·of·other·mode | 307 | <code>.yas-parents</code>·containing·a·whitespace-separated·list·of·other·mode |
308 | names.·When·you·reload·those·modes·become·parents·of·the·original | 308 | names.·When·you·reload·those·modes·become·parents·of·the·original |
309 | mode. | 309 | mode. |
310 | </p> | 310 | </p> |
311 | <pre·class="example"·id="org | 311 | <pre·class="example"·id="org930d637"> |
312 | . | 312 | . |
313 | |--·c-mode | 313 | |--·c-mode |
314 | |···|--·.yas-parents····#·contains·"cc-mode·text-mode" | 314 | |···|--·.yas-parents····#·contains·"cc-mode·text-mode" |
315 | |···`--·printf | 315 | |···`--·printf |
316 | |--·cc-mode | 316 | |--·cc-mode |
317 | |···|--·for | 317 | |···|--·for |
318 | |···`--·while | 318 | |···`--·while |
Offset 322, 36 lines modified | Offset 322, 36 lines modified | ||
322 | |···`--·println | 322 | |···`--·println |
323 | `--·text-mode | 323 | `--·text-mode |
324 | 324 | ||
325 | ····`--·time | 325 | ····`--·time |
326 | </pre> | 326 | </pre> |
327 | </div> | 327 | </div> |
328 | </div> | 328 | </div> |
329 | <div·id="outline-container-org | 329 | <div·id="outline-container-org791c40a"·class="outline-2"> |
330 | <h2·id="org | 330 | <h2·id="org791c40a"><span·class="todo·TODO">TODO</span>·The·<code>.yas-make-groups</code>·file</h2> |
331 | <div·class="outline-text-2"·id="text-org | 331 | <div·class="outline-text-2"·id="text-org791c40a"> |
332 | <p> | 332 | <p> |
333 | If·you·place·an·empty·plain·text·file·<code>.yas-make-groups</code>·inside·one | 333 | If·you·place·an·empty·plain·text·file·<code>.yas-make-groups</code>·inside·one |
334 | of·the·mode·directories,·the·names·of·these·sub-directories·are | 334 | of·the·mode·directories,·the·names·of·these·sub-directories·are |
335 | considered·groups·of·snippets·and·<a·href="snippet-menu.html">the·menu</a>·is·organized·much·more | 335 | considered·groups·of·snippets·and·<a·href="snippet-menu.html">the·menu</a>·is·organized·much·more |
336 | cleanly: | 336 | cleanly: |
337 | </p> | 337 | </p> |
338 | <div·id="org | 338 | <div·id="orgcb4946c"·class="figure"> |
339 | <p><img·src="./images/menu-groups.png"·alt="menu-groups.png"·/> | 339 | <p><img·src="./images/menu-groups.png"·alt="menu-groups.png"·/> |
340 | </p> | 340 | </p> |
341 | </div> | 341 | </div> |
342 | <p> | 342 | <p> |
343 | Another·way·to·achieve·this·is·to·place·a·<code>#·group:</code>·directive | 343 | Another·way·to·achieve·this·is·to·place·a·<code>#·group:</code>·directive |
344 | inside·the·snippet·definition.·See·<a·href="./snippet-development.html">Writing·Snippets</a>. | 344 | inside·the·snippet·definition.·See·<a·href="./snippet-development.html">Writing·Snippets</a>. |
345 | </p> | 345 | </p> |
346 | <pre·class="example"·id="org | 346 | <pre·class="example"·id="org2ea877f"> |
347 | $·tree·ruby-mode/ | 347 | $·tree·ruby-mode/ |
348 | ruby-mode/ | 348 | ruby-mode/ |
349 | |--·.yas-make-groups | 349 | |--·.yas-make-groups |
350 | |--·collections | 350 | |--·collections |
351 | |···|--·each | 351 | |···|--·each |
352 | |···`--·... | 352 | |···`--·... |
353 | |--·control·structure | 353 | |--·control·structure |
Offset 365, 44 lines modified | Offset 365, 44 lines modified | ||
365 | <p> | 365 | <p> |
366 | Yet·another·way·to·create·a·nice·snippet·menu·is·to·write·into | 366 | Yet·another·way·to·create·a·nice·snippet·menu·is·to·write·into |
367 | <code>.yas-make-groups</code>·a·menu·definition.·TODO | 367 | <code>.yas-make-groups</code>·a·menu·definition.·TODO |
368 | </p> | 368 | </p> |
369 | </div> | 369 | </div> |
370 | </div> | 370 | </div> |
371 | <div·id="outline-container-org | 371 | <div·id="outline-container-org3ad2d66"·class="outline-2"> |
372 | <h2·id="org | 372 | <h2·id="org3ad2d66">The·<code>.yas-setup.el</code>·file</h2> |
373 | <div·class="outline-text-2"·id="text-org | 373 | <div·class="outline-text-2"·id="text-org3ad2d66"> |
Max diff block lines reached; 1540/7532 bytes (20.45%) of diff not shown. |
Offset 214, 15 lines modified | Offset 214, 15 lines modified | ||
214 | </div> | 214 | </div> |
215 | <div·id="content"·class="content"> | 215 | <div·id="content"·class="content"> |
216 | <h1·class="title">Reference</h1> | 216 | <h1·class="title">Reference</h1> |
217 | <div·id="table-of-contents"·role="doc-toc"> | 217 | <div·id="table-of-contents"·role="doc-toc"> |
218 | <h2>Table·of·Contents</h2> | 218 | <h2>Table·of·Contents</h2> |
219 | <div·id="text-table-of-contents"·role="doc-toc"> | 219 | <div·id="text-table-of-contents"·role="doc-toc"> |
220 | <ul> | 220 | <ul> |
221 | <li><a·href="#org | 221 | <li><a·href="#org0278aa4">Interactive·functions</a> |
222 | <ul> | 222 | <ul> |
223 | <li><a·href="#yas-activate-extra-mode"><code·class='function'>yas-activate-extra-mode</code>·(<code>mode</code>)</a></li> | 223 | <li><a·href="#yas-activate-extra-mode"><code·class='function'>yas-activate-extra-mode</code>·(<code>mode</code>)</a></li> |
224 | <li><a·href="#yas-exit-snippet"><code·class='function'>yas-exit-snippet</code>·(<code>snippet</code>)</a></li> | 224 | <li><a·href="#yas-exit-snippet"><code·class='function'>yas-exit-snippet</code>·(<code>snippet</code>)</a></li> |
225 | <li><a·href="#yas-deactivate-extra-mode"><code·class='function'>yas-deactivate-extra-mode</code>·(<code>mode</code>)</a></li> | 225 | <li><a·href="#yas-deactivate-extra-mode"><code·class='function'>yas-deactivate-extra-mode</code>·(<code>mode</code>)</a></li> |
226 | <li><a·href="#yas-reload-all"><code·class='function'>yas-reload-all</code>·(<i>&optional</i>·<code>no-jit</code>·<code>interactive</code>)</a></li> | 226 | <li><a·href="#yas-reload-all"><code·class='function'>yas-reload-all</code>·(<i>&optional</i>·<code>no-jit</code>·<code>interactive</code>)</a></li> |
227 | <li><a·href="#yas-describe-tables"><code·class='function'>yas-describe-tables</code>·(<i>&optional</i>·<code>with-nonactive</code>)</a></li> | 227 | <li><a·href="#yas-describe-tables"><code·class='function'>yas-describe-tables</code>·(<i>&optional</i>·<code>with-nonactive</code>)</a></li> |
228 | <li><a·href="#yas-minor-mode-on"><code·class='function'>yas-minor-mode-on</code>·()</a></li> | 228 | <li><a·href="#yas-minor-mode-on"><code·class='function'>yas-minor-mode-on</code>·()</a></li> |
Offset 248, 15 lines modified | Offset 248, 15 lines modified | ||
248 | <li><a·href="#yas-abort-snippet"><code·class='function'>yas-abort-snippet</code>·(<i>&optional</i>·<code>snippet</code>)</a></li> | 248 | <li><a·href="#yas-abort-snippet"><code·class='function'>yas-abort-snippet</code>·(<i>&optional</i>·<code>snippet</code>)</a></li> |
249 | <li><a·href="#yas-direct-keymaps-reload"><code·class='function'>yas-direct-keymaps-reload</code>·()</a></li> | 249 | <li><a·href="#yas-direct-keymaps-reload"><code·class='function'>yas-direct-keymaps-reload</code>·()</a></li> |
250 | <li><a·href="#yas-minor-mode"><code·class='function'>yas-minor-mode</code>·(<i>&optional</i>·<code>arg</code>)</a></li> | 250 | <li><a·href="#yas-minor-mode"><code·class='function'>yas-minor-mode</code>·(<i>&optional</i>·<code>arg</code>)</a></li> |
251 | <li><a·href="#yas-load-snippet-buffer-and-close"><code·class='function'>yas-load-snippet-buffer-and-close</code>·(<code>table</code>·<i>&optional</i>·<code>kill</code>)</a></li> | 251 | <li><a·href="#yas-load-snippet-buffer-and-close"><code·class='function'>yas-load-snippet-buffer-and-close</code>·(<code>table</code>·<i>&optional</i>·<code>kill</code>)</a></li> |
252 | <li><a·href="#yas-expand"><code·class='function'>yas-expand</code>·(<i>&optional</i>·<code>field</code>)</a></li> | 252 | <li><a·href="#yas-expand"><code·class='function'>yas-expand</code>·(<i>&optional</i>·<code>field</code>)</a></li> |
253 | </ul> | 253 | </ul> |
254 | </li> | 254 | </li> |
255 | <li><a·href="#org | 255 | <li><a·href="#org1c7305c">Customization·variables</a> |
256 | <ul> | 256 | <ul> |
257 | <li><a·href="#yas-choose-tables-first"><code·class='variable'>yas-choose-tables-first</code></a></li> | 257 | <li><a·href="#yas-choose-tables-first"><code·class='variable'>yas-choose-tables-first</code></a></li> |
258 | <li><a·href="#yas-inhibit-overlay-modification-protection"><code·class='variable'>yas-inhibit-overlay-modification-protection</code></a></li> | 258 | <li><a·href="#yas-inhibit-overlay-modification-protection"><code·class='variable'>yas-inhibit-overlay-modification-protection</code></a></li> |
259 | <li><a·href="#yas-snippet-revival"><code·class='variable'>yas-snippet-revival</code></a></li> | 259 | <li><a·href="#yas-snippet-revival"><code·class='variable'>yas-snippet-revival</code></a></li> |
260 | <li><a·href="#yas-overlay-priority"><code·class='variable'>yas-overlay-priority</code></a></li> | 260 | <li><a·href="#yas-overlay-priority"><code·class='variable'>yas-overlay-priority</code></a></li> |
261 | <li><a·href="#yas-also-indent-empty-lines"><code·class='variable'>yas-also-indent-empty-lines</code></a></li> | 261 | <li><a·href="#yas-also-indent-empty-lines"><code·class='variable'>yas-also-indent-empty-lines</code></a></li> |
262 | <li><a·href="#yas-snippet-dirs"><code·class='function'>yas-snippet-dirs</code>·()</a></li> | 262 | <li><a·href="#yas-snippet-dirs"><code·class='function'>yas-snippet-dirs</code>·()</a></li> |
Offset 275, 15 lines modified | Offset 275, 15 lines modified | ||
275 | <li><a·href="#yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></a></li> | 275 | <li><a·href="#yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></a></li> |
276 | <li><a·href="#yas-trigger-symbol"><code·class='variable'>yas-trigger-symbol</code></a></li> | 276 | <li><a·href="#yas-trigger-symbol"><code·class='variable'>yas-trigger-symbol</code></a></li> |
277 | <li><a·href="#yas-use-menu"><code·class='variable'>yas-use-menu</code></a></li> | 277 | <li><a·href="#yas-use-menu"><code·class='variable'>yas-use-menu</code></a></li> |
278 | <li><a·href="#yas-new-snippet-default"><code·class='variable'>yas-new-snippet-default</code></a></li> | 278 | <li><a·href="#yas-new-snippet-default"><code·class='variable'>yas-new-snippet-default</code></a></li> |
279 | <li><a·href="#yas-choose-keys-first"><code·class='variable'>yas-choose-keys-first</code></a></li> | 279 | <li><a·href="#yas-choose-keys-first"><code·class='variable'>yas-choose-keys-first</code></a></li> |
280 | </ul> | 280 | </ul> |
281 | </li> | 281 | </li> |
282 | <li><a·href="#org | 282 | <li><a·href="#org48e3a79">Useful·functions</a> |
283 | <ul> | 283 | <ul> |
284 | <li><a·href="#yas-selected-text"><code·class='function'>yas-selected-text</code>·()</a></li> | 284 | <li><a·href="#yas-selected-text"><code·class='function'>yas-selected-text</code>·()</a></li> |
285 | <li><a·href="#yas-throw"><code·class='function'>yas-throw</code>·(<code>text</code>)</a></li> | 285 | <li><a·href="#yas-throw"><code·class='function'>yas-throw</code>·(<code>text</code>)</a></li> |
286 | <li><a·href="#yas-define-snippets"><code·class='function'>yas-define-snippets</code>·(<code>mode</code>·<code>snippets</code>)</a></li> | 286 | <li><a·href="#yas-define-snippets"><code·class='function'>yas-define-snippets</code>·(<code>mode</code>·<code>snippets</code>)</a></li> |
287 | <li><a·href="#yas-expand-snippet"><code·class='function'>yas-expand-snippet</code>·(<code>snippet</code>·<i>&optional</i>·<code>start</code>·<code>end</code>·<code>expand-env</code>)</a></li> | 287 | <li><a·href="#yas-expand-snippet"><code·class='function'>yas-expand-snippet</code>·(<code>snippet</code>·<i>&optional</i>·<code>start</code>·<code>end</code>·<code>expand-env</code>)</a></li> |
288 | <li><a·href="#yas-hippie-try-expand"><code·class='function'>yas-hippie-try-expand</code>·(<code>first-time?</code>)</a></li> | 288 | <li><a·href="#yas-hippie-try-expand"><code·class='function'>yas-hippie-try-expand</code>·(<code>first-time?</code>)</a></li> |
289 | <li><a·href="#yas-choose-value"><code·class='function'>yas-choose-value</code>·(<i>&rest</i>·<code>possibilities</code>)</a></li> | 289 | <li><a·href="#yas-choose-value"><code·class='function'>yas-choose-value</code>·(<i>&rest</i>·<code>possibilities</code>)</a></li> |
Offset 319, 15 lines modified | Offset 319, 15 lines modified | ||
319 | <li><a·href="#yas-dropdown-prompt"><code·class='function'>yas-dropdown-prompt</code>·(<code>_prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>)</a></li> | 319 | <li><a·href="#yas-dropdown-prompt"><code·class='function'>yas-dropdown-prompt</code>·(<code>_prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>)</a></li> |
320 | <li><a·href="#yas-verify-value"><code·class='function'>yas-verify-value</code>·(<code>possibilities</code>)</a></li> | 320 | <li><a·href="#yas-verify-value"><code·class='function'>yas-verify-value</code>·(<code>possibilities</code>)</a></li> |
321 | <li><a·href="#yas-global-mode-enable-in-buffer"><code·class='function'>yas-global-mode-enable-in-buffer</code>·()</a></li> | 321 | <li><a·href="#yas-global-mode-enable-in-buffer"><code·class='function'>yas-global-mode-enable-in-buffer</code>·()</a></li> |
322 | <li><a·href="#yas-completing-read"><code·class='function'>yas-completing-read</code>·(<i>&rest</i>·<code>args</code>)</a></li> | 322 | <li><a·href="#yas-completing-read"><code·class='function'>yas-completing-read</code>·(<i>&rest</i>·<code>args</code>)</a></li> |
323 | <li><a·href="#yas-field-value"><code·class='function'>yas-field-value</code>·(<code>number</code>)</a></li> | 323 | <li><a·href="#yas-field-value"><code·class='function'>yas-field-value</code>·(<code>number</code>)</a></li> |
324 | </ul> | 324 | </ul> |
325 | </li> | 325 | </li> |
326 | <li><a·href="#org | 326 | <li><a·href="#org1b0f8b2">Useful·variables</a> |
327 | <ul> | 327 | <ul> |
328 | <li><a·href="#yas-not-string-or-comment-condition"><code·class='variable'>yas-not-string-or-comment-condition</code></a></li> | 328 | <li><a·href="#yas-not-string-or-comment-condition"><code·class='variable'>yas-not-string-or-comment-condition</code></a></li> |
329 | <li><a·href="#yas-maybe-skip-and-clear-field"><code·class='variable'>yas-maybe-skip-and-clear-field</code></a></li> | 329 | <li><a·href="#yas-maybe-skip-and-clear-field"><code·class='variable'>yas-maybe-skip-and-clear-field</code></a></li> |
330 | <li><a·href="#yas-before-expand-snippet-hook"><code·class='variable'>yas-before-expand-snippet-hook</code></a></li> | 330 | <li><a·href="#yas-before-expand-snippet-hook"><code·class='variable'>yas-before-expand-snippet-hook</code></a></li> |
331 | <li><a·href="#yas-moving-away-p"><code·class='variable'>yas-moving-away-p</code></a></li> | 331 | <li><a·href="#yas-moving-away-p"><code·class='variable'>yas-moving-away-p</code></a></li> |
332 | <li><a·href="#yas-verbosity"><code·class='variable'>yas-verbosity</code></a></li> | 332 | <li><a·href="#yas-verbosity"><code·class='variable'>yas-verbosity</code></a></li> |
333 | <li><a·href="#yas-dont-activate-functions"><code·class='variable'>yas-dont-activate-functions</code></a></li> | 333 | <li><a·href="#yas-dont-activate-functions"><code·class='variable'>yas-dont-activate-functions</code></a></li> |
Offset 346, 17 lines modified | Offset 346, 17 lines modified | ||
346 | <li><a·href="#yas-modified-p"><code·class='variable'>yas-modified-p</code></a></li> | 346 | <li><a·href="#yas-modified-p"><code·class='variable'>yas-modified-p</code></a></li> |
347 | <li><a·href="#yas-keymap"><code·class='variable'>yas-keymap</code></a></li> | 347 | <li><a·href="#yas-keymap"><code·class='variable'>yas-keymap</code></a></li> |
348 | </ul> | 348 | </ul> |
349 | </li> | 349 | </li> |
350 | </ul> | 350 | </ul> |
351 | </div> | 351 | </div> |
352 | </div> | 352 | </div> |
353 | <div·id="outline-container-org | 353 | <div·id="outline-container-org0278aa4"·class="outline-2"> |
354 | <h2·id="org | 354 | <h2·id="org0278aa4">Interactive·functions</h2> |
355 | <div·class="outline-text-2"·id="text-org | 355 | <div·class="outline-text-2"·id="text-org0278aa4"> |
356 | </div> | 356 | </div> |
357 | <div·id="outline-container-yas-activate-extra-mode"·class="outline-3"> | 357 | <div·id="outline-container-yas-activate-extra-mode"·class="outline-3"> |
358 | <h3·id="yas-activate-extra-mode"><code·class='function'>yas-activate-extra-mode</code>·(<code>mode</code>)</h3> | 358 | <h3·id="yas-activate-extra-mode"><code·class='function'>yas-activate-extra-mode</code>·(<code>mode</code>)</h3> |
359 | <div·class="outline-text-3"·id="text-yas-activate-extra-mode"> | 359 | <div·class="outline-text-3"·id="text-yas-activate-extra-mode"> |
360 | <p> | 360 | <p> |
361 | Activates·the·snippets·for·the·given·<code>mode</code>·in·the·buffer. | 361 | Activates·the·snippets·for·the·given·<code>mode</code>·in·the·buffer. |
362 | </p> | 362 | </p> |
Offset 676, 15 lines modified | Offset 676, 15 lines modified | ||
676 | positive·prefix·argument·turns·on·the·mode. | 676 | positive·prefix·argument·turns·on·the·mode. |
677 | Negative·prefix·argument·turns·off·the·mode. | 677 | Negative·prefix·argument·turns·off·the·mode. |
678 | </p> | 678 | </p> |
679 | <p> | 679 | <p> |
680 | Key·bindings: | 680 | Key·bindings: |
681 | </p> | 681 | </p> |
682 | <pre·class="example"·id="org | 682 | <pre·class="example"·id="org463bf61"> |
683 | Key·············Binding | 683 | Key·············Binding |
684 | ------------------------------------------------------------------------------- | 684 | ------------------------------------------------------------------------------- |
685 | C-c·&·C-n» yas-new-snippet | 685 | C-c·&·C-n» yas-new-snippet |
686 | C-c·&·C-s» yas-insert-snippet | 686 | C-c·&·C-s» yas-insert-snippet |
687 | C-c·&·C-v» yas-visit-snippet-file | 687 | C-c·&·C-v» yas-visit-snippet-file |
688 | </pre> | 688 | </pre> |
Offset 744, 17 lines modified | Offset 744, 17 lines modified | ||
744 | <p> | 744 | <p> |
745 | Optional·argument·<code>field</code>·is·for·non-interactive·use·and·is·an | 745 | Optional·argument·<code>field</code>·is·for·non-interactive·use·and·is·an |
746 | object·satisfying·<code>yas--field-p</code>·to·restrict·the·expansion·to. | 746 | object·satisfying·<code>yas--field-p</code>·to·restrict·the·expansion·to. |
747 | </p> | 747 | </p> |
748 | </div> | 748 | </div> |
749 | </div> | 749 | </div> |
750 | </div> | 750 | </div> |
751 | <div·id="outline-container-org | 751 | <div·id="outline-container-org1c7305c"·class="outline-2"> |
752 | <h2·id="org | 752 | <h2·id="org1c7305c">Customization·variables</h2> |
753 | <div·class="outline-text-2"·id="text-org | 753 | <div·class="outline-text-2"·id="text-org1c7305c"> |
754 | </div> | 754 | </div> |
755 | <div·id="outline-container-yas-choose-tables-first"·class="outline-3"> | 755 | <div·id="outline-container-yas-choose-tables-first"·class="outline-3"> |
756 | <h3·id="yas-choose-tables-first"><code·class='variable'>yas-choose-tables-first</code></h3> | 756 | <h3·id="yas-choose-tables-first"><code·class='variable'>yas-choose-tables-first</code></h3> |
757 | <div·class="outline-text-3"·id="text-yas-choose-tables-first"> | 757 | <div·class="outline-text-3"·id="text-yas-choose-tables-first"> |
758 | <p> | 758 | <p> |
759 | If·non-nil,·and·multiple·eligible·snippet·tables,·prompts·user·for·tables·first. | 759 | If·non-nil,·and·multiple·eligible·snippet·tables,·prompts·user·for·tables·first. |
760 | </p> | 760 | </p> |
Offset 1155, 17 lines modified | Offset 1155, 17 lines modified | ||
1155 | <p> | 1155 | <p> |
1156 | This·affects·<a·href="#yas-insert-snippet"><code>yas-insert-snippet</code></a>·and·<a·href="#yas-visit-snippet-file"><code>yas-visit-snippet-file</code></a>. | 1156 | This·affects·<a·href="#yas-insert-snippet"><code>yas-insert-snippet</code></a>·and·<a·href="#yas-visit-snippet-file"><code>yas-visit-snippet-file</code></a>. |
1157 | </p> | 1157 | </p> |
1158 | </div> | 1158 | </div> |
1159 | </div> | 1159 | </div> |
1160 | </div> | 1160 | </div> |
1161 | <div·id="outline-container-org | 1161 | <div·id="outline-container-org48e3a79"·class="outline-2"> |
1162 | <h2·id="org | 1162 | <h2·id="org48e3a79">Useful·functions</h2> |
1163 | <div·class="outline-text-2"·id="text-org | 1163 | <div·class="outline-text-2"·id="text-org48e3a79"> |
1164 | </div> | 1164 | </div> |
Max diff block lines reached; 1168/9364 bytes (12.47%) of diff not shown. |