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

Better Edit Program

Started by valithor, 25 August 2013 - 09:29 PM
valithor #1
Posted 25 August 2013 - 11:29 PM
Many times when i am editing a larger amount of code I have a error on line like 500, and I usually edit in game because it is just a small simple error. I am suggesting the ability to go to a certain line as a optional argument when you edit a program. I have edited the edit program that comes with computercraft.

Pastebin: UkBtMfn3
link: http://pastebin.com/6DLa84hg
use: edit program line#

The program from what i have seen does not cause any severe errors. If you enter a line higher than what the program has it just takes you to the highest possible line. If you do not put in the line argument is reacts exactly like the default edit program.

edit: Changed the pastebin code to a version that does not have any bugs. The original one in the post was the first version that I released of the edited edit program.
Edited on 05 December 2014 - 02:29 AM
valithor #2
Posted 01 December 2014 - 05:29 AM
I know I have made this suggestion before, but I believe I was misunderstood. I would post there but the thread was locked with only a single reply.

My suggestion: Make a argument in the edit program where you can go directly to a line.

Reason: This would be useful for editing in game when there is a error on a line that is a good distance into the program. Having to scroll 500 lines to get to a single error that you may not fix the first time makes debugging annoying. By adding a argument/function to go directly to the line would make this much easier.


I have already come up with a solution by making a few simple modifications to the base edit code. Before I get a react similar to what I had before I am not asking for someone to help me fix a problem; I am simply providing code that I know works so, if you wish, can replace the edit program that is already included in CC, with a version which has this goto function.

link to the pastebin code: http://pastebin.com/6DLa84hg

What this adds:
- Start argument so that you can go straight to a given line ex: edit example 200 / would go to line 200 of the program example if there are 200 lines
- A menu Item similar to the exit, save, and print function where you can go to a line while running the program

I released this program on the forums about a year ago, and this version has had no bugs that I have found, or have been reported.

Link to previous post: http://www.computerc...r-edit-program/

This is in no way a problem that needs adressed, just a suggestion to help improve the overall quality of the mod.
Edited on 01 December 2014 - 04:40 AM
oeed #3
Posted 01 December 2014 - 06:26 AM
It may have just been a modification to the ROM on the server I was playing on (LuaLand, which I'm pretty sure you play on too), but I think you can now go to a line using the ctrl menu.

But I agree, this would be useful, although I seldom touch the in-game editor.
Dragon53535 #4
Posted 01 December 2014 - 07:08 AM
It may have just been a modification to the ROM on the server I was playing on (LuaLand, which I'm pretty sure you play on too), but I think you can now go to a line using the ctrl menu.
Yup he's modified the rom to allow it. However it does seem like a useful addition for those who code in game
valithor #5
Posted 01 December 2014 - 07:09 AM
It may have just been a modification to the ROM on the server I was playing on (LuaLand, which I'm pretty sure you play on too), but I think you can now go to a line using the ctrl menu.

But I agree, this would be useful, although I seldom touch the in-game editor.

It was a ROM modification running a different version of the program I posted here.


Edit: ninja'd
Edited on 01 December 2014 - 06:11 AM
Lyqyd #6
Posted 01 December 2014 - 03:56 PM
Threads merged.
SpencerBeige #7
Posted 04 December 2014 - 11:31 PM
val. u do understand that this prog is used in lualand, where it should be. its the only thing that makes the server special.
Agent Silence #8
Posted 04 December 2014 - 11:34 PM
val. u do understand that this prog is used in lualand, where it should be. its the only thing that makes the server special.
Valithor made and installed it into lua land…
valithor #9
Posted 05 December 2014 - 03:28 AM
val. u do understand that this prog is used in lualand, where it should be. its the only thing that makes the server special.

Well as Requiem said I was the one that actually made the modifications to the edit program, and was the one that uploaded it to the server. While it is a neat thing for the server to have. I believe that it would make the CC mod better as a whole, which is more important than a single server.

I honestly doubt that they will add this, but was simply putting it out there as something that is very helpful for ingame editing.
badkruka #10
Posted 05 December 2014 - 06:44 PM
When I code in game I use this program. With this you can jump to lines and much more.
http://www.computercraft.info/forums2/index.php?/topic/12347-luaide-10-you-might-actually-like-editing-in-game/
Dragon53535 #11
Posted 05 December 2014 - 07:25 PM
When I code in game I use this program. With this you can jump to lines and much more.
http://www.computerc...diting-in-game/
This requires you to grab said program from the forums and either copying it in, or pastebin geting it in. Whereas if you were to edit the default program that EVERYONE has, this functionality would be universal, and allow you to use it if you don't have http on, or only had enough time with whatever internet you had to download CC.
badkruka #12
Posted 05 December 2014 - 07:28 PM
When I code in game I use this program. With this you can jump to lines and much more.
http://www.computerc...diting-in-game/
This requires you to grab said program from the forums and either copying it in, or pastebin geting it in. Whereas if you were to edit the default program that EVERYONE has, this functionality would be universal, and allow you to use it if you don't have http on, or only had enough time with whatever internet you had to download CC.
To tired to write in a forum. :(/>
Forgot I was in the suggestion part.
LtKillPuppy #13
Posted 10 December 2014 - 07:32 AM
I'd like to see a better built-in editor, but honestly, I usually play on a MC server halfway across the world (literally). There's a half-second delay to every key stroke I make in the CC built-in editor.

Using something like pastebin, or in the case of this server a network share letting me directly access my computer's folder, is the only thing that will make me happy. :)/>