Page 1 of 2

List of functions in file

Posted: 04.02.2020 01:18
by dhealey
Is there a way to bring up a list of functions in a file. In Atom and Sublime you do this by pressing CTRL+R, I haven't been able to find a similar thing in CudaText yet.

Posted: 04.02.2020 10:19
by Alexey
Yes, plugin CudaExt gives command
"Code tree: Symbols list...", which duplicates the content of CodeTree panel in a dialog.
You can assign a hotkey to this command.

Posted: 04.02.2020 12:13
by dhealey
Perfect, but I don't see the plugin in the addons manager to install.

Posted: 04.02.2020 14:30
by Alexey
It's called "CudaExt", it's in ReInstall menu if it's already installed.

Posted: 04.02.2020 14:45
by dhealey
Thank you!

The pseudo namespaces I'm using in Javascript mean the code-tree is showing all functions as anon.
Screenshot from 2020-02-04 14-36-31.png

Posted: 04.02.2020 14:49
by Alexey
Maybe you suggest that JS code

nnnn: function() {...}

must be shown in code tree as "function nnnn"?

Posted: 04.02.2020 15:27
by dhealey
Yeah, I think a lot of JS developers use the object method of namespacing their code, since JS doesn't really have namespaces.

Posted: 04.02.2020 21:09
by Alexey
i wrote this as to-do, will see it later...

Posted: 04.02.2020 22:17
by Alexey
after my fix, your diary.js shows OK here:
you can download JS lexer at github
https://github.com/Alexey-T/CudaText/bl ... Script.lcf

Posted: 04.02.2020 22:45
by dhealey
Wow that was fast, thank you!

I found one more type of function that shows as anon. It's when the function is created inline inside ()
Screenshot from 2020-02-04 22-47-33.png
Oh actually ignore me, those are anonymous functions :)