Is there a good `.ctags` content with `--regex-php` that recognizes enums and their cases? It's not included in the latest universal ctags 6.2, and my regex tests have all failed so far. Perhaps someone else has had more success with this.

My current test `.ctags` looks like this (it's obviously wrong haha):

```
--regex-php=/enum[[:space:]]+([a-zA-Z_][a-zA-Z0-9_]*)[[:space:]]*/\1/e,enum/
--regex-php=/case[[:space:]]+([a-zA-Z_][a-zA-Z0-9_]*)[[:space:]]*;/\1/case/
```

And it should find enums with the following structure:

```php
enum Foo
{
case A;
case B;
}
```

And of course also backed enums:

```php
enum Foo: string
{
case A = 'a';
case B = 'b';
}
```

#ctags #uctags #UniversalCtags #php

Splitting the tag files into project and vendor ones and including both as tag files increased performance enormously!

The amount of data is the same, but it's somehow ten times faster. Before, it took about ten to fifteen seconds to `tselect` something; now, it takes less than one second.

```vim
set tags=./tags;,./vendor.tags;
```

#vim #ctags #UniversalCtags #php

Is the Vim (9.1) tag search slow for you too? This only happens with huge projects that have many PHP vendor dependencies, which can occur quickly with PHP. How do you handle it? Does Vim understand multiple tag files? Can it be multi-threaded somehow?

#vim #vim9 #ctag #ctags #UniversalCtags #PHP

Has anyone had good experiences with (universal) ctags for PHP? Looking for a solid, non-plugin, vim-native LS alternative for vim (9.1).

I tried `ctags -R --language-force=PHP --php-kinds=+c-f --fields=+n` as well as setting tags `set tags=./tags;,tags` but vim can't jump to function declarations by tag.

#vim #vim9 #ctags #UniversalCtags #php

#UniversalCtags is a #Ctags implementation for many languages.

Universal Ctags examines a source code file for any symbols (variables, types, functions) and outputs a tagged list of those symbols for use in an editor like #Vim or #Emacs. Universal Ctags can parse many languages, including #C, #Python, #Rust, and #COBOL. Universal Ctags supports various output formats.

Website 🔗️: https://ctags.io/

apt 📦️: universal-ctags

#free #opensource #foss #fossmendations #programming

Home · Universal Ctags

A maintained ctags implementation