blob: 84be1b1abfe890e75435e51168a099023902148c (
plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>ctags-lang-iPythonCell — Universal Ctags 0.3.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/classic.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="ctags-lang-julia" href="ctags-lang-julia.7.html" />
<link rel="prev" title="ctags-faq" href="ctags-faq.7.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="ctags-lang-julia.7.html" title="ctags-lang-julia"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="ctags-faq.7.html" title="ctags-faq"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Universal Ctags 0.3.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../man-pages.html" accesskey="U">Man pages</a> »</li>
<li class="nav-item nav-item-this"><a href="">ctags-lang-iPythonCell</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="ctags-lang-ipythoncell">
<span id="ctags-lang-ipythoncell-7"></span><h1>ctags-lang-iPythonCell<a class="headerlink" href="#ctags-lang-ipythoncell" title="Permalink to this headline">¶</a></h1>
<p>The man page of the iPythonCell parser for Universal Ctags</p>
<dl class="field-list simple">
<dt class="field-odd">Version</dt>
<dd class="field-odd"><p>5.9.0</p>
</dd>
<dt class="field-even">Manual group</dt>
<dd class="field-even"><p>Universal Ctags</p>
</dd>
<dt class="field-odd">Manual section</dt>
<dd class="field-odd"><p>7</p>
</dd>
</dl>
<section id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<div class="line-block">
<div class="line"><strong>ctags</strong> … --extras={subparser} --languages=+iPythonCell,Python \</div>
<div class="line-block">
<div class="line">[--extras-IPythonCell=+{doubleSharps}] \</div>
<div class="line">[--regex-IPythonCell=/<PATTERN>/\n/c/] …</div>
</div>
</div>
</section>
<section id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>iPythonCell is a subparser stacked on top of the Python parser.
It works when:</p>
<ul class="simple">
<li><p>The Python parser is enabled,</p></li>
<li><p>the <code class="docutils literal notranslate"><span class="pre">subparser</span></code> extra is enabeld, and</p></li>
<li><p>the iPythonCell parser itself is enabled.</p></li>
</ul>
<p>iPythonCell extracts cells explained as in vim-ipython-cell
(<a class="reference external" href="https://github.com/hanschen/vim-ipython-cell/blob/master/README.md">https://github.com/hanschen/vim-ipython-cell/blob/master/README.md</a>).</p>
</section>
<section id="kind-s">
<h2>KIND(S)<a class="headerlink" href="#kind-s" title="Permalink to this headline">¶</a></h2>
<p>The iPythonCell parser defines only a <code class="docutils literal notranslate"><span class="pre">cell</span></code> kind.</p>
</section>
<section id="extra-s">
<h2>EXTRA(S)<a class="headerlink" href="#extra-s" title="Permalink to this headline">¶</a></h2>
<p>Tagging cells staring with <code class="docutils literal notranslate"><span class="pre">##...</span></code> is disabled by default because
the pattern is too generic; with that pattern unwanted tags can be extracted.</p>
<p>Enable <code class="docutils literal notranslate"><span class="pre">doubleSharps</span></code> language specific extra for tagging cells
staring with <code class="docutils literal notranslate"><span class="pre">##...</span></code>.</p>
</section>
<section id="customizing">
<h2>CUSTOMIZING<a class="headerlink" href="#customizing" title="Permalink to this headline">¶</a></h2>
<p>If your favorite cell pattern is not supported in the parser, you can
define the pattern in your <code class="docutils literal notranslate"><span class="pre">.ctagd.d/your.ctags</span></code> or command lines.
Here is an example how to support “<code class="docutils literal notranslate"><span class="pre">#</span> <span class="pre">CTAGS:</span> <span class="pre">...</span></code>”:</p>
<p>“input.py”</p>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="n">x</span><span class="o">=</span><span class="mi">1</span>
<span class="c1"># CTAGS: DEFINE F</span>
<span class="k">def</span> <span class="nf">F</span><span class="p">():</span>
<span class="c1"># CTAGS: DO NOTING</span>
<span class="k">pass</span>
</pre></div>
</div>
<p>“output.tags”
with “--options=NONE --sort=no --extras=+{subparser} --regex-IPythonCell=/[ t]*# CTAGS:[ ]?(.*)$/1/c/ -o - input.py”</p>
<div class="highlight-tags notranslate"><div class="highlight"><pre><span></span>x input.py /^x=1$/;" v
DEFINE F input.py /^# CTAGS: DEFINE F$/;" c
F input.py /^def F():$/;" f
DO NOTING input.py /^ # CTAGS: DO NOTING$/;" c
</pre></div>
</div>
<p>You can put “<code class="docutils literal notranslate"><span class="pre">--regex-IPythonCell=/[</span> <span class="pre">\t]*#</span> <span class="pre">CTAGS:[</span> <span class="pre">]?(.*)$/\1/c/</span></code>” in <code class="docutils literal notranslate"><span class="pre">your.ctags</span></code>
to avoid specifying the pattern repeatedly.</p>
</section>
<section id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="ctags.1.html#ctags-1"><span class="std std-ref">ctags(1)</span></a>, <a class="reference internal" href="ctags-client-tools.7.html#ctags-client-tools-7"><span class="std std-ref">ctags-client-tools(7)</span></a>, <a class="reference internal" href="ctags-lang-python.7.html#ctags-lang-python-7"><span class="std std-ref">ctags-lang-python(7)</span></a></p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">ctags-lang-iPythonCell</a><ul>
<li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li>
<li><a class="reference internal" href="#description">DESCRIPTION</a></li>
<li><a class="reference internal" href="#kind-s">KIND(S)</a></li>
<li><a class="reference internal" href="#extra-s">EXTRA(S)</a></li>
<li><a class="reference internal" href="#customizing">CUSTOMIZING</a></li>
<li><a class="reference internal" href="#see-also">SEE ALSO</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="ctags-faq.7.html"
title="previous chapter">ctags-faq</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="ctags-lang-julia.7.html"
title="next chapter">ctags-lang-julia</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="ctags-lang-julia.7.html" title="ctags-lang-julia"
>next</a> |</li>
<li class="right" >
<a href="ctags-faq.7.html" title="ctags-faq"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Universal Ctags 0.3.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../man-pages.html" >Man pages</a> »</li>
<li class="nav-item nav-item-this"><a href="">ctags-lang-iPythonCell</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2015, Universal Ctags Team.
Last updated on 11 Jun 2021.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.2.
</div>
</body>
</html>
|