Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | ·8 | 1 | ·e8de65f82e3598ee832ddabfd4c6a372·534008·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·····20 | 2 | -rw-r--r--···0········0········0·····2020·2025-02-28·12:48:59.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0···5317 | 3 | -rw-r--r--···0········0········0···531796·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="#org88829d8">Why·are·my·snippet·abbrev·keys·triggering·when·I·don't·want·them·too?</a></li> |
222 | <li><a·href="#org4 | 222 | <li><a·href="#org4327f71">Why·aren't·my·snippet·abbrev·keys·triggering·when·I·want·them·too?</a></li> |
223 | <li><a·href="#org | 223 | <li><a·href="#org5c9fd96">Why·is·there·an·extra·newline?</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#org6156eb6">Why·doesn't·TAB·navigation·work·with·flyspell</a></li> |
225 | <li><a·href="#org | 225 | <li><a·href="#org62facf4">How·do·I·use·alternative·keys,·i.e.·not·TAB?</a></li> |
226 | <li><a·href="#org | 226 | <li><a·href="#orgb367ac0">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-org88829d8"·class="outline-2"> |
237 | <h2·id="org | 237 | <h2·id="org88829d8">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-org88829d8"> |
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-org4 | 248 | <div·id="outline-container-org4327f71"·class="outline-2"> |
249 | <h2·id="org4 | 249 | <h2·id="org4327f71">Why·aren't·my·snippet·abbrev·keys·triggering·when·I·want·them·too?</h2> |
250 | <div·class="outline-text-2"·id="text-org4 | 250 | <div·class="outline-text-2"·id="text-org4327f71"> |
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-org | 256 | <div·id="outline-container-org5c9fd96"·class="outline-2"> |
257 | <h2·id="org | 257 | <h2·id="org5c9fd96">Why·is·there·an·extra·newline?</h2> |
258 | <div·class="outline-text-2"·id="text-org | 258 | <div·class="outline-text-2"·id="text-org5c9fd96"> |
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-org6156eb6"·class="outline-2"> |
273 | <h2·id="org | 273 | <h2·id="org6156eb6">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-org6156eb6"> |
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-org62facf4"·class="outline-2"> |
292 | <h2·id="org | 292 | <h2·id="org62facf4">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-org62facf4"> |
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-orgb367ac0"·class="outline-2"> |
319 | <h2·id="org | 319 | <h2·id="orgb367ac0">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-orgb367ac0"> |
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="#orgfa753a4">Snippet·development</a> |
222 | <ul> | 222 | <ul> |
223 | <li><a·href="#org | 223 | <li><a·href="#org912968b">Quickly·finding·snippets</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#orge4d19ff">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="#org2c998a0">File·content</a> |
228 | <ul> | 228 | <ul> |
229 | <li><a·href="#org | 229 | <li><a·href="#orged52126"><code>#·key:</code>·snippet·abbrev</a></li> |
230 | <li><a·href="#org | 230 | <li><a·href="#org0583bef"><code>#·name:</code>·snippet·name</a></li> |
231 | <li><a·href="#org | 231 | <li><a·href="#org28d613f"><code>#·condition:</code>·snippet·condition</a></li> |
232 | <li><a·href="#org | 232 | <li><a·href="#org0245d3b"><code>#·group:</code>·snippet·menu·grouping</a></li> |
233 | <li><a·href="#org | 233 | <li><a·href="#orge86bcab"><code>#·expand-env:</code>·expand·environment</a></li> |
234 | <li><a·href="#org | 234 | <li><a·href="#org1d69d1c"><code>#·binding:</code>·direct·keybinding</a></li> |
235 | <li><a·href="#org | 235 | <li><a·href="#org09bd50a"><code>#·type:</code>·<code>snippet</code>·or·<code>command</code></a></li> |
236 | <li><a·href="#org | 236 | <li><a·href="#org325953f"><code>#·uuid:</code>·unique·identifier</a></li> |
237 | <li><a·href="#org | 237 | <li><a·href="#org8c8d502"><code>#·contributor:</code>·snippet·author</a></li> |
238 | </ul> | 238 | </ul> |
239 | </li> | 239 | </li> |
240 | <li><a·href="#org | 240 | <li><a·href="#orgd91bd26">Template·Syntax</a> |
241 | <ul> | 241 | <ul> |
242 | <li><a·href="#org | 242 | <li><a·href="#orgcf1f497">Plain·Text</a></li> |
243 | <li><a·href="#org | 243 | <li><a·href="#orga3df5d8">Embedded·Emacs·Lisp·code</a> |
244 | <ul> | 244 | <ul> |
245 | <li><a·href="#org | 245 | <li><a·href="#orgd41a60d">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="#org65a4f91">Tab·stop·fields</a></li> |
249 | <li><a·href="#org | 249 | <li><a·href="#org2b14d32">Placeholder·fields</a></li> |
250 | <li><a·href="#org68 | 250 | <li><a·href="#org9f2683e">Mirrors·</a></li> |
251 | <li><a·href="#org | 251 | <li><a·href="#org479de7c">Mirrors·with·transformations·</a></li> |
252 | <li><a·href="#org | 252 | <li><a·href="#org8757eee">Fields·with·transformations</a></li> |
253 | <li><a·href="#org | 253 | <li><a·href="#org0158271">Choosing·fields·value·from·a·list·and·other·tricks</a></li> |
254 | <li><a·href="#org | 254 | <li><a·href="#org76d3f2c">Nested·placeholder·fields</a></li> |
255 | <li><a·href="#org | 255 | <li><a·href="#org45a3591">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-orgfa753a4"·class="outline-2"> |
262 | <h2·id="org | 262 | <h2·id="orgfa753a4">Snippet·development</h2> |
263 | <div·class="outline-text-2"·id="text-org | 263 | <div·class="outline-text-2"·id="text-orgfa753a4"> |
264 | </div> | 264 | </div> |
265 | <div·id="outline-container-org | 265 | <div·id="outline-container-org912968b"·class="outline-3"> |
266 | <h3·id="org | 266 | <h3·id="org912968b">Quickly·finding·snippets</h3> |
267 | <div·class="outline-text-3"·id="text-org | 267 | <div·class="outline-text-3"·id="text-org912968b"> |
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="#org2784593">below</a>).··When·you·are·done·editing |
278 | the·new·snippet,·use·<a·href="#org | 278 | the·new·snippet,·use·<a·href="#org3ca3f5f"><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="#org2784593">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-org | 295 | <div·id="outline-container-orge4d19ff"·class="outline-3"> |
296 | <h3·id="org | 296 | <h3·id="orge4d19ff">Using·the·<code>snippet-mode</code>·major·mode·<a·id="org2784593"></a></h3> |
297 | <div·class="outline-text-3"·id="text-org | 297 | <div·class="outline-text-3"·id="text-orge4d19ff"> |
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="org3ca3f5f"></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-org2c998a0"·class="outline-2"> |
355 | <h2·id="org | 355 | <h2·id="org2c998a0">File·content</h2> |
356 | <div·class="outline-text-2"·id="text-org | 356 | <div·class="outline-text-2"·id="text-org2c998a0"> |
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="#org21458a2">Triggering·expansion</a> |
222 | <ul> | 222 | <ul> |
223 | <li><a·href="#org | 223 | <li><a·href="#org51da6c4">Trigger·key</a> |
224 | <ul> | 224 | <ul> |
225 | <li><a·href="#org | 225 | <li><a·href="#org9397a06">Fallback·behaviour</a></li> |
226 | </ul> | 226 | </ul> |
227 | </li> | 227 | </li> |
228 | <li><a·href="#org | 228 | <li><a·href="#org35c3a84">Insert·at·point</a> |
229 | <ul> | 229 | <ul> |
230 | <li><a·href="#org | 230 | <li><a·href="#orgff85239">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="#orgad2fac0">Snippet·keybinding</a></li> |
234 | <li><a·href="#org | 234 | <li><a·href="#org4486afc">Expanding·from·the·menu</a></li> |
235 | <li><a·href="#org | 235 | <li><a·href="#orgeebbf45">Expanding·with·<code>hippie-expand</code></a></li> |
236 | <li><a·href="#org | 236 | <li><a·href="#orge1bc1e3">Expanding·from·emacs-lisp·code</a></li> |
237 | </ul> | 237 | </ul> |
238 | </li> | 238 | </li> |
239 | <li><a·href="#org | 239 | <li><a·href="#org7910b2c">Controlling·expansion</a> |
240 | <ul> | 240 | <ul> |
241 | <li><a·href="#org | 241 | <li><a·href="#org07e0b3b">Eligible·snippets</a></li> |
242 | <li><a·href="#org | 242 | <li><a·href="#org06b6f95">The·condition·system·</a></li> |
243 | <li><a·href="#org | 243 | <li><a·href="#org99a5113">Multiples·snippet·with·the·same·key</a> |
244 | <ul> | 244 | <ul> |
245 | <li><a·href="#org | 245 | <li><a·href="#org0073564">Use·the·X·window·system</a></li> |
246 | <li><a·href="#org | 246 | <li><a·href="#org1ffab2d">Minibuffer·prompting</a></li> |
247 | <li><a·href="#org | 247 | <li><a·href="#org881ce83">Use·<code>dropdown-menu.el</code></a></li> |
248 | <li><a·href="#org | 248 | <li><a·href="#orgf747fde">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-org21458a2"·class="outline-2"> |
264 | <h2·id="org | 264 | <h2·id="org21458a2">Triggering·expansion</h2> |
265 | <div·class="outline-text-2"·id="text-org | 265 | <div·class="outline-text-2"·id="text-org21458a2"> |
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-org51da6c4"·class="outline-3"> |
292 | <h3·id="org | 292 | <h3·id="org51da6c4">Trigger·key</h3> |
293 | <div·class="outline-text-3"·id="text-org | 293 | <div·class="outline-text-3"·id="text-org51da6c4"> |
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="orgc | 337 | <div·id="orgc1733bd"·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-org9397a06"·class="outline-4"> |
348 | <h4·id="org | 348 | <h4·id="org9397a06">Fallback·behaviour</h4> |
349 | <div·class="outline-text-4"·id="text-org | 349 | <div·class="outline-text-4"·id="text-org9397a06"> |
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-org35c3a84"·class="outline-3"> |
359 | <h3·id="org | 359 | <h3·id="org35c3a84">Insert·at·point</h3> |
360 | <div·class="outline-text-3"·id="text-org | 360 | <div·class="outline-text-3"·id="text-org35c3a84"> |
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-orgff85239"·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="#orgc28a6b6">Loading·snippets·from·menu</a></li> |
222 | <li><a·href="#org | 222 | <li><a·href="#org1c8f3ad">Snippet·menu·behavior</a></li> |
223 | <li><a·href="#org | 223 | <li><a·href="#org4588d27">Controlling·indenting</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#org878afd4">Prompting·method</a></li> |
225 | <li><a·href="#org | 225 | <li><a·href="#org513f48e">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="orgeb558ab"·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-orgc28a6b6"·class="outline-2"> |
253 | <h2·id="org | 253 | <h2·id="orgc28a6b6">Loading·snippets·from·menu</h2> |
254 | <div·class="outline-text-2"·id="text-org | 254 | <div·class="outline-text-2"·id="text-orgc28a6b6"> |
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-org1c8f3ad"·class="outline-2"> |
267 | <h2·id="org | 267 | <h2·id="org1c8f3ad">Snippet·menu·behavior</h2> |
268 | <div·class="outline-text-2"·id="text-org | 268 | <div·class="outline-text-2"·id="text-org1c8f3ad"> |
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-org4588d27"·class="outline-2"> |
307 | <h2·id="org | 307 | <h2·id="org4588d27">Controlling·indenting</h2> |
308 | <div·class="outline-text-2"·id="text-org | 308 | <div·class="outline-text-2"·id="text-org4588d27"> |
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-org878afd4"·class="outline-2"> |
317 | <h2·id="org | 317 | <h2·id="org878afd4">Prompting·method</h2> |
318 | <div·class="outline-text-2"·id="text-org | 318 | <div·class="outline-text-2"·id="text-org878afd4"> |
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-org | 325 | <div·id="outline-container-org513f48e"·class="outline-2"> |
326 | <h2·id="org | 326 | <h2·id="org513f48e">Misc</h2> |
327 | <div·class="outline-text-2"·id="text-org | 327 | <div·class="outline-text-2"·id="text-org513f48e"> |
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="#org7f612fe">Basic·structure</a></li> |
222 | <li><a·href="#org | 222 | <li><a·href="#org0c6ee2b">Setting·up·<code>yas-snippet-dirs</code></a></li> |
223 | <li><a·href="#org | 223 | <li><a·href="#orgfc9981c">The·<code>.yas-parents</code>·file</a></li> |
224 | <li><a·href="#org | 224 | <li><a·href="#org7a8037c"><span·class="todo·TODO">TODO</span>·The·<code>.yas-make-groups</code>·file</a></li> |
225 | <li><a·href="#org | 225 | <li><a·href="#orgceb9b39">The·<code>.yas-setup.el</code>·file</a></li> |
226 | <li><a·href="#org | 226 | <li><a·href="#org7fe1ef5">The·<code>.yas-compiled-snippet.el</code>·file</a></li> |
227 | <li><a·href="#org | 227 | <li><a·href="#orge7cc56d">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-org7f612fe"·class="outline-2"> |
232 | <h2·id="org | 232 | <h2·id="org7f612fe">Basic·structure</h2> |
233 | <div·class="outline-text-2"·id="text-org | 233 | <div·class="outline-text-2"·id="text-org7f612fe"> |
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="orgd | 239 | <pre·class="example"·id="orgd228bcf"> |
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-org0c6ee2b"·class="outline-2"> |
259 | <h2·id="org | 259 | <h2·id="org0c6ee2b">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-org0c6ee2b"> |
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-orgfc9981c"·class="outline-2"> |
302 | <h2·id="org | 302 | <h2·id="orgfc9981c">The·<code>.yas-parents</code>·file</h2> |
303 | <div·class="outline-text-2"·id="text-org | 303 | <div·class="outline-text-2"·id="text-orgfc9981c"> |
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="orga739624"> |
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-org7a8037c"·class="outline-2"> |
330 | <h2·id="org | 330 | <h2·id="org7a8037c"><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-org7a8037c"> |
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="org6d57ab8"·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="orga625ebd"> |
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-orgceb9b39"·class="outline-2"> |
372 | <h2·id="org | 372 | <h2·id="orgceb9b39">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-orgceb9b39"> |
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="#org64fd631">Interactive·functions</a> |
222 | <ul> | 222 | <ul> |
223 | <li><a·href="#yas-compile-directory"><code·class='function'>yas-compile-directory</code>·(<code>top-level-dir</code>)</a></li> | 223 | <li><a·href="#yas-compile-directory"><code·class='function'>yas-compile-directory</code>·(<code>top-level-dir</code>)</a></li> |
224 | <li><a·href="#yas-global-mode"><code·class='function'>yas-global-mode</code>·(<i>&optional</i>·<code>arg</code>)</a></li> | 224 | <li><a·href="#yas-global-mode"><code·class='function'>yas-global-mode</code>·(<i>&optional</i>·<code>arg</code>)</a></li> |
225 | <li><a·href="#yas-recompile-all"><code·class='function'>yas-recompile-all</code>·()</a></li> | 225 | <li><a·href="#yas-recompile-all"><code·class='function'>yas-recompile-all</code>·()</a></li> |
226 | <li><a·href="#yas-load-snippet-buffer"><code·class='function'>yas-load-snippet-buffer</code>·(<code>table</code>·<i>&optional</i>·<code>interactive</code>)</a></li> | 226 | <li><a·href="#yas-load-snippet-buffer"><code·class='function'>yas-load-snippet-buffer</code>·(<code>table</code>·<i>&optional</i>·<code>interactive</code>)</a></li> |
227 | <li><a·href="#yas-expand-from-trigger-key"><code·class='function'>yas-expand-from-trigger-key</code>·(<i>&optional</i>·<code>field</code>)</a></li> | 227 | <li><a·href="#yas-expand-from-trigger-key"><code·class='function'>yas-expand-from-trigger-key</code>·(<i>&optional</i>·<code>field</code>)</a></li> |
228 | <li><a·href="#yas-visit-snippet-file"><code·class='function'>yas-visit-snippet-file</code>·()</a></li> | 228 | <li><a·href="#yas-visit-snippet-file"><code·class='function'>yas-visit-snippet-file</code>·()</a></li> |
Offset 248, 15 lines modified | Offset 248, 15 lines modified | ||
248 | <li><a·href="#yas-about"><code·class='function'>yas-about</code>·()</a></li> | 248 | <li><a·href="#yas-about"><code·class='function'>yas-about</code>·()</a></li> |
249 | <li><a·href="#yas-skip-and-clear-field"><code·class='function'>yas-skip-and-clear-field</code>·(<i>&optional</i>·<code>field</code>)</a></li> | 249 | <li><a·href="#yas-skip-and-clear-field"><code·class='function'>yas-skip-and-clear-field</code>·(<i>&optional</i>·<code>field</code>)</a></li> |
250 | <li><a·href="#yas-expand-from-keymap"><code·class='function'>yas-expand-from-keymap</code>·()</a></li> | 250 | <li><a·href="#yas-expand-from-keymap"><code·class='function'>yas-expand-from-keymap</code>·()</a></li> |
251 | <li><a·href="#yas-next-field"><code·class='function'>yas-next-field</code>·(<i>&optional</i>·<code>arg</code>)</a></li> | 251 | <li><a·href="#yas-next-field"><code·class='function'>yas-next-field</code>·(<i>&optional</i>·<code>arg</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="#org6 | 255 | <li><a·href="#orge6df528">Customization·variables</a> |
256 | <ul> | 256 | <ul> |
257 | <li><a·href="#yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></a></li> | 257 | <li><a·href="#yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></a></li> |
258 | <li><a·href="#yas-visit-from-menu"><code·class='variable'>yas-visit-from-menu</code></a></li> | 258 | <li><a·href="#yas-visit-from-menu"><code·class='variable'>yas-visit-from-menu</code></a></li> |
259 | <li><a·href="#yas-keymap-disable-hook"><code·class='variable'>yas-keymap-disable-hook</code></a></li> | 259 | <li><a·href="#yas-keymap-disable-hook"><code·class='variable'>yas-keymap-disable-hook</code></a></li> |
260 | <li><a·href="#yas-expand-only-for-last-commands"><code·class='variable'>yas-expand-only-for-last-commands</code></a></li> | 260 | <li><a·href="#yas-expand-only-for-last-commands"><code·class='variable'>yas-expand-only-for-last-commands</code></a></li> |
261 | <li><a·href="#yas-use-menu"><code·class='variable'>yas-use-menu</code></a></li> | 261 | <li><a·href="#yas-use-menu"><code·class='variable'>yas-use-menu</code></a></li> |
262 | <li><a·href="#yas-also-auto-indent-first-line"><code·class='variable'>yas-also-auto-indent-first-line</code></a></li> | 262 | <li><a·href="#yas-also-auto-indent-first-line"><code·class='variable'>yas-also-auto-indent-first-line</code></a></li> |
Offset 275, 15 lines modified | Offset 275, 15 lines modified | ||
275 | <li><a·href="#yas-overlay-priority"><code·class='variable'>yas-overlay-priority</code></a></li> | 275 | <li><a·href="#yas-overlay-priority"><code·class='variable'>yas-overlay-priority</code></a></li> |
276 | <li><a·href="#yas-good-grace"><code·class='variable'>yas-good-grace</code></a></li> | 276 | <li><a·href="#yas-good-grace"><code·class='variable'>yas-good-grace</code></a></li> |
277 | <li><a·href="#yas-trigger-symbol"><code·class='variable'>yas-trigger-symbol</code></a></li> | 277 | <li><a·href="#yas-trigger-symbol"><code·class='variable'>yas-trigger-symbol</code></a></li> |
278 | <li><a·href="#yas-inhibit-overlay-modification-protection"><code·class='variable'>yas-inhibit-overlay-modification-protection</code></a></li> | 278 | <li><a·href="#yas-inhibit-overlay-modification-protection"><code·class='variable'>yas-inhibit-overlay-modification-protection</code></a></li> |
279 | <li><a·href="#yas-minor-mode-hook"><code·class='variable'>yas-minor-mode-hook</code></a></li> | 279 | <li><a·href="#yas-minor-mode-hook"><code·class='variable'>yas-minor-mode-hook</code></a></li> |
280 | </ul> | 280 | </ul> |
281 | </li> | 281 | </li> |
282 | <li><a·href="#org | 282 | <li><a·href="#org562d1cb">Useful·functions</a> |
283 | <ul> | 283 | <ul> |
284 | <li><a·href="#yas-temp-buffer-p"><code·class='function'>yas-temp-buffer-p</code>·(<i>&optional</i>·<code>buffer</code>)</a></li> | 284 | <li><a·href="#yas-temp-buffer-p"><code·class='function'>yas-temp-buffer-p</code>·(<i>&optional</i>·<code>buffer</code>)</a></li> |
285 | <li><a·href="#yas-try-key-from-whitespace"><code·class='function'>yas-try-key-from-whitespace</code>·(<code>_start-point</code>)</a></li> | 285 | <li><a·href="#yas-try-key-from-whitespace"><code·class='function'>yas-try-key-from-whitespace</code>·(<code>_start-point</code>)</a></li> |
286 | <li><a·href="#yas-choose-value"><code·class='function'>yas-choose-value</code>·(<i>&rest</i>·<code>possibilities</code>)</a></li> | 286 | <li><a·href="#yas-choose-value"><code·class='function'>yas-choose-value</code>·(<i>&rest</i>·<code>possibilities</code>)</a></li> |
287 | <li><a·href="#yas-auto-next"><code·class='function'>yas-auto-next</code>·(<i>&rest</i>·<code>body</code>)</a></li> | 287 | <li><a·href="#yas-auto-next"><code·class='function'>yas-auto-next</code>·(<i>&rest</i>·<code>body</code>)</a></li> |
288 | <li><a·href="#yas-current-field"><code·class='function'>yas-current-field</code>·()</a></li> | 288 | <li><a·href="#yas-current-field"><code·class='function'>yas-current-field</code>·()</a></li> |
289 | <li><a·href="#yas-unimplemented"><code·class='function'>yas-unimplemented</code>·(<i>&optional</i>·<code>missing-feature</code>)</a></li> | 289 | <li><a·href="#yas-unimplemented"><code·class='function'>yas-unimplemented</code>·(<i>&optional</i>·<code>missing-feature</code>)</a></li> |
Offset 319, 15 lines modified | Offset 319, 15 lines modified | ||
319 | <li><a·href="#yas-completing-prompt"><code·class='function'>yas-completing-prompt</code>·(<code>prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>·<code>completion-fn</code>)</a></li> | 319 | <li><a·href="#yas-completing-prompt"><code·class='function'>yas-completing-prompt</code>·(<code>prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>·<code>completion-fn</code>)</a></li> |
320 | <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-dropdown-prompt"><code·class='function'>yas-dropdown-prompt</code>·(<code>_prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>)</a></li> |
321 | <li><a·href="#yas-x-prompt"><code·class='function'>yas-x-prompt</code>·(<code>prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>)</a></li> | 321 | <li><a·href="#yas-x-prompt"><code·class='function'>yas-x-prompt</code>·(<code>prompt</code>·<code>choices</code>·<i>&optional</i>·<code>display-fn</code>)</a></li> |
322 | <li><a·href="#yas-field-value"><code·class='function'>yas-field-value</code>·(<code>number</code>)</a></li> | 322 | <li><a·href="#yas-field-value"><code·class='function'>yas-field-value</code>·(<code>number</code>)</a></li> |
323 | <li><a·href="#yas-default-from-field"><code·class='function'>yas-default-from-field</code>·(<code>number</code>)</a></li> | 323 | <li><a·href="#yas-default-from-field"><code·class='function'>yas-default-from-field</code>·(<code>number</code>)</a></li> |
324 | </ul> | 324 | </ul> |
325 | </li> | 325 | </li> |
326 | <li><a·href="#org | 326 | <li><a·href="#org3e7463d">Useful·variables</a> |
327 | <ul> | 327 | <ul> |
328 | <li><a·href="#yas-maybe-expand"><code·class='variable'>yas-maybe-expand</code></a></li> | 328 | <li><a·href="#yas-maybe-expand"><code·class='variable'>yas-maybe-expand</code></a></li> |
329 | <li><a·href="#yas-after-reload-hook"><code·class='variable'>yas-after-reload-hook</code></a></li> | 329 | <li><a·href="#yas-after-reload-hook"><code·class='variable'>yas-after-reload-hook</code></a></li> |
330 | <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-maybe-skip-and-clear-field"><code·class='variable'>yas-maybe-skip-and-clear-field</code></a></li> |
331 | <li><a·href="#yas-key-syntaxes"><code·class='variable'>yas-key-syntaxes</code></a></li> | 331 | <li><a·href="#yas-key-syntaxes"><code·class='variable'>yas-key-syntaxes</code></a></li> |
332 | <li><a·href="#yas-moving-away-p"><code·class='variable'>yas-moving-away-p</code></a></li> | 332 | <li><a·href="#yas-moving-away-p"><code·class='variable'>yas-moving-away-p</code></a></li> |
333 | <li><a·href="#yas-minor-mode-map"><code·class='variable'>yas-minor-mode-map</code></a></li> | 333 | <li><a·href="#yas-minor-mode-map"><code·class='variable'>yas-minor-mode-map</code></a></li> |
Offset 346, 17 lines modified | Offset 346, 17 lines modified | ||
346 | <li><a·href="#yas-new-snippet-buffer-name"><code·class='variable'>yas-new-snippet-buffer-name</code></a></li> | 346 | <li><a·href="#yas-new-snippet-buffer-name"><code·class='variable'>yas-new-snippet-buffer-name</code></a></li> |
347 | <li><a·href="#yas-modified-p"><code·class='variable'>yas-modified-p</code></a></li> | 347 | <li><a·href="#yas-modified-p"><code·class='variable'>yas-modified-p</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-org64fd631"·class="outline-2"> |
354 | <h2·id="org | 354 | <h2·id="org64fd631">Interactive·functions</h2> |
355 | <div·class="outline-text-2"·id="text-org | 355 | <div·class="outline-text-2"·id="text-org64fd631"> |
356 | </div> | 356 | </div> |
357 | <div·id="outline-container-yas-compile-directory"·class="outline-3"> | 357 | <div·id="outline-container-yas-compile-directory"·class="outline-3"> |
358 | <h3·id="yas-compile-directory"><code·class='function'>yas-compile-directory</code>·(<code>top-level-dir</code>)</h3> | 358 | <h3·id="yas-compile-directory"><code·class='function'>yas-compile-directory</code>·(<code>top-level-dir</code>)</h3> |
359 | <div·class="outline-text-3"·id="text-yas-compile-directory"> | 359 | <div·class="outline-text-3"·id="text-yas-compile-directory"> |
360 | <p> | 360 | <p> |
361 | Create·.yas-compiled-snippets.el·files·under·subdirs·of·<code>top-level-dir</code>. | 361 | Create·.yas-compiled-snippets.el·files·under·subdirs·of·<code>top-level-dir</code>. |
362 | </p> | 362 | </p> |
Offset 497, 15 lines modified | Offset 497, 15 lines modified | ||
497 | positive·prefix·argument·turns·on·the·mode. | 497 | positive·prefix·argument·turns·on·the·mode. |
498 | Negative·prefix·argument·turns·off·the·mode. | 498 | Negative·prefix·argument·turns·off·the·mode. |
499 | </p> | 499 | </p> |
500 | <p> | 500 | <p> |
501 | Key·bindings: | 501 | Key·bindings: |
502 | </p> | 502 | </p> |
503 | <pre·class="example"·id="org | 503 | <pre·class="example"·id="org1b48ff6"> |
504 | Key·············Binding | 504 | Key·············Binding |
505 | ------------------------------------------------------------------------------- | 505 | ------------------------------------------------------------------------------- |
506 | C-c·&·C-n» yas-new-snippet | 506 | C-c·&·C-n» yas-new-snippet |
507 | C-c·&·C-s» yas-insert-snippet | 507 | C-c·&·C-s» yas-insert-snippet |
508 | C-c·&·C-v» yas-visit-snippet-file | 508 | C-c·&·C-v» yas-visit-snippet-file |
509 | </pre> | 509 | </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-org6 | 751 | <div·id="outline-container-orge6df528"·class="outline-2"> |
752 | <h2·id="org6 | 752 | <h2·id="orge6df528">Customization·variables</h2> |
753 | <div·class="outline-text-2"·id="text-org6 | 753 | <div·class="outline-text-2"·id="text-orge6df528"> |
754 | </div> | 754 | </div> |
755 | <div·id="outline-container-yas-buffer-local-condition"·class="outline-3"> | 755 | <div·id="outline-container-yas-buffer-local-condition"·class="outline-3"> |
756 | <h3·id="yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></h3> | 756 | <h3·id="yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></h3> |
757 | <div·class="outline-text-3"·id="text-yas-buffer-local-condition"> | 757 | <div·class="outline-text-3"·id="text-yas-buffer-local-condition"> |
758 | <p> | 758 | <p> |
759 | Snippet·expanding·condition. | 759 | Snippet·expanding·condition. |
760 | </p> | 760 | </p> |
Offset 1155, 17 lines modified | Offset 1155, 17 lines modified | ||
1155 | <div·class="outline-text-3"·id="text-yas-minor-mode-hook"> | 1155 | <div·class="outline-text-3"·id="text-yas-minor-mode-hook"> |
1156 | <p> | 1156 | <p> |
1157 | Hook·run·when·<a·href="#yas-minor-mode"><code>yas-minor-mode</code></a>·is·turned·on. | 1157 | Hook·run·when·<a·href="#yas-minor-mode"><code>yas-minor-mode</code></a>·is·turned·on. |
1158 | </p> | 1158 | </p> |
1159 | </div> | 1159 | </div> |
1160 | </div> | 1160 | </div> |
1161 | </div> | 1161 | </div> |
1162 | <div·id="outline-container-org | 1162 | <div·id="outline-container-org562d1cb"·class="outline-2"> |
1163 | <h2·id="org | 1163 | <h2·id="org562d1cb">Useful·functions</h2> |
1164 | <div·class="outline-text-2"·id="text-org | 1164 | <div·class="outline-text-2"·id="text-org562d1cb"> |
1165 | </div> | 1165 | </div> |
Max diff block lines reached; 1083/9258 bytes (11.70%) of diff not shown. |