Pages: [1] 2
  Print  
Author Topic: Script Editor Features  (Read 3545 times)
Offline (Male) polygone
Posted on: February 19, 2011, 11:16:46 PM

Contributor
Location: England
Joined: Mar 2009
Posts: 810

View Profile
While Josh and Ism are currently working on the script editor post any features or suggestions for it here.

Please number your suggestions so they are easier to reply to.

If you come up with more suggestions after you have already posted, start a new post and continue your numbering where you left off. This way, suggestions can be identified by Username#SuggestionNumber.
« Last Edit: February 20, 2011, 07:29:33 PM by IsmAvatar » Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) polygone
Reply #1 Posted on: February 19, 2011, 11:48:48 PM

Contributor
Location: England
Joined: Mar 2009
Posts: 810

View Profile
1) Options for all features, very important for me. Like being able to turn off line numbering, any highlighting features added, change highlighting colours etc.

2) Automatic syntax checking when closing the editor, warns user upon syntax error.

3) Bracket highlight colouring feature. For example upon hotkey it would look like this:

{
  text, text, text

  {
    text, text, text
    text

    {
       text, text, text, text
    }

  }
  text
  text

  {
     text
  }

}

Also an alternative for brackets and strings. This is perhaps the best way to visually see things in my opinion.

4) Smart code snippet feature. For example you can put whatever common code snippet pieces in a text file you wish, like:

for (i = 0; i < $; i += 1)
{
$
}

then upon a hotkey it insert the code snippet into the editor, like:

for (i = 0; i < ; i += 1)
{

}

and moves the cursor automatically to the first $ sign for typing, then upon another hotkey it moves to the second $ sign then to the end of the snippet piece. Not sure how it's best to choose from different code snippets from the hotkey, ideally upon the hotkey press the user should be able to see the different code snippet choices (without it getting in the way) then can press corresponding key to insert a snippet.

5) Add a help menu so a user can see all the script editor hotkeys easily.

6) Feature to indent/unindent selected lines a certain amount of space

7) CTRL selecting, allowing to select multiple text at once.

8) Math calculations. For example you highlight 2 + 3 press a hotkey it changes it to 5, or highlight 34*5 it changes it to 170.

I'll probably think of more things. Feel free to shoot them down, I don't think any suggestions through :)
« Last Edit: July 08, 2011, 04:22:45 PM by polygone » Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Female) IsmAvatar
Reply #2 Posted on: February 20, 2011, 02:11:58 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
1) Line numbering very easy to turn off. Will certainly be an option. Syntax colors will be customizable.
2) This is a LGM feature request, and is not relevant to the code editor. Fairly easy to implement regardless of how the editor is coded.
3) I think we'll be sure to highlight matching brackets at the least. Your suggestion will be considered.
4) Inserting snippets is mostly an LGM feature request, as is adjusting the caret to the first auto-caret. However, dealing with the next auto-caret points may be tricky. Namely, whatever symbol you use would need to either be left in, or removed and remembered somehow.
5) Help stuff won't be implemented until near completion, but your suggestion will be considered.
6) Probably already in the works.
7) Hmm... Might be possible.
8) Interesting one. I believe this would mostly be an LGM feature request.
Logged
Post made February 20, 2011, 04:50:23 AM was deleted at the author's request.
Offline (Unknown gender) luiscubal
Reply #4 Posted on: February 20, 2011, 09:18:31 AM
Member
Joined: Jun 2009
Posts: 452

View Profile Email
Some of these are LGM, some are code editor, some are a combination:
  • Expand/Collapse brackets (), {}, [], begin/end
  • Fix indenting
  • Refactoring(Rename variable, Rename Script, Extract Method)
  • Auto-complete - see MonoDevelop for ideas(for instance, in MD "Case" matches "camelCase", etc.)
    • If the above situation about camelCase is accepted, then some customization would be nice(camelCase vs underline_separated, etc.)
  • Breakpoints
  • Tab indents selection(in GM, tab doesn't indent selection, it replaces it)
    • Shift+Tab unindents selection(or current line, or whatever)
  • Script documentation support(Like /** @argument0 Instance to receive foobar */)
  • Code style editing(replace begin/end by {} and vice-versa, remove all then statements, add ; to the end of lines where a ; is implicit, remove all unneeded ;, option to convert all "if (foo) stmt;" to "if (foo) { stmt; }", etc.) Note that after applying ANY of these changes, the code effect should be EXACTLY the same. This is an important detail to consider when implementing ; addition/removal.
  • Code warnings like Eclipse and NetBeans and auto-fix.
  • Option to auto-remove whitespaces at end of lines
« Last Edit: February 20, 2011, 07:30:12 PM by IsmAvatar » Logged
Offline (Male) RetroX
Reply #5 Posted on: February 20, 2011, 10:56:13 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
At this point, can we just have an external code editor option?  Geany has all of these and it would be nice to have them before they're actually implemented.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Female) IsmAvatar
Reply #6 Posted on: February 20, 2011, 12:44:12 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
I have some suggestions. Note that they should be options, not enforced.

1. When you copy and paste a code from somewhere, the editor automatically formats the code according to the rules set by the user in LateralGM.

2. Allow the user to use tabs in the auto-formatting script rather than spaces.

3. When you select several lines of code and start from the longest line, the editor shouldn't violently jump all the way back to the left when moving the mouse out of the long line. What if I just wanted to select a snippet of the code in that line? This happens all the time in GM. It should only move left or right when you move the mouse to the side of editor window. Moving up and down is still done the traditional way, though.

4. The code editor checks the syntax X seconds after the user stops typing.

1: This is a later-down-the-road suggestion. We'll consider it.
2: Probably will be implemented as an option when we get there.
3: I think we resolved this by allowing the caret to remain in virtual post-line space, but be drawn at min(caret.x,line.length).
4: Sounds easy enough.

Some of these are LGM, some are code editor, some are a combination:
  • Expand/Collapse brackets (), {}, [], begin/end
  • Fix indenting
  • Refactoring(Rename variable, Rename Script, Extract Method)
  • Auto-complete - see MonoDevelop for ideas(for instance, in MD "Case" matches "camelCase", etc.)
    • If the above situation about camelCase is accepted, then some customization would be nice(camelCase vs underline_separated, etc.)
  • Breakpoints
  • Tab indents selection(in GM, tab doesn't indent selection, it replaces it)
    • Shift+Tab unindents selection(or current line, or whatever)
  • Script documentation support(Like /** @argument0 Instance to receive foobar */)
  • Code style editing(replace begin/end by {} and vice-versa, remove all then statements, add ; to the end of lines where a ; is implicit, remove all unneeded ;, option to convert all "if (foo) stmt;" to "if (foo) { stmt; }", etc.) Note that after applying ANY of these changes, the code effect should be EXACTLY the same. This is an important detail to consider when implementing ; addition/removal.
  • Code warnings like Eclipse and NetBeans and auto-fix.
  • Option to auto-remove whitespaces at end of lines

1: Obviously planned.
2: Define "fix"
3: In consideration for later.
4: Will require clarification/investigation. The LGM code editor already has Ctrl+Space which looks for function names matching the typed text or abbreviated by it (e.g. sm<ctrl+space> suggests show_message)
5: Will consider for later.
6: Obviously planned.
7: Will consider for later.
8: In consideration for later. Will mostly be the job of ENIGMA, I believe.
9: In consideration for later.
10: Good idea.

At this point, can we just have an external code editor option?  Geany has all of these and it would be nice to have them before they're actually implemented.
Already an option. Preferences property "externalScriptEditorCommand" in LateralGM. By default, it's set to NULL indicating 'use internal'. Can be overridden by Java preferences (I posted a tutorial on how to do that manually somewhere. Not sure where now, though.)
« Last Edit: February 20, 2011, 12:46:19 PM by IsmAvatar » Logged
Offline (Unknown gender) luiscubal
Reply #7 Posted on: February 20, 2011, 12:52:05 PM
Member
Joined: Jun 2009
Posts: 452

View Profile Email
2. As in, right click to open the popup menu, click "Fix Indenting", then LGM just fixes the document indentation to fit the user preferences.
4. Auto-complete should additionally recognize local variables. Having it recognize other variables(such as self.foo and global.bar) would be nice, but I understand this could be incredibly hard to implement.
Logged
Offline (Male) RetroX
Reply #8 Posted on: February 20, 2011, 02:26:04 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Already an option. Preferences property "externalScriptEditorCommand" in LateralGM. By default, it's set to NULL indicating 'use internal'. Can be overridden by Java preferences (I posted a tutorial on how to do that manually somewhere. Not sure where now, though.)
So, erm, is there a way to actually make a menu to change this? :V
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Rusky
Reply #9 Posted on: February 20, 2011, 03:23:56 PM

Resident Troll
Joined: Feb 2008
Posts: 961
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Continuous syntax checking, as in GM8's code editor and many IDEs, rather than just on close.
Logged
Offline (Female) IsmAvatar
Reply #10 Posted on: February 20, 2011, 07:27:14 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
luiscubal
2: What you are describing sounds like an aspect of Code Formatting. It's already in consideration for the later stages.
4: Good idea for the later stages.

RetroX
Too lazy to make one. Get me a Java code monkey to write one. Until then: http://enigma-dev.org/docs/Wiki/Overriding_settings

Rusky
Please see Fede-lasse #4
Logged
Post made February 22, 2011, 12:25:06 PM was deleted at the author's request.
Offline (Unknown gender) luiscubal
Reply #12 Posted on: February 22, 2011, 02:45:07 PM
Member
Joined: Jun 2009
Posts: 452

View Profile Email
Quote
8. Tabs, like in Notepad++ and Visual Studio. This will allow for multiple code windows to be open and maximized at the same time.
I think it would be a mistake to add this to the code editor. Tabs shouldn't be a code editor feature, but rather LGM.
So any "tabs" system should be shared with room editors, object editors, etc.
« Last Edit: February 23, 2011, 03:23:39 PM by IsmAvatar » Logged
Offline (Female) IsmAvatar
Reply #13 Posted on: February 23, 2011, 02:06:49 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
Fede-lasse
6: Please see Polygon#4
7: Code folding is already planned.
7a: Wut?
8: This is an already existing LGM feature request, and it would extend to all maximized resource frames, not just code editors.
« Last Edit: February 23, 2011, 03:23:50 PM by IsmAvatar » Logged
Offline (Unknown gender) luiscubal
Reply #14 Posted on: February 23, 2011, 03:05:06 PM
Member
Joined: Jun 2009
Posts: 452

View Profile Email
Quote
7a: Wut?
MSDN documentation
« Last Edit: February 23, 2011, 03:24:01 PM by IsmAvatar » Logged
Pages: [1] 2
  Print