ctags-lang-iPythonCell(7)
π NAME π
ctags-lang-iPythonCell β bestie, this is the man page for the iPythonCell parser in Universal Ctags β¨
π SYNOPSIS π
ctags ... --extras=+{subparser} --languages=+iPythonCell,Python \
[--extras-IPythonCell=+{doubleSharps}] \
[--regex-IPythonCell=/<PATTERN>/\n/c/] ...
π¦ DESCRIPTION π¦
Okay so, the iPythonCell parser is a subparser that's stacked on top of the Python parser. It only does its thing when all three of these are true:
- the Python parser is enabled,
- the
subparserextra is enabled, and - the
iPythonCellparser itself is enabled.
Once it's living its best life, it pulls out cells β exactly the way they're explained over in vim-ipython-cell (<https://github.com/hanschen/vim-ipython-cell/blob/master/README.md>). no cap π
πΈ KIND(S) πΈ
The iPythonCell parser defines only one kind: a cell kind. That's it. That's the whole list. minimal, iconic, periodt π
β¨ EXTRA(S) β¨
Tagging cells that start with ##... is disabled by default, and honestly? For good reason β that pattern is way too generic, and if you turn it on as-is you can end up with a whole mess of unwanted tags. it's giving chaos π
If you want it, enable the doubleSharps language specific extra, and then cells starting with ##... get tagged too π«Ά
π CUSTOMIZING π
Okay so if your fave cell pattern isn't supported out of the box, you can define it yourself β either in your .ctagd.d/your.ctags or right on the command line. Here's a lil 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 pro tip bestie: you can drop --regex-IPythonCell=/[ \t]*# CTAGS:[ ]?(.*)$/\1/c/ straight into your .ctags file so you don't have to keep typing that pattern over and over again. your wrists will thank you π
π SEE ALSO π
Version 6.2.1 of Universal Ctags, mwah π go tag some cells, you absolute icon π§β
π¦ where this page comes from
- ubuntu resolute: universal-ctags 6.2.1-1 Β· GPL-2.0-or-later
- ubuntu stonking: universal-ctags 6.2.1-1 Β· 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