| Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
| 1 | · | 1 | ·bd438b36124687afa43be16d5e6e92d2·534232·editors·optional·elpa-yasnippet_0.14.3-1_all.deb |
| 2 | ·355fc3581c71fb1d293981e96e0261fa·3928·editors·optional·yasnippet_0.14.3-1_all.deb | 2 | ·355fc3581c71fb1d293981e96e0261fa·3928·editors·optional·yasnippet_0.14.3-1_all.deb |
| Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
| 1 | -rw-r--r--···0········0········0········4·2025-06-04·08:35:14.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-06-04·08:35:14.000000·debian-binary |
| 2 | -rw-r--r--···0········0········0·····2000·2025-06-04·08:35:14.000000·control.tar.xz | 2 | -rw-r--r--···0········0········0·····2000·2025-06-04·08:35:14.000000·control.tar.xz |
| 3 | -rw-r--r--···0········0········0···5320 | 3 | -rw-r--r--···0········0········0···532040·2025-06-04·08:35:14.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="#orgb | 221 | <li><a·href="#orgb3e73e5">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="#orga5e1611">Why·aren't·my·snippet·abbrev·keys·triggering·when·I·want·them·too?</a></li> |
| 223 | <li><a·href="#org | 223 | <li><a·href="#org22554de">Why·is·there·an·extra·newline?</a></li> |
| 224 | <li><a·href="#org | 224 | <li><a·href="#org423d653">Why·doesn't·TAB·navigation·work·with·flyspell</a></li> |
| 225 | <li><a·href="#org | 225 | <li><a·href="#org1257bc3">How·do·I·use·alternative·keys,·i.e.·not·TAB?</a></li> |
| 226 | <li><a·href="#org | 226 | <li><a·href="#orgfcbb2be">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-orgb | 236 | <div·id="outline-container-orgb3e73e5"·class="outline-2"> |
| 237 | <h2·id="orgb | 237 | <h2·id="orgb3e73e5">Why·are·my·snippet·abbrev·keys·triggering·when·I·don't·want·them·too?</h2> |
| 238 | <div·class="outline-text-2"·id="text-orgb | 238 | <div·class="outline-text-2"·id="text-orgb3e73e5"> |
| 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-orga5e1611"·class="outline-2"> |
| 249 | <h2·id="org | 249 | <h2·id="orga5e1611">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-orga5e1611"> |
| 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-org22554de"·class="outline-2"> |
| 257 | <h2·id="org | 257 | <h2·id="org22554de">Why·is·there·an·extra·newline?</h2> |
| 258 | <div·class="outline-text-2"·id="text-org | 258 | <div·class="outline-text-2"·id="text-org22554de"> |
| 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-org423d653"·class="outline-2"> |
| 273 | <h2·id="org | 273 | <h2·id="org423d653">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-org423d653"> |
| 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-org1257bc3"·class="outline-2"> |
| 292 | <h2·id="org | 292 | <h2·id="org1257bc3">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-org1257bc3"> |
| 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-orgfcbb2be"·class="outline-2"> |
| 319 | <h2·id="org | 319 | <h2·id="orgfcbb2be">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-orgfcbb2be"> |
| 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="#org94fd3c4">Snippet·development</a> |
| 222 | <ul> | 222 | <ul> |
| 223 | <li><a·href="#org | 223 | <li><a·href="#org3ae439d">Quickly·finding·snippets</a></li> |
| 224 | <li><a·href="#org | 224 | <li><a·href="#orgc61ab77">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="#orgc91e8cd">File·content</a> |
| 228 | <ul> | 228 | <ul> |
| 229 | <li><a·href="#org | 229 | <li><a·href="#org6232727"><code>#·key:</code>·snippet·abbrev</a></li> |
| 230 | <li><a·href="#org2 | 230 | <li><a·href="#org62e5a31"><code>#·name:</code>·snippet·name</a></li> |
| 231 | <li><a·href="#org | 231 | <li><a·href="#orgcb0ce55"><code>#·condition:</code>·snippet·condition</a></li> |
| 232 | <li><a·href="#org | 232 | <li><a·href="#orgf117187"><code>#·group:</code>·snippet·menu·grouping</a></li> |
| 233 | <li><a·href="#org | 233 | <li><a·href="#org5b7351c"><code>#·expand-env:</code>·expand·environment</a></li> |
| 234 | <li><a·href="#org | 234 | <li><a·href="#org4c61eec"><code>#·binding:</code>·direct·keybinding</a></li> |
| 235 | <li><a·href="#org | 235 | <li><a·href="#org1cd0481"><code>#·type:</code>·<code>snippet</code>·or·<code>command</code></a></li> |
| 236 | <li><a·href="#org | 236 | <li><a·href="#org8efd88c"><code>#·uuid:</code>·unique·identifier</a></li> |
| 237 | <li><a·href="#org | 237 | <li><a·href="#orgf215bcd"><code>#·contributor:</code>·snippet·author</a></li> |
| 238 | </ul> | 238 | </ul> |
| 239 | </li> | 239 | </li> |
| 240 | <li><a·href="#org | 240 | <li><a·href="#org14199dd">Template·Syntax</a> |
| 241 | <ul> | 241 | <ul> |
| 242 | <li><a·href="#org | 242 | <li><a·href="#org2445c88">Plain·Text</a></li> |
| 243 | <li><a·href="#org | 243 | <li><a·href="#org94af4b5">Embedded·Emacs·Lisp·code</a> |
| 244 | <ul> | 244 | <ul> |
| 245 | <li><a·href="#org | 245 | <li><a·href="#org55dc99d">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="#orgf9b5897">Tab·stop·fields</a></li> |
| 249 | <li><a·href="#org | 249 | <li><a·href="#org6a20e9c">Placeholder·fields</a></li> |
| 250 | <li><a·href="#org | 250 | <li><a·href="#org4a0acc1">Mirrors·</a></li> |
| 251 | <li><a·href="#org | 251 | <li><a·href="#org47e8251">Mirrors·with·transformations·</a></li> |
| 252 | <li><a·href="#org | 252 | <li><a·href="#orge84b05f">Fields·with·transformations</a></li> |
| 253 | <li><a·href="#org | 253 | <li><a·href="#org2359e96">Choosing·fields·value·from·a·list·and·other·tricks</a></li> |
| 254 | <li><a·href="#org | 254 | <li><a·href="#orgd4b49f1">Nested·placeholder·fields</a></li> |
| 255 | <li><a·href="#org | 255 | <li><a·href="#orgdfc5219">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-org94fd3c4"·class="outline-2"> |
| 262 | <h2·id="org | 262 | <h2·id="org94fd3c4">Snippet·development</h2> |
| 263 | <div·class="outline-text-2"·id="text-org | 263 | <div·class="outline-text-2"·id="text-org94fd3c4"> |
| 264 | </div> | 264 | </div> |
| 265 | <div·id="outline-container-org | 265 | <div·id="outline-container-org3ae439d"·class="outline-3"> |
| 266 | <h3·id="org | 266 | <h3·id="org3ae439d">Quickly·finding·snippets</h3> |
| 267 | <div·class="outline-text-3"·id="text-org | 267 | <div·class="outline-text-3"·id="text-org3ae439d"> |
| 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="#org677cca2">below</a>).··When·you·are·done·editing |
| 278 | the·new·snippet,·use·<a·href="#org | 278 | the·new·snippet,·use·<a·href="#orgdacc04b"><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="#org677cca2">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-orgc61ab77"·class="outline-3"> |
| 296 | <h3·id="org | 296 | <h3·id="orgc61ab77">Using·the·<code>snippet-mode</code>·major·mode·<a·id="org677cca2"></a></h3> |
| 297 | <div·class="outline-text-3"·id="text-org | 297 | <div·class="outline-text-3"·id="text-orgc61ab77"> |
| 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="orgdacc04b"></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-orgc91e8cd"·class="outline-2"> |
| 355 | <h2·id="org | 355 | <h2·id="orgc91e8cd">File·content</h2> |
| 356 | <div·class="outline-text-2"·id="text-org | 356 | <div·class="outline-text-2"·id="text-orgc91e8cd"> |
| 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="#orgcb9680a">Triggering·expansion</a> |
| 222 | <ul> | 222 | <ul> |
| 223 | <li><a·href="#org | 223 | <li><a·href="#orgb3a4e16">Trigger·key</a> |
| 224 | <ul> | 224 | <ul> |
| 225 | <li><a·href="#org | 225 | <li><a·href="#orge4f5a09">Fallback·behaviour</a></li> |
| 226 | </ul> | 226 | </ul> |
| 227 | </li> | 227 | </li> |
| 228 | <li><a·href="#org | 228 | <li><a·href="#orge9651f0">Insert·at·point</a> |
| 229 | <ul> | 229 | <ul> |
| 230 | <li><a·href="#org | 230 | <li><a·href="#org60787be">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="#orgbbd9b19">Snippet·keybinding</a></li> |
| 234 | <li><a·href="#org | 234 | <li><a·href="#org7244124">Expanding·from·the·menu</a></li> |
| 235 | <li><a·href="#org | 235 | <li><a·href="#org465e8e9">Expanding·with·<code>hippie-expand</code></a></li> |
| 236 | <li><a·href="#org | 236 | <li><a·href="#org059dd67">Expanding·from·emacs-lisp·code</a></li> |
| 237 | </ul> | 237 | </ul> |
| 238 | </li> | 238 | </li> |
| 239 | <li><a·href="#org | 239 | <li><a·href="#orgce28e9d">Controlling·expansion</a> |
| 240 | <ul> | 240 | <ul> |
| 241 | <li><a·href="#org | 241 | <li><a·href="#orgedff165">Eligible·snippets</a></li> |
| 242 | <li><a·href="#org4 | 242 | <li><a·href="#org40ee5f8">The·condition·system·</a></li> |
| 243 | <li><a·href="#org | 243 | <li><a·href="#org49d92b5">Multiples·snippet·with·the·same·key</a> |
| 244 | <ul> | 244 | <ul> |
| 245 | <li><a·href="#org0 | 245 | <li><a·href="#org0b671bb">Use·the·X·window·system</a></li> |
| 246 | <li><a·href="#org | 246 | <li><a·href="#orgd351e13">Minibuffer·prompting</a></li> |
| 247 | <li><a·href="#org | 247 | <li><a·href="#orgc6d8cf0">Use·<code>dropdown-menu.el</code></a></li> |
| 248 | <li><a·href="#org | 248 | <li><a·href="#org4401e6e">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-orgcb9680a"·class="outline-2"> |
| 264 | <h2·id="org | 264 | <h2·id="orgcb9680a">Triggering·expansion</h2> |
| 265 | <div·class="outline-text-2"·id="text-org | 265 | <div·class="outline-text-2"·id="text-orgcb9680a"> |
| 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-orgb3a4e16"·class="outline-3"> |
| 292 | <h3·id="org | 292 | <h3·id="orgb3a4e16">Trigger·key</h3> |
| 293 | <div·class="outline-text-3"·id="text-org | 293 | <div·class="outline-text-3"·id="text-orgb3a4e16"> |
| 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="org40a47ff"·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-orge4f5a09"·class="outline-4"> |
| 348 | <h4·id="org | 348 | <h4·id="orge4f5a09">Fallback·behaviour</h4> |
| 349 | <div·class="outline-text-4"·id="text-org | 349 | <div·class="outline-text-4"·id="text-orge4f5a09"> |
| 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-orge9651f0"·class="outline-3"> |
| 359 | <h3·id="org | 359 | <h3·id="orge9651f0">Insert·at·point</h3> |
| 360 | <div·class="outline-text-3"·id="text-org | 360 | <div·class="outline-text-3"·id="text-orge9651f0"> |
| 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-org60787be"·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="#org00c003b">Loading·snippets·from·menu</a></li> |
| 222 | <li><a·href="#org | 222 | <li><a·href="#org88a864b">Snippet·menu·behavior</a></li> |
| 223 | <li><a·href="#org | 223 | <li><a·href="#orgd309287">Controlling·indenting</a></li> |
| 224 | <li><a·href="#org | 224 | <li><a·href="#org5adc8ce">Prompting·method</a></li> |
| 225 | <li><a·href="#org | 225 | <li><a·href="#orgb11b993">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="org2e1b9d0"·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-org00c003b"·class="outline-2"> |
| 253 | <h2·id="org | 253 | <h2·id="org00c003b">Loading·snippets·from·menu</h2> |
| 254 | <div·class="outline-text-2"·id="text-org | 254 | <div·class="outline-text-2"·id="text-org00c003b"> |
| 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-org88a864b"·class="outline-2"> |
| 267 | <h2·id="org | 267 | <h2·id="org88a864b">Snippet·menu·behavior</h2> |
| 268 | <div·class="outline-text-2"·id="text-org | 268 | <div·class="outline-text-2"·id="text-org88a864b"> |
| 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-orgd309287"·class="outline-2"> |
| 307 | <h2·id="org | 307 | <h2·id="orgd309287">Controlling·indenting</h2> |
| 308 | <div·class="outline-text-2"·id="text-org | 308 | <div·class="outline-text-2"·id="text-orgd309287"> |
| 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-org5adc8ce"·class="outline-2"> |
| 317 | <h2·id="org | 317 | <h2·id="org5adc8ce">Prompting·method</h2> |
| 318 | <div·class="outline-text-2"·id="text-org | 318 | <div·class="outline-text-2"·id="text-org5adc8ce"> |
| 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-orgb11b993"·class="outline-2"> |
| 326 | <h2·id="org | 326 | <h2·id="orgb11b993">Misc</h2> |
| 327 | <div·class="outline-text-2"·id="text-org | 327 | <div·class="outline-text-2"·id="text-orgb11b993"> |
| 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="#org6aeae75">Basic·structure</a></li> |
| 222 | <li><a·href="#org | 222 | <li><a·href="#org9e57d8c">Setting·up·<code>yas-snippet-dirs</code></a></li> |
| 223 | <li><a·href="#orge | 223 | <li><a·href="#orge90cb31">The·<code>.yas-parents</code>·file</a></li> |
| 224 | <li><a·href="#org | 224 | <li><a·href="#orgca11a7b"><span·class="todo·TODO">TODO</span>·The·<code>.yas-make-groups</code>·file</a></li> |
| 225 | <li><a·href="#org | 225 | <li><a·href="#org5edbc27">The·<code>.yas-setup.el</code>·file</a></li> |
| 226 | <li><a·href="#org | 226 | <li><a·href="#org71415c8">The·<code>.yas-compiled-snippet.el</code>·file</a></li> |
| 227 | <li><a·href="#org | 227 | <li><a·href="#orgc3b10af">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-org6aeae75"·class="outline-2"> |
| 232 | <h2·id="org | 232 | <h2·id="org6aeae75">Basic·structure</h2> |
| 233 | <div·class="outline-text-2"·id="text-org | 233 | <div·class="outline-text-2"·id="text-org6aeae75"> |
| 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="orgf9deeec"> |
| 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-org9e57d8c"·class="outline-2"> |
| 259 | <h2·id="org | 259 | <h2·id="org9e57d8c">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-org9e57d8c"> |
| 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-orge | 301 | <div·id="outline-container-orge90cb31"·class="outline-2"> |
| 302 | <h2·id="orge | 302 | <h2·id="orge90cb31">The·<code>.yas-parents</code>·file</h2> |
| 303 | <div·class="outline-text-2"·id="text-orge | 303 | <div·class="outline-text-2"·id="text-orge90cb31"> |
| 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="org4fb60de"> |
| 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-orgca11a7b"·class="outline-2"> |
| 330 | <h2·id="org | 330 | <h2·id="orgca11a7b"><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-orgca11a7b"> |
| 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="orgf9d0b92"·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="orgd0fcf38"> |
| 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-org5edbc27"·class="outline-2"> |
| 372 | <h2·id="org | 372 | <h2·id="org5edbc27">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-org5edbc27"> |
| 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="#orgf0fb2b4">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="#org | 255 | <li><a·href="#org4f55d33">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="#orgb540118">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="#orge3f1451">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-orgf0fb2b4"·class="outline-2"> |
| 354 | <h2·id="org | 354 | <h2·id="orgf0fb2b4">Interactive·functions</h2> |
| 355 | <div·class="outline-text-2"·id="text-org | 355 | <div·class="outline-text-2"·id="text-orgf0fb2b4"> |
| 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 509, 15 lines modified | Offset 509, 15 lines modified | ||
| 509 | </p> | 509 | </p> |
| 510 | <p> | 510 | <p> |
| 511 | The·mode's·hook·is·called·both·when·the·mode·is·enabled·and·when·it·is | 511 | The·mode's·hook·is·called·both·when·the·mode·is·enabled·and·when·it·is |
| 512 | disabled. | 512 | disabled. |
| 513 | </p> | 513 | </p> |
| 514 | <pre·class="example"·id="orgde | 514 | <pre·class="example"·id="orgadee654"> |
| 515 | Key·············Binding | 515 | Key·············Binding |
| 516 | ------------------------------------------------------------------------------- | 516 | ------------------------------------------------------------------------------- |
| 517 | C-c·&·C-n» yas-new-snippet | 517 | C-c·&·C-n» yas-new-snippet |
| 518 | C-c·&·C-s» yas-insert-snippet | 518 | C-c·&·C-s» yas-insert-snippet |
| 519 | C-c·&·C-v» yas-visit-snippet-file | 519 | C-c·&·C-v» yas-visit-snippet-file |
| 520 | </pre> | 520 | </pre> |
| Offset 733, 17 lines modified | Offset 733, 17 lines modified | ||
| 733 | <p> | 733 | <p> |
| 734 | Optional·argument·<code>field</code>·is·for·non-interactive·use·and·is·an | 734 | Optional·argument·<code>field</code>·is·for·non-interactive·use·and·is·an |
| 735 | object·satisfying·<code>yas--field-p</code>·to·restrict·the·expansion·to. | 735 | object·satisfying·<code>yas--field-p</code>·to·restrict·the·expansion·to. |
| 736 | </p> | 736 | </p> |
| 737 | </div> | 737 | </div> |
| 738 | </div> | 738 | </div> |
| 739 | </div> | 739 | </div> |
| 740 | <div·id="outline-container-org | 740 | <div·id="outline-container-org4f55d33"·class="outline-2"> |
| 741 | <h2·id="org | 741 | <h2·id="org4f55d33">Customization·variables</h2> |
| 742 | <div·class="outline-text-2"·id="text-org | 742 | <div·class="outline-text-2"·id="text-org4f55d33"> |
| 743 | </div> | 743 | </div> |
| 744 | <div·id="outline-container-yas-buffer-local-condition"·class="outline-3"> | 744 | <div·id="outline-container-yas-buffer-local-condition"·class="outline-3"> |
| 745 | <h3·id="yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></h3> | 745 | <h3·id="yas-buffer-local-condition"><code·class='variable'>yas-buffer-local-condition</code></h3> |
| 746 | <div·class="outline-text-3"·id="text-yas-buffer-local-condition"> | 746 | <div·class="outline-text-3"·id="text-yas-buffer-local-condition"> |
| 747 | <p> | 747 | <p> |
| 748 | Snippet·expanding·condition. | 748 | Snippet·expanding·condition. |
| 749 | </p> | 749 | </p> |
| Offset 1144, 17 lines modified | Offset 1144, 17 lines modified | ||
| 1144 | <div·class="outline-text-3"·id="text-yas-minor-mode-hook"> | 1144 | <div·class="outline-text-3"·id="text-yas-minor-mode-hook"> |
| 1145 | <p> | 1145 | <p> |
| 1146 | Hook·run·when·<a·href="#yas-minor-mode"><code>yas-minor-mode</code></a>·is·turned·on. | 1146 | Hook·run·when·<a·href="#yas-minor-mode"><code>yas-minor-mode</code></a>·is·turned·on. |
| 1147 | </p> | 1147 | </p> |
| 1148 | </div> | 1148 | </div> |
| 1149 | </div> | 1149 | </div> |
| 1150 | </div> | 1150 | </div> |
| 1151 | <div·id="outline-container-org | 1151 | <div·id="outline-container-orgb540118"·class="outline-2"> |
| 1152 | <h2·id="org | 1152 | <h2·id="orgb540118">Useful·functions</h2> |
| 1153 | <div·class="outline-text-2"·id="text-org | 1153 | <div·class="outline-text-2"·id="text-orgb540118"> |
| 1154 | </div> | 1154 | </div> |
| Max diff block lines reached; 1083/9237 bytes (11.72%) of diff not shown. | |||