CTAGS-LANG-IPYTHONCELL(7)
π NAME π
ctags-lang-iPythonCell β the man page of the iPythonCell parser for Universal Ctags. Yep bestie, you're reading CTAGS-LANG-IPYTHONCELL(7), section 7, and it's literally all about teaching ctags to see your Jupyter-style cells. π
β¨ SYNOPSIS β¨
ctags ... --extras=+{subparser} --languages=+iPythonCell,Python \
[--extras-IPythonCell=+{doubleSharps}] \
[--regex-IPythonCell=/<PATTERN>/\n/c/] ...
πΈ DESCRIPTION πΈ
The iPythonCell parser is a subparser β like, it doesn't stand on its own, it's stacked on top of the Python parser. Main character supporting role, yk? It only does its thing when all three of these are true:
- the Python parser is enabled,
- the subparser extra is enabled, and
- the iPythonCell parser itself is enabled.
Once that vibe check passes, the iPythonCell parser extracts cells, explained the way vim-ipython-cell explains them (https://github.com/hanschen/vim-ipython-cell/blob/master/README.md). Obsessed. π¦
π KIND(S) π
The iPythonCell parser defines only a cell kind. That's it. One kind. Simple, elegant, no notes. β¨
π EXTRA(S) π
Tagging cells that start with ##... is disabled by default β not because it's bad, but because that pattern is too generic, and with a pattern that loose you can end up extracting unwanted tags. π
So if you want it, enable the doubleSharps language specific extra to tag cells starting with ##.... You opt in, it doesn't opt you in. Periodt.
π§ CUSTOMIZING π§
If your favorite cell pattern isn't supported by the parser, no worries bestie β you can define the pattern yourself in your .ctagd.d/your.ctags or right on the command lines. Here's an example of how to support # CTAGS: ...:
"input.py"
x=1
# CTAGS: DEFINE F
def F():
# CTAGS: DO NOTING
pass
"output.tags" with "--options=NONE --sort=no --extras=+{subparser} --regex-IPythonCell=/[ t]*# CTAGS:[ ]?(.*)$/1/c/ -o - input.py"
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
And if you're tired of typing that pattern over and over (relatable), you can just put "--regex-IPythonCell=/[ \t]*# CTAGS:[ ]?(.*)$/\1/c/" in your.ctags and never think about it again. π
π SEE ALSO π
ctags(1), ctags-client-tools(7), ctags-lang-python(7)
okay that's the whole page, you ate that π«Ά this was CTAGS-LANG-IPYTHONCELL(7) from Universal Ctags, version 6.2.1 β go tag some cells, bestie, you've got this πβ¨
π¦ where this page comes from
- alpine 3.24: ctags-doc 6.2.1-r0 Β· GPL-2.0-or-later
- fedora 43: ctags 6.2.1-1.fc43 Β· GPL-2.0-or-later
- fedora 44: ctags 6.2.1-3.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms