xref: /Universal-ctags/man/ctags-lang-iPythonCell.7.rst.in (revision e59379f6b8637683f232ef9c0f062fc4c671a87b)
1.. _ctags-lang-iPythonCell(7):
2
3==============================================================
4ctags-lang-iPythonCell
5==============================================================
6-------------------------------------------------------------------
7The man page of the iPythonCell parser for Universal Ctags
8-------------------------------------------------------------------
9:Version: @VERSION@
10:Manual group: Universal Ctags
11:Manual section: 7
12
13SYNOPSIS
14--------
15|	**@CTAGS_NAME_EXECUTABLE@** ... --extras=+{subparser} --languages=+iPythonCell,Python \\
16|                     [--extras-IPythonCell=+{doubleSharps}] \\
17|                     [--regex-IPythonCell=/<PATTERN>/\\n/c/] ...
18
19DESCRIPTION
20-----------
21iPythonCell parser is a subparser stacked on top of the Python parser.
22It works when:
23
24* the Python parser is enabled,
25* the ``subparser`` extra is enabled, and
26* the iPythonCell parser itself is enabled.
27
28The iPythonCell parser extracts cells explained as in vim-ipython-cell
29(https://github.com/hanschen/vim-ipython-cell/blob/master/README.md).
30
31KIND(S)
32-------
33The iPythonCell parser defines only a ``cell`` kind.
34
35EXTRA(S)
36--------
37
38Tagging cells staring with ``##...`` is disabled by default because
39the pattern is too generic; with that pattern unwanted tags can be extracted.
40
41Enable ``doubleSharps`` language specific extra for tagging cells
42staring with ``##...``.
43
44CUSTOMIZING
45-----------
46If your favorite cell pattern is not supported in the parser, you can
47define the pattern in your ``.ctagd.d/your.ctags`` or command lines.
48Here is an example how to support "``# CTAGS: ...``":
49
50"input.py"
51
52.. code-block:: Python
53
54	x=1
55	# CTAGS: DEFINE F
56	def F():
57		# CTAGS: DO NOTING
58		pass
59
60"output.tags"
61with "--options=NONE --sort=no --extras=+{subparser} --regex-IPythonCell=/[ \t]*# CTAGS:[ ]?(.*)$/\1/c/ -o - input.py"
62
63.. code-block:: tags
64
65   x	input.py	/^x=1$/;"	v
66   DEFINE F	input.py	/^# CTAGS: DEFINE F$/;"	c
67   F	input.py	/^def F():$/;"	f
68   DO NOTING	input.py	/^	# CTAGS: DO NOTING$/;"	c
69
70You can put "``--regex-IPythonCell=/[ \t]*# CTAGS:[ ]?(.*)$/\1/c/``" in ``your.ctags``
71to avoid specifying the pattern repeatedly.
72
73SEE ALSO
74--------
75ctags(1), ctags-client-tools(7), ctags-lang-python(7)
76