See links for needed support stuff (e.g. fzf, if you cannot use brew…)
I plan to add completion of entire lines (procedures etc.) and more, must be easy now; just some regex here and there, and mostly on stuff already inside PureBasic.app… but I better wait until the IDE will be a bit more "stable"……
Apropos, did you ppl see what TextMate can do? Try "Edit Bundles"!
Anyway, I also made a 18-hours video explaining the basics of my creation… Enjoy!
Video (dedicated to Idle)
PB Text File
fzf silicon from brew install
New VIDEO dedicated to pf shadoko
READ POSTS BELOW FOR UPDATES!
AppleScript IDE tool:
Code: Select all
set pargr to "" -- Mac IDE Tool (no parameters needed) for Fuzzy Autocomplete!!!
try
tell application "PureBasic" to activate
tell application "System Events"
set scint to a reference to text area 1 of scroll area 1 of group 1 of group 1 ¬
of splitter group 1 of splitter group 1 of window 1 of application process "PureBasic"
repeat 16 times -- HACK to bypass PB 6.10 IDE bug; ⌥← works, but ⌥⇧← does not…
tell application process "PureBasic" to key code 123 using shift down
end repeat
delay 0.1
tell scint to set sel to value of attribute "AXSelectedText"
set nc to count last word of sel
tell application process "PureBasic" to key code 124
repeat nc times
tell application process "PureBasic" to key code 123 using shift down
end repeat -- END of HACK… 10 lines instead of 1… grrr…
set src to words of ((value of scint) as string)
set ASTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to linefeed
set src to src as text
set AppleScript's text item delimiters to ASTID
set src to quoted form of src
tell scint to set sel to value of attribute "AXSelectedText" -- Paths to support file and app below…
set pargr to paragraphs 2 thru -1 of (do shell script ¬
"echo " & src & " | cat - ~/bin/pb.txt | sort -u | /opt/homebrew/bin/fzf -i -f " & sel)
tell application "PureBasic" to set pargr to choose from list pargr default items {item 1 of pargr}
tell application process "PureBasic" to keystroke {item 1 of pargr}
end tell
end try