how to read the ahk scripts in a large project which editor is preferred

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
woshichuanqilz72
Posts: 117
Joined: 05 Oct 2015, 21:23

how to read the ahk scripts in a large project which editor is preferred

08 Dec 2017, 23:12

I get a large ahk project to read, there a lot of variable in different files, it's a little painful to jump among the different file to find a variable defination or assignment, I use scite4AHK now, so I want to know whether scite4ahk has a better way to locate a variable or other code editor recommanded.

Thanks in advance~
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: how to read the ahk scripts in a large project which editor is preferred

09 Dec 2017, 05:36

Editors are a matter of taste. The 'established' ones all have a similar set of features. At the job I've used UltraEdit for a long time. The main requirement for the majority of AHK coders, is there a syntax highlighting file available for that damn thing. Good luck :)
User avatar
KuroiLight
Posts: 328
Joined: 12 Apr 2015, 20:24
Contact:

Re: how to read the ahk scripts in a large project which editor is preferred

09 Dec 2017, 11:34

Sublime Text is actually capable of jumping to code in other files, despite its quirks with ahk.
Windows 10, Ryzen 1600, 16GB G.Skill DDR4, 8GB RX 480 | [MyScripts][MySublimeSettings] [Unlicense][MIT License]
01/24/18
[/color]
User avatar
davebrny
Posts: 85
Joined: 05 Dec 2016, 06:26

Re: how to read the ahk scripts in a large project which editor is preferred

09 Dec 2017, 14:42

ive only ever used sublime text so i cant say for certain how it compares to scite4ahk but heres a few things that might help if you want to try sublime text:

go to "project/add folder to project", then use ctrl + kb to toggle the sidebar so you can see the file tree on the left.
you can keep clicking on files to open them and they will open in the same tab, meaning you can look into 20 files without having to close 20 after. if you double click or make an change in the file then it will stay open permanently and the next file you click on will open in a new tab.

ctrl + p brings up the command palette which lets you search for every file in the current project. you can then use the up and down keys to go through the search results and look into each file without opening it

to search for label or function name in the current file, type a @ when you first open the command palette (or use the hotkey ctrl + r)
when the command palette is open you can press the up and down keys to scroll to each item and then press escape to return to where you were

to combine both options, you can search inside a file that isnt open typing the filename into the command palette, then the @ symbol, then type the name of the label or function
(its a fuzzy search so the name doesnt have to be an exact match either)

or maybe ctrl + shift + f might be of more use for your case. this does a word search in every file you have added to the project and shows the results in its own tab. you can then click on the file path at the top of each result to open the source file.

theres a package that ads syntax highlighting for ahk: ctrl + shift+ p, type "install package", then search for "SublimeAutoHotkey"
bufferscroll is another useful package that remembers the position of a file when you reopen. (it needs to be installed manually from github though)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 358 guests