Sign in to follow this  
Followers 0
chenxu

Code Navigator - enhancement for SciTE (beta version)

6 posts in this topic

#1 ·  Posted (edited)

SciTE, the third party editor for AutoIt, is useful for editing an AutoIt script, but not useful enough. When you are editing or reading a big *.au3 file, like more then 1000 lines, you would find that it is hard to jump to a potion quickly and exactly, like jumping to the definition of a certain function, or jumping to the last position you visited, at some time, it could take you 1min to look for the position. This is why I create this utility - Code Navigator. It will help you to analyze all the position of functions in the *.au3 file you editing, and you can quickly jump to the definition of the functions. And remember the position, after you finish editing or viewing the function, you can jump back to the last position. This is one of the most important feature of Code Navigator. With Code Navigator, you can also jump to the definition of function by selecting the name of the function and by pressing a single key, perform quick search by selecting some characters you want to search for and by pressing a single key, list all the search result in a list and jump to the line which you are interesting, and many more features.

If the SciTE is not installed, Code Navigator would complain about this. Please reinstall SciTE. If your SciTE is running well and Code Navigator still complains about SciTE is not been installed, Please check your registry whether the value is existed: HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\Autoit\InstallDir, and make sure the value of which is correctly the path of SciTE.

Using Code Navigator, you do not need to launch SciTE first and then launch Code Navigator. You can just launch Code Navigator, it will launch SciTE for you if SciTE is not running. So, Isuggest you make a shortcut of Code Navigator to launch SciTE instead of the old shortcut points to SciTE.

post-25990-1194098877_thumb.jpg

How to use Code Navigator

Select some characters, press {F3} to perform quick search next, press {ctrl + F3} to perform quick search previous. If no character is selected, the last search keyword would be searched.

Select a name of a function, press {F8} to jump the the defination of this function, if the function does not exist, nothing is gonna happen.

Click the button "<-F9" to jump the the previous position, in the meantime, click the button "F10->" to jump to the last position. Or, press F9 and F10 will do the same thing for you.

Want to list all search result in a window? Try to press Shift + Alt + F. Select some characters and press Alt + L to list all the lines which contains the selected characters. Click a certain item in the list to jump to this line.

Press Alt + 1, Alt + 2, Alt + 3, Alt + 4 to set the transparency of the main window, good feature while editing your code.

Code Navigator will auto refresh the function list as soon as you save your code or you change to an other file. You can disable this feature by click the tray menu and select "Disable Auto Refresh", click again to enable this feature. Alt + R is a shortcut for this feature.

You can sort the list of functions by click the parent item of functions tree, or right click the item. Same to the includes tree. You can also enable/disable sorting.

Any advice or commends would be welcomed by sending me an email: oicqcx@hotmail.com, thanks.

The source code and application can be found in the attachment

CodeNavigator.rar

Edited by chenxu

Share this post


Link to post
Share on other sites



Looks interesting.

One comment: Using Ctrl+J in SciTE will jump to the definition of a function even when that is located in one of the Included files. It will also leave a bookmark thus f2 will bring you back to the place where it jumped from ... <_<


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

Wow! Thats very useful.

Thanks for this great work!

Share this post


Link to post
Share on other sites

SciTE, the third party editor for AutoIt, is useful for editing an AutoIt script, but not useful enough. When you are editing or reading a big *.au3 file, like more then 1000 lines, you would find that it is hard to jump to a potion quickly and exactly, like jumping to the definition of a certain function, or jumping to the last position you visited, at some time, it could take you 1min to look for the position. This is why I create this utility - Code Navigator. It will help you to analyze all the position of functions in the *.au3 file you editing, and you can quickly jump to the definition of the functions. And remember the position, after you finish editing or viewing the function, you can jump back to the last position. This is one of the most important feature of Code Navigator. With Code Navigator, you can also jump to the definition of function by selecting the name of the function and by pressing a single key, perform quick search by selecting some characters you want to search for and by pressing a single key, list all the search result in a list and jump to the line which you are interesting, and many more features.

This looks as though it could be a useful future addition to Scite for AutoIt list of tools.

My observations so far.

Select a name of a function, press {F8} to jump the the defination of this function, if the function does not exist, nothing is gonna happen.

This doesn't work for me {F8} toggles the display of the output window in Scite. Perhaps you need to choose another HotKey for this.

Want to list all search result in a window? Try to press Shift + Alt + F. Select some characters and press Alt + L to list all the lines which contains the selected characters. Click a certain item in the list to jump to this line.

This mostly works for me. Shift+Alt+F brings up your search dialog but the selected text in Scite is not copied to the Find what box it has to be entered manually before pressing Alt+L

The tree view of functions works just fine.

Some suggestions for improvements:

It could be improved if it was possible to double click on an include file in the tree and have it open the file.

Having an option to dock the window with to the right or left of the main Scite window could be useful.

Having the previous / next navigation work across different files.

Nice work. It's given me a few ideas of my own. for automating some the things I need to do quite often in Scite that snippets and abbreviations are not quite enough for, to try out.

Bowmore


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

Looks interesting. I will have to try it out... Thanks..

Share this post


Link to post
Share on other sites

Some suggestions for improvements:

It could be improved if it was possible to double click on an include file in the tree and have it open the file.

Having an option to dock the window with to the right or left of the main Scite window could be useful.

Having the previous / next navigation work across different files.

Nice work. It's given me a few ideas of my own. for automating some the things I need to do quite often in Scite that snippets and abbreviations are not quite enough for, to try out.

Bowmore

Thanks for your suggestion.

I think the new features can be done by the next version.

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