1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>YASnippet menu</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
<body>
<div class="document" id="yasnippet-menu">
<div id="header-region" class="clear-block"></div>
<div id="wrapper">
<div id="container" class="clear-block">
<div id="header">
<div id="logo-floater">
<h1 class="title">YASnippet menu</h1>
</div>
<ul class="primary-links">
<li>
<a title="" href="index.html">Intro and tutorial</a>
</li>
<li>
<a title="" href="snippet-organization.html">Howto: organize</a>
</li>
<li>
<a title="" href="snippet-expansion.html">Howto: expand</a>
</li>
<li>
<a title="" href="snippet-development.html">Howto: write </a>
</li>
<li>
<a title="" href="snippet-menu.html">Howto: menu </a>
</li>
<li>
<a title="" href="faq.html">FAQ</a>
</li>
<li>
<a title="" href="changelog.html">ChangeLog</a>
</li>
<li>
<a title="" href="http://code.google.com/p/yasnippet/downloads/list">Download</a>
</li>
</ul>
</div>
<div id="center">
<div id="squeeze">
<div class="right-corner">
<div class="left-corner">
<p>
<b>Important:</b> This documentation applies to
the <b>SVN trunk</b> of YASnippet, which you
get <a href="http://code.google.com/p/yasnippet/source/checkout">here</a>. Documentation
for other versions can be found <a title=""
href="http://code.google.com/p/yasnippet/downloads/list">here</a>.
</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#loading-snippets-from-menu" id="id1">Loading snippets from menu</a></li>
<li><a class="reference internal" href="#snippet-menu-behavior" id="id2">Snippet menu behavior</a></li>
<li><a class="reference internal" href="#controlling-indenting" id="id3">Controlling indenting</a></li>
<li><a class="reference internal" href="#prompting-method" id="id4">Prompting method</a></li>
<li><a class="reference internal" href="#misc" id="id5">Misc</a></li>
</ul>
</div>
<p>When <tt class="docutils literal"><span class="pre">yas/minor-mode</span></tt> is active, YASnippet will setup a menu just
after the "Buffers" menu in the menubar.</p>
<p>In this menu, you can find</p>
<ul class="simple">
<li>The currently loaded snippet definitions, organized by major mode,
and optional grouping.</li>
<li>A rundown of the most common commands, (followed by their
keybindings) including commands to load directories and reload all
snippet definitions.</li>
<li>A series of submenus for customizing and exploring YASnippet
behavior.</li>
</ul>
<img align="right" alt="images/menu-1.png" class="align-right" src="images/menu-1.png" />
<div class="section" id="loading-snippets-from-menu">
<h1><a class="toc-backref" href="#id1">Loading snippets from menu</a></h1>
<p>Invoking "Load snippets..." from the menu invokes
<tt class="docutils literal"><span class="pre">yas/load-directory</span></tt> and prompts you for a snippet directory
hierarchy to load.</p>
<p>Also useful is the "Reload all" options which uncondionally reloads
all the snippets directories defined in <tt class="docutils literal"><span class="pre">yas/root-directory</span></tt> and
rebuilds the menus.</p>
</div>
<div class="section" id="snippet-menu-behavior">
<h1><a class="toc-backref" href="#id2">Snippet menu behavior</a></h1>
<p>YASnippet will list in this section all the loaded snippet definitions
organized by snippet table name.</p>
<p>You can use this section to explore currently loaded snippets. If you
click on one of them, the default behavior is to expand it,
unconditionally, inside the current buffer.</p>
<p>You can however, customize variable <tt class="docutils literal"><span class="pre">yas/visit-from-menu</span></tt> to be
<tt class="docutils literal"><span class="pre">t</span></tt> which will take you to the snippet definition file when you
select it from the menu.</p>
<p>If you want the menu show only snippet tables whose name corresponds
to a "real" major mode. You do this by setting <tt class="docutils literal"><span class="pre">yas/use-menu</span></tt> to
<tt class="docutils literal"><span class="pre">'real-modes</span></tt>.</p>
<p>Finally, to have the menu show only the tables for the currently
active mode, set <tt class="docutils literal"><span class="pre">yas/use-menu</span></tt> to <tt class="docutils literal"><span class="pre">abbreviate</span></tt>.</p>
<p>These customizations can also be found in the menu itself, under the
"Snippet menu behavior" submenu.</p>
</div>
<div class="section" id="controlling-indenting">
<h1><a class="toc-backref" href="#id3">Controlling indenting</a></h1>
<p>The "Indenting" submenu contains options to control the values of
<tt class="docutils literal"><span class="pre">yas/indent-line</span></tt> and <tt class="docutils literal"><span class="pre">yas/also-auto-indent-first-line</span></tt>. See
<a class="reference external" href="snippet-development.html">Writing snippets</a> .</p>
</div>
<div class="section" id="prompting-method">
<h1><a class="toc-backref" href="#id4">Prompting method</a></h1>
<p>The "Prompting method" submenu contains options to control the value
of <tt class="docutils literal"><span class="pre">yas/prompt-functions</span></tt>. See <a class="reference external" href="snippet-expansion.html">Expanding snippets</a> .</p>
</div>
<div class="section" id="misc">
<h1><a class="toc-backref" href="#id5">Misc</a></h1>
<p>The "Misc" submenu contains options to control the values of more
variables.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10536822-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</div>
</body>
</html>
|