Sign in to follow this  
Followers 0
Jos

Show Func list in SciTE

13 posts in this topic

#1 ·  Posted (edited)

I've been messing around with LUA a bit, after Steve sent me a request, and created a test LUA script that will list all available Func names sorted and will jump to the selected Func.

Here's how it works:

Dump this http://www.autoitscript.com/fileman/users/jdeb/test/autoit3.lua in your SciTE directory and add these lines to SciteUser.properties:

command.name.40.*=List Functions

command.40.*=List_Functions

command.subsystem.40.*=3

command.mode.40.*=savebefore:no

command.shortcut.40.*=Alt+Z

Now hit Alt+Z and a sorted list of all Func's will be shown....

Select one and enter...

It will jump to it but first bookmarks the current line to enable you to jump back to it with F2..

What do you think ?

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Very nice. It collects the comments as well.

:lmao:

Edit: Added picture

Edited by MHz

Share this post


Link to post
Share on other sites

Very nice. It collects the comments as well.

:lmao:

Edit: Added picture

<{POST_SNAPBACK}>

This is actually an issue.... the comments should be behind the function because else when you select the comment, it won't jump to it...

Just uploaded a updated http://www.autoitscript.com/fileman/users/jdeb/test/autoit3.lua to show the whole Func line as one entry.....

o:)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

AutoIt3.lua:473: bad argument #1 to `LineFromPosition' (number expected, got nil)

Happens on a couple of them.

Unsure for reason :lmao:

Share this post


Link to post
Share on other sites

Happens on a couple of them.

Unsure for reason :lmao:

<{POST_SNAPBACK}>

updated it to just look for "Func xyz(" and remove comment ed from search...

Could you try again to see if you can get it to fail ?


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

No errors resulting now.

Looking real good. :lmao:

Share this post


Link to post
Share on other sites

Thanks - its going to be really useful. - many many thanks o:):)

Could I ask for one further 'feature' enhancement. :lmao:

Shortcut keys - shortcut keys can be changed by going to au3.properties - so different people can make little changes to suit their personal requirements - that and the fact that there are so many keyboard shortcuts now that I cannot remember them!!

Could you add a section to your Scite Config tool - so that we can map different keyboard short cuts for your tools.

eg I have 4 'favorite ' short cut keys - I could then easily choose 4 of your tools to map to these keys - and easily change them if I need to.

Thanks

Steve

Share this post


Link to post
Share on other sites

Could I ask for one further 'feature' enhancement. o:)

Shortcut keys - shortcut keys can be changed  by going to au3.properties - so different people can make little changes to suit their personal requirements - that and the fact that there are so many keyboard shortcuts now that I cannot remember them!!

Could you add a section to your Scite Config tool - so that we can map different keyboard short cuts for your tools.

eg  I have 4 'favorite ' short cut keys - I could then easily choose 4 of your tools to map to these keys - and easily change them if I need to.

Thanks

Steve

<{POST_SNAPBACK}>

Don't think i will be programming this anytime soon but feel free to take the current version and add it to it... Would even add it to the SciTE4AutoIt3 installer to replace the current one.

In my mind the easiest thing is to copy the stuff from the AU3.properties to your sciteuser.properties and assign the shorcuts you like so you override the currently defined key combo's..

The FuncList LUA script wil be added to the next installer... :lmao:


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Now hit Alt+Z and a sorted list of all Func's will be shown....

<{POST_SNAPBACK}>

Thanks JdeB! I like this very much.

Phillip

Share this post


Link to post
Share on other sites

Could I recommend Hotkey Ctrl+L or Alt+L , for "List Functions".

Would be nice to see Z reserved for undo functions. :lmao:

Share this post


Link to post
Share on other sites

Updated the TEST version of http://www.autoitscript.com/fileman/users/jdeb/test/autoit3.lua with proposal from FyingBoz to allow adding trace lines for just the selected lines.

It will now check if lines are selected and add only the trace ConsoleWrite() statement for them. It will still add tracelines for all when nothing is selected...

As far as the ShortCut for the "Func List" LUA.... anything is fine with me:

I have currently the following votes:

Steve : Alt+Z

Mhz : Alt+L

many we need to start a Poll here.. :lmao:


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Awsome Awsome Awsome.... :lmao:

I will be using this a lot...

Thanks for making it.

I set it for Alt + F

Mike


Share this post


Link to post
Share on other sites

I set it for Alt + F

<{POST_SNAPBACK}>

Anybody else with yet another shortcut ????? :lmao:

By the way, did you all also notice the Ctrl+J that was added 2 versions ago. It will bring you right the the Func definition when you have your cursor on the UDF name anywhere in your code.... eg: when your caret (|) is on " _Test(1)" in the first line and you hit Ctrl+J, SciTE will jump right away to the line with "Func Test($inp)" and bookmarks the source to allow you to jump back to it....

If _T|est(1) = 0 then
;.....
EndIf 

;-----
Func Test($inp)
;
   Return $inp
endfunc

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0