Feature Request - show line number

Darmir
Posts: 226
Joined: Sun May 01, 2011 6:51 pm
Contact:

Feature Request - show line number

Post by Darmir »

One feature I would like to see is having the line numbers able to show up in the editor window. This would help you quickly find the line when you see an error in your script which gives you the line number.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Feature Request - show line number

Post by Heiko »

Line numbers are shown in the status bar of the editor.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Feature Request - show line number

Post by tsuujin »

They are, but that's not nearly so handy as having them displayed along the left of the window. Many coders (myself included) are simply used to seeing them there.

Darmir
Posts: 226
Joined: Sun May 01, 2011 6:51 pm
Contact:

Re: Feature Request - show line number

Post by Darmir »

Heiko wrote:Line numbers are shown in the status bar of the editor.
The point is to quickly go to the line number when you see the error in the status window. If I had a script with let's say 500 lines of code and the status window says go to line 300 it would take me a long time to find exactly where I am having issues.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Feature Request - show line number

Post by tsuujin »

Darmir wrote:
Heiko wrote:Line numbers are shown in the status bar of the editor.
The point is to quickly go to the line number when you see the error in the status window. If I had a script with let's say 500 lines of code and the status window says go to line 300 it would take me a long time to find exactly where I am having issues.
I always miss VIM when I have to do any coding outside of it. One of the many features I love: keyboard shortcut to go straight to a line number.

Darmir
Posts: 226
Joined: Sun May 01, 2011 6:51 pm
Contact:

Re: Feature Request - show line number

Post by Darmir »

tsuujin wrote:
Darmir wrote:
Heiko wrote:Line numbers are shown in the status bar of the editor.
The point is to quickly go to the line number when you see the error in the status window. If I had a script with let's say 500 lines of code and the status window says go to line 300 it would take me a long time to find exactly where I am having issues.
I always miss VIM when I have to do any coding outside of it. One of the many features I love: keyboard shortcut to go straight to a line number.
Me too. I learned how to write perl and korn shell in VIM.

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Feature Request - show line number

Post by Oneymus »

Darmir wrote:
Heiko wrote:Line numbers are shown in the status bar of the editor.
The point is to quickly go to the line number when you see the error in the status window. If I had a script with let's say 500 lines of code and the status window says go to line 300 it would take me a long time to find exactly where I am having issues.
A word of advice, coming from experience: If your script contains files (even a single one) with 500 lines in it, you may want to consider writing it outside of Mudlet and using require() to load the script. I would think just about any IDE is a better development environment than direct Mudlet when working on something of that scope.

Personally, I use the Scite that came with Lua For Windows.

Darmir
Posts: 226
Joined: Sun May 01, 2011 6:51 pm
Contact:

Re: Feature Request - show line number

Post by Darmir »

Okay I never would have a script with 500 lines either but that is just an example.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Feature Request - show line number

Post by Rakon »

Oneymus wrote:
Darmir wrote:
Heiko wrote:Line numbers are shown in the status bar of the editor.
The point is to quickly go to the line number when you see the error in the status window. If I had a script with let's say 500 lines of code and the status window says go to line 300 it would take me a long time to find exactly where I am having issues.
A word of advice, coming from experience: If your script contains files (even a single one) with 500 lines in it, you may want to consider writing it outside of Mudlet and using require() to load the script. I would think just about any IDE is a better development environment than direct Mudlet when working on something of that scope.

Personally, I use the Scite that came with Lua For Windows.
The issue I have with require() or dofile() is:

require() :
If I unload or nil out the package, the functions it loaded are NOT unloaded. Thus I have to go through and manually nil out each function and then reload/require the package again to get the UPDATED functions there.

dofile() :
Running mudlet for a while and loading/reloading the main script alot, eventually you'll run into an error that 'too many file handles are open' or some such. This requires you to completely logoff/close mudlet and then reopen in order to get around it or reload the script.

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: Feature Request - show line number

Post by Iocun »

I see no issues with large scripts in Mudlet itself. Mudlet may not offer all the functionalities of a dedicated script editor, but it works well enough for my purposes, and I find it more comfortable to have everything in one place than having to toggle to other programs/files to edit some of my scripts. The core script of my curing system has well over 500 lines.

Post Reply