List of functions in file

dhealey
Posts: 40
Joined: 14.12.2019 12:30

List of functions in file

Post 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.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post 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.
Attachments
treee.png
dhealey
Posts: 40
Joined: 14.12.2019 12:30

Post by dhealey »

Perfect, but I don't see the plugin in the addons manager to install.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

It's called "CudaExt", it's in ReInstall menu if it's already installed.
dhealey
Posts: 40
Joined: 14.12.2019 12:30

Post 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
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Maybe you suggest that JS code

nnnn: function() {...}

must be shown in code tree as "function nnnn"?
dhealey
Posts: 40
Joined: 14.12.2019 12:30

Post 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.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

i wrote this as to-do, will see it later...
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post 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
Attachments
Screenshot from 2020-02-05 01-15-05.png
dhealey
Posts: 40
Joined: 14.12.2019 12:30

Post 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 :)
Post Reply