This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Lion4ever's profile picture

Add local variables to autocompletion in the edit program

Started by Lion4ever, 14 November 2015 - 05:16 PM
Lion4ever #1
Posted 14 November 2015 - 06:16 PM
When i have this code in the edit program:

local variableA
variableB = 2
local varC = "hI"

var_
(The last character is the cursor)

I would like to have an autocompletion for all three Variables. Not only for the second one, if i ran the program once.

It would be possible to match tLines with a variable-declaration-pattern and add it to tCompletions.
MKlegoman357 #2
Posted 14 November 2015 - 06:23 PM
Or do it like in Sublime Text: suggest any words found in the document.
Lion4ever #3
Posted 14 November 2015 - 08:39 PM
Or do it like in Sublime Text: suggest any words found in the document.

Yeah, Notepad++ does and Kate do that, too :)/> That would work as well. And that would include text in quotes, idk if that is useful.
Lupus590 #4
Posted 14 November 2015 - 09:06 PM
You could try looking at some of the IDE's on the forums and see if they provide the features you want. Or you could write your own.
Lion4ever #5
Posted 15 November 2015 - 03:46 PM
You could try looking at some of the IDE's on the forums and see if they provide the features you want. Or you could write your own.
I dont get your point, lupus. I have changed it on my version of the edit program allready. This is a suggestion, not a request for a program. Something I think would improve in computercraft.
Edited on 15 November 2015 - 02:50 PM