Search Unity

Utilities Script Inspector 3

Discussion in 'Tools In Progress' started by Flipbookee, Aug 10, 2013.

  1. poppgames

    poppgames

    Joined:
    Jan 18, 2015
    Posts:
    11
    Another issue regarding the popup box.
    It sorts variables by most recently used, then my spelling if I am correct.
    I find myself being slowed down by the auto-complete when I deal with case-sensitive variables.
    For example:
    Code (CSharp):
    1. float timer = 10;
    2. //What I want to type
    3. void FixedUpdate()
    4. {
    5.     timer -= Time.deltaTime;
    6. }
    7.  
    8. //What auto complete does
    9. void FixedUpdate()
    10. {
    11.     timer //... auto-complete remembers I type "timer"
    12.  
    13.     timer -= //... Okay pop-up box goes away
    14.  
    15.     timer -= Time //... auto complete picks timer
    16.  
    17.     timer -= Time. //... auto complete repaces "Time" with timer.
    18.  
    19.     timer -= timer.deltaTime; // result
    20. }
    Is their a way to fix this so that it shows the most recently typed, best matching variables in addtion to case-sensitivity.
     
  2. poppgames

    poppgames

    Joined:
    Jan 18, 2015
    Posts:
    11
    I may be getting very picky now, so I apologize. I have been using Microsoft VS 2013 to edit code in a group project. I did not want to use this, because no one else in the group was. Anyway, this is better than MD by far. You are right to say that this is not it's competitor anymore. Now then, someone has to be the devils advocate. :)

    When I press the tab button when I finish typing any variable or class name, I tab in my code.
    When I press the tab button when I partially complete any variable or class name, auto-complete finishes it.

    When I press the enter button when I finish typing any variable or class name, I do not create a new line.
    When I press the enter button when I partially complete any variable or class name, auto-complete finishes it.

    Do you think it would be a good idea to not tab in code, when variables and class names are just finished typing?
    Code (CSharp):
    1. int number = 0;
    2.  
    3. void Update()
    4. {
    5. // | denotes where the cursor is
    6.      number|  //press tab
    7.      number      |
    8.  
    9.      num|  //press tab with auto-complete highlighting number
    10.      number|
    11.  
    12.      number|  //press enter
    13.      number|
    14.  
    15.      num|   //press enter with auto-complete highlighting number
    16.      number|
    17.  
    18. }
    Like in MD, and VS, these could be turned into an advance option, or just something that everyone is used to and make it the default. I will let you decide. Thank you again for letting me in the beta.
     
  3. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @Killcycle Oh, you made the VS Dark theme? :) That's amazing! I wanted to do that as well, so you saved me lots of time, thanks a lot! :D I'll add it with the next update.

    Did you really manage to crash the editor? Do you mean the Unity Editor crashed? I tried quickly to repro that and I see it hangs for a moment. There's lots of room for improvement there so I'll do something about that, but I need more info about the crash - fixing that is more important, I think!

    Yeah, 7K lines is way too much for a normal script, but I didn't bother to break it down in smaller scripts because I can use it for stress testing the Si3. ;) It works nicely while editing the content of a method for example, but it needs more optimization for editing outside if the scope of a method.

    @poppgames I know about the implicit conversions and operators, they are all ignored for now but that doesn't break autocompletion and semantic analysis in most cases. I'll have to do that to cover those rare cases too.

    Nice find about the ;; bug. I wouldn't call it a bug really but rather an imperfection. ;) That would be invalid code and it wouldn't compile. Si3 has a complex error recovery algorithm that tries hard to pass over syntax errors and it does stellar job in most cases, but not in this particular case obviously. So I'll try to improve that... Nice find, thanks!
     
  4. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @poppgames Thanks for being devil's advocate! ;) I appreciate your efforts and it helps me a lot, so don't worry about that.

    Yes, I've noticed that too. When there are two recently used completions, and one is a substring of the other one it gets annoying when it auto-selects the one which I don't want. I don't know is that related to capitalization, but I'll investigate that too.

    Yes, I asked myself this same question :) but I didn't know the answer. Maybe it's best to add an option for that...
     
  5. Kadaiyen

    Kadaiyen

    Joined:
    Jul 16, 2012
    Posts:
    14
    No problem. :)

    Yes, the Unity editor crashes. It may not be limited to List<>, I'm seeing it with Dictionary<> as well. But not stack<>?

    It crashes most of the time, and hangs when it doesn't; if I'm typing fast enough, the input text can get me past the hang, but if left as a single bracket there's no recovering whether it crashes or hangs. I'm running Unity 5.

    I've managed to catch what looks like the error (a stack overflow would definitely cause the observed behavior):

    Code (csharp):
    1. StackOverflowException: The requested operation caused a stack overflow.
    2.   at ScriptInspector.NamespaceDefinition.ResolveAttributeMember (ScriptInspector.Leaf leaf, ScriptInspector.Scope context) [0x0002b] in A:\<removed>\Assets\Plugins\Editor\ScriptInspector3\Scripts\FGTypeSystem.cs:3923
    3.  
    4.   at ScriptInspector.NamespaceScope.ResolveAttribute (ScriptInspector.Leaf leaf) [0x00116] in A:\<removed>\Assets\Plugins\Editor\ScriptInspector3\Scripts\FGTypeSystem.cs:4450
    5.  
    6. UnityEngine.Debug:Internal_LogException(Exception, Object)
    7. UnityEngine.Debug:LogException(Exception)
    8. ScriptInspector.FGResolver:ResolveNode(Node) (at Assets\Plugins\Editor\ScriptInspector3\Scripts\FGTypeSystem.cs:8588)
    9. ScriptInspector.FGTextEditor:DoGUI(Boolean) (at Assets\Plugins\Editor\ScriptInspector3\Scripts\FGTextEditor.cs:2973)
    10. ScriptInspector.FGTextEditor:DoGUIWithAutocomplete(Boolean) (at Assets\Plugins\Editor\ScriptInspector3\Scripts\FGTextEditor.cs:1763)
    11. ScriptInspector.FGTextEditor:OnWindowGUI(EditorWindow, RectOffset) (at Assets\Plugins\Editor\ScriptInspector3\Scripts\FGTextEditor.cs:1637)
    12. ScriptInspector.FGCodeWindow:OnGUI() (at Assets\Plugins\Editor\ScriptInspector3\Scripts\FGCodeWindow.cs:870)
    13. System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    14. System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    15. System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    16. UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:244)
    17. UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:237)
    18. UnityEditor.DockArea:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:681)
    19.  
    20. (Filename: Assets/Plugins/Editor/ScriptInspector3/Scripts/FGTypeSystem.cs Line: 3923)
    The class I was editing was within a namespace, and inheriting from a generic class like so:

    Code (csharp):
    1. namespace name.name2
    2. {
    3.     public class ClassType : GenericClass<ClassType>
    4.     {
    5. ...
     
    Last edited: Apr 5, 2015
  6. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey folks, I just sent you the link for downloading Si3 Beta 4.2 :)

    This is hopefully going to fix that crash caused by infinite recursion reported by @Killcycle. I wasn't able to reproduce the crash but I found something related which was missing in my code, so I hope that was the reason for the crash.

    @Killcycle, I suspect that crash was related to your code specifically so please try to repro the crash at the same place in your code and let me know is it really fixed now ;)... I've added your Visual Studio Dark theme and it looks gorgeous :D Thanks!

    The double semicolon issue found by @poppgames is fixed now :D Thanks!

    The slowdown while adding an attribute reported by @Killcycle is fixed now. There's another slowdown that happens while editing the beginning of the body of a really huge class. I think the incremental parser fails to do its job in this case, so I'll look at that...

    Ah yes, @Adam Buckner and a few other people requested triple click to select the whole line. That's added now as well :cool: and you can also triple click and drag to select multiple lines :D

    I hope you'll enjoy this edition of Si3 :)

    Edit: The warning message reported by @cavila is removed now ;)

    Edit 2: Wow, so many smilies! Here's one more :p
     
    Dreamaster likes this.
  7. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    I forgot, there's one more feature in Beta 4.2 - there's an option to turn on or off the font hinting. It's in the menu where we select the fonts and it's on by default. But if you have a high resolution monitor you may want to turn this option off. Thanks to @jshrek for turning my attention to this detail!
     
  8. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    wow how fast you update beta 4! i cannot follow up with my custom code formatting integration due to this fact :p
     
    Flipbookee likes this.
  9. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @Breyer he he, sorry man ;)

    Thanks for sharing with me your auto formatting solution! I'll check how to make that easier to integrate...
     
  10. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    Imo the easiest would be hookable callback with string pathToSavedFile parameter. Probably called in SaveBuffer in FGTextEditor immediately after textBuffer.Save(); However i dont know whole picture so might not be the best place. Nvm i sent u some time ago how my integration look so u know what i say ;).

    Some fancy (but NOT mandatory) stuff i would like to see:

    avoiding unnecesary rebuilding arrays under the hood (e.g. coloring, hyperlink) since autoformatting add "only" tabs/spaces and end of lines. I already did this for myself but doing it every update is a bit painful and found bug with selection text staying in place even when tabs was added after auto-format. Not sure if solvable though.

    Maybe separate OnGUI callback for editor stuff in SI Preference window (i would like to add TextField with command line arguments)

    you added support for undo/redo between compilation recently or was already in beta 3.0 ? i cannot reminder because if yes then my integration broke this feature and would like to see some way to hook up to undo/redo between compilation feature


    BTW i like that u added option for choosing 'one-save' or 'two-save' behaviour for Ctrl+S ;)
     
    Last edited: Apr 6, 2015
  11. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Incredible, didn't recognize you did this. It's absolutely brilliant man !
     
    Flipbookee likes this.
  12. Callski

    Callski

    Joined:
    Feb 3, 2013
    Posts:
    130
    I've been using your latest si3 beta release and for our larger scripts, it runs better than Visual Studio. When we open something in VS which has 20k+ lines the program becomes unusable. We've had to resort to editing things in Notepad. You're plugin works great and once it loads the script we have no issues editing or scrolling :D. Thank you!
     
    Flipbookee likes this.
  13. cavila

    cavila

    Joined:
    Jun 4, 2013
    Posts:
    67
    @Flipbookee Oh man, you are hitting the ball out of the park with this release. It's getting me excited trying out all the new features.

    I get the following error message when using the keyboard shortcut (CMD-Y) for "Go to Definition" on a function; it does take me to the definition though:

     
    Flipbookee likes this.
  14. iviachupichu

    iviachupichu

    Joined:
    Feb 6, 2015
    Posts:
    28
    The latest beta is great! Already abusing the heck out of code completion.

    Did you implement some sort of line selection? When exiting Play mode Script Inspector 3b4 sometimes gets stuck in this mode where clicking selects an entire line and there's no obvious way to disable it without closing and reopening the script window.
     
    Flipbookee likes this.
  15. cavila

    cavila

    Joined:
    Jun 4, 2013
    Posts:
    67
    +1 and the cursor will always be at the beginning of the line after the line clicked.
     
  16. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    I'm having the same problem with iviachupichu and cavila, too :)
     
  17. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @iviachupichu @cavila @thienhaflash Just double-click inside the code view to quit the line-selection mode for now and I'll send you a fix a bit later today. Sorry for the bug ;)
     
  18. Phelioz

    Phelioz

    Joined:
    Nov 25, 2013
    Posts:
    7
    On the fence of buying your package, looks really great! Would love to join the beta so see where the packages is going before buying. Just a question do you have any plans for debugging features?
     
  19. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @Phelioz I'll send you a copy of the Beta 4.3 in a few minutes :)... Please PM me your email.

    Yes, I've been planning to add debugging to Script Inspector since long time ago, and I will do that one day if I'm lucky enough to pass over all of the technical issues connected with that. The biggest one is that I'd have to stop the execution of all scripts running in Unity including the Script Inspector's own scripts, those which are supposed to keep running so that you'll interact with its UI. That part sounds almost impossible but I don't give up easily ;) and I won't until I try doing my best regarding that.

    Other than that, debugging standalone builds or builds running on devices is doable! I've made some quick tests already and I've managed to connect Mono's debugging engine easily to such builds. Still, to implement the whole debugging feature would require a lot of work and I wouldn't count on that coming very soon if that's a significant factor for making your decision :p
     
  20. Phelioz

    Phelioz

    Joined:
    Nov 25, 2013
    Posts:
    7
    Thank you for your fast answer!
    I understand, debugging for be is quite important but I am still interested in your asset. It's just something about coding right in Unity that sounds really slick :). I sent you my email
     
    Flipbookee likes this.
  21. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Hey folks, I just sent you the link to Si3 Beta 4.3 (sorry @Breyer :p). This update fixes the line selection issue, has a slightly modified Visual Studio Dark theme, and an attempt to fix the error message reported by @cavila which I can't verify now because my MacBook is not with me...

    Enjoy! :D
     
  22. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Thank you so much guys for your lovely comments!!! :D

    And thank you @Callski as well! :D This is now a really serious endorsement!!! :cool:
     
  23. Callski

    Callski

    Joined:
    Feb 3, 2013
    Posts:
    130
    Any plans to have a global script search feature?
     
  24. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Yes, and the Go To Definition feature already does that as a first step in finding definitions. I'd have to expose that functionality in the UI now and let the user choose between find in current file and find in all files. Then I'll have to list the results in a window with a list, so it isn't too simple and not too hard...
     
    Callski likes this.
  25. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    Hi Flipbookee,
    I've been watching this thread for months and couldn't resist any longer. I think reading this thread is the best advertising you can get given the enthusiastic response you are getting to SI3. Just bought SI 2 and would really appreciate the chance to get my hands on SI 3 beta if you approve.
    Thanks!
     
    Flipbookee likes this.
  26. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
  27. cavila

    cavila

    Joined:
    Jun 4, 2013
    Posts:
    67
    4.3 fixed all issues so far. It's great. :)
     
    Flipbookee likes this.
  28. FireMutant

    FireMutant

    Joined:
    Sep 2, 2013
    Posts:
    49
    Flipbookee,
    I'm really enjoying SI 3! It is just so convenient to have a powerful editor always available without waiting for VS or MonoDevelop to load. The only thing that I really miss right now is the display of function arguments while typing. Is that a feature that will be added, or am I doing something wrong?

    BTW, one of my favorite features is the navigation bar at the top that changes based on where you are in the code. That is very convenient.

    Thanks,
    FM
     
  29. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Thanks @FireMutant for your feedback!

    Function arguments will be added, I hope, with the next update. :)
     
  30. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Parameter info is kind of working now! It still needs some polishing, but I can confirm now it will be available with the next update :D
     
    iviachupichu likes this.
  31. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    So cool, man :)
     
    Flipbookee likes this.
  32. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
  33. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    Awesome news! but with Parameter info not with VS :p

    BTW u posted some time ago example with overriding SI3 shortcuts but i cant find where this was - i would like to add action for '[', '(' and especially for '/' while something is selected

    And found that in beta 4 problem with losing undo under compile error (previously i was wrong with statement that i lose undo in every save) is fixed
     
    Last edited: Apr 17, 2015
    Flipbookee likes this.
  34. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    He, he, hell yes! :) Now parameters info is fully working but it still overlaps with the completions popup. I'm trying to solve that too.

    Do you want to add those keys as "surround with" actions? I was thinking to do the same actually, but I wasn't sure how desirable would that be. I guess that depends on individual preference... I'll find the example, but maybe it's time to start adding some extensibility API so that you can do your own customizations, such as these key bindings or auto-formatting on save.

    I've never noticed losing undo issue. The only time that happens is when a script is modified outside of Si3 because after reloading the script all the positions saved in undo buffer are not valid anymore, so I'm discarding the buffer on reload. I could eventually save the reloading as a step in the undo buffer to avoid clearing of previous actions... That was possibly happening when you had your auto-formatting solution as a step after saving which Si3 saw as an external change. We'll have to think of some solution to avoid that, maybe a good one would be to remember the reload in the undo buffer as an auto-format action.
     
    Last edited: Apr 18, 2015
  35. jshrek

    jshrek

    Joined:
    Mar 30, 2013
    Posts:
    220
    So perhaps related to the above comment would the following ...

    Feature Request:
    In Xcode you have the ability to create your own "custom code snippet". For example, I have a shortcut of nnn setup for a code snippet that will write NSLog(""); When I type nnn in Xcode it gives me code completion option showing NSLog(""); and I just hit Enter and there it is.

    I would love to see a similar feature in SI where I can type ddd and get Debug.Log(""); to show. I think Debug is the most common thing that I type all the time, over and over again.

    As an additional note for the request, in Xcode you can specify where you want the cursor to be placed when it inserts the code snippet. So I tell it to put the cursor between the two quotation marks so when the code snippet is inserted, it is already in the spot I need to start typing at.

    And if you want more info on Xcode code snippets:
    http://nshipster.com/xcode-snippets/
     

    Attached Files:

  36. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    @jshrek i think there is already basic support for code snippets see CodeSnippets folder in SI3's folder. SI3 only lack in convenient editor window for editing/addind code snippets and linking with shortucts (which might be useful)

    @Flipbookee yes i mean "surrounding with" i use relatively a lot this because i very like experimenting with some code what sometime mean commenting in/out part of code or wrapping with '()' (for casting for example) but not only i would like to have "mirroring" feature. and please dont implement this like in VS ^^ i tried customize VS and dont like their implementation for custom binding

    as for losing undo buffer i had this problem in SI 3 beta 3 i losed buffer only under compile error, but for beta 4 i implemented custom formatting slighty different and seems that everything is fine now . I had to add new property bool autoformatted in buffer class and wrap some code (i did this in SI3 beta 3 as well but now slighty different)

    BTW u have plan for adding preview for highlighted method in intellisense list of possible methods? And maybe you saw that unity 5.1 arrived with MonoDoc XML - if yes do you think on incorporating this?
     
    Last edited: Apr 17, 2015
  37. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @jshrek He, he, @Breyer is right, code snippets are already there ;)

    All code snippets are defined in individual text files inside the Plugins/Editor/ScriptInspector3/CodeSnippets folder. You can modify the existing snippets or create your own. There is also a very convenient editor for the snippets - Si3 itself :p because these are just text files. The file name defines the name of the snippet that you'd type as a shortcut and then expand it with a Tab, and it will be shown in the completions list followed by "...". Expanding from the completions list happens only on Tab or Enter/Return.

    The code snippet for Debug.Log() for example is "log" which is defined in CodeSnippets folder as log.txt. This is its content:
    Code (csharp):
    1. $ValidAsStatement$
    2. Debug.Log($end$);
    Notice how cursor position is defined with the $end$ macro! The macro at the beginning is a special one which makes this code snippet only available as statement inside the body of a method. It would work even without that, but with that Si3 prevents showing this snippet outside of a method body because that would be incorrect.

    There are other special macros like that one. The $ValidIfKeywordExpected$ macro for example is used for the "case" snippet which makes the it only available inside a switch block where the "case" keyword is available. "catch", "finally", and "else" snippets use that too.

    Another special macro is $ValidAsTypeDeclaration$ used for "class", "struct", "interface", and "enum" macros. This makes those snippets available only where a type can be declared. Similarly $ValidAsNamespaceMember$ does the trick for the "namespace" code snippet.

    There are two other very special macros used in the "base" code snippet. This one expands to a call of the overridden method in the base class using the same parameters passed to the overriding method. Extremely useful and time saving.

    One which I've added most recently is "nn" and it expands to "!= null". I use this one even more often than "log", but it lacks the validity protection so it may show in a completion list even outside of an expression. There's no macro defined for that, so I'll add one.

    If you want to change the shortcut for the "log" snippet either rename the file defining it or duplicate it with a different name.

    Code snippets don't support "code fields" or "surround with" actions yet, but that will be also added in the future.

    Oh, and if you guys come up with your own useful snippets, please share them and I'll include them in the official Si3! :D
     
  38. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    could you add option in SI preference for mirroring? i mean when i enter '(' or '[' or '{' or '<' SI3 immediately add mirror version (')', '}' etc.) just convenient thing and i think very rarely inconvenient

    and next idea: autoimplementing interface/abstract method as option in preference. Might be cool helper

    as for surround feature i propose $selection$ keyword (or selected) and special keyword for custom shortcuts because file name dont support special sign right? ({, [ , /, etc)
     
    Last edited: Apr 17, 2015
  39. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Ah yes! That's a must have feature but still not on top of my list. A naive implementation would be very simple to add but it might be annoying, so I have to do that properly which isn't that simple.

    You can edit the snippets using Si3, of course ;) and you can create new ones by adding more .txt files. What do you mean by "linking with shortcuts"?

    I see... Ctrl+K or Ctrl+/ toggles comments on full lines only... You don't like VS's implementation for customizing key bindings? I thought that's cool? :p

    Yes, there will be a tooltip showing the details of highlighted completions... I saw that, yes! So cool, finally they are including it! And yes, I do plan to add support for XmlDocs (not sure how soon though).
     
  40. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Ah, yes! That would be an exciting feature to implement :D

    Yep, $selection$ is a great choice! And you're right, a keyword will be needed for special characters.
     
  41. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    I dont remember now what exactly was annoying probably not enough flexible they forced me to use select+'/'+something while monodevelop in the past (now xamarin studio as well) allow just select+'/' and voila whole selection is commented (this applied to '{', '(' and so on as well but instead of producing /*selection*/ they produced {selection} and so on), mirroring wasnt supported i think too but not sure about it

    with linking with shortcuts i mean custom shortcuts for selected code snippets. you support very basic linking via file name but without combination (like A+Ctrl or so, random example) or with special sign like '/' etc.. I think $CustomShortcut: (or > instead of : ) place there new combination shortcut or at least one letter$ could work

    as for mirroring imo no implementation is more irritate than irritation with naive implementation :p you can always add checkbox in preference and leave it as false as default until you develop more intelligent version
     
    Last edited: Apr 18, 2015
  42. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    That's a good idea actually :rolleyes:
     
  43. kdubnz

    kdubnz

    Joined:
    Apr 19, 2014
    Posts:
    177
    Flipbookee,
    If you are looking for a challenge;
    Matching braces/brackets (by clicking)
    and code formatting would be really nice.
    I believe that code formatting is particularly important for beginners to help find errors ...

    Regards and Thanks for a great product.
    Kerry
     
    Last edited: Apr 18, 2015
    Flipbookee likes this.
  44. jshrek

    jshrek

    Joined:
    Mar 30, 2013
    Posts:
    220
    Glad my code snippet feature request is already implemented! :)
     
    Flipbookee likes this.
  45. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    @kdub Highlighting matching braces/brackets is an easy task. Let me see if I can squeeze that in quickly... Automatic code formatting is not that trivial but also doable. The biggest challenge there now since all the parsing info is already available would be the customization and adding GUI to support all the possible formatting styles. @Breyer managed to integrate a third party solution for automatic formatting which I am tempted to try using it instead of implementing my own for now.
     
  46. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    I can always send you how integration look now for me in beta 4.3. Not much changed though since my first show in PM only difference is in new property private bool autoformatted=false; and some checks in several methods related to this property for avoiding unnecesary array rebuilding or losing buffers.

    I had to change silghty 2 files nothing more. Only "string" is that my solution is "dumb" because i use compiled console provided with AStyle engine (console is available only for windows but source code is available as well, and AStyle was written with multiplatform support in mind), while AStyle have c# example on how to thightly integrate with our code (via marshalling and .dll instead of console as far as i remember). My integration support auto-format only on save.

    Since this integration was for myself and SI3 is still in beta, I didnt bother on better integration. BTW AStyle have built-in customization feature, only problem is in exposing them because AStyle have relatively huge amount of options ;)

    I belive that automatic formatting while typing is far more advanced though


    oh and definitely vote on highlighting bracket! (for '(' too, this is useful for longer mathematic operation with lots of brackets), I think rect around bracket is most visible and still clean. I completely forgot mention this as feature request and whats weird this is one of the most irritating feature missing for bigger code ^^ keep in mind "edge" case though - still highlighting bracket while manually scrolling via controller. This doesnt work in Monodevelop as far as i remember and this irritated me much when reading bigger code blocks
     
    Last edited: Apr 18, 2015
  47. cavila

    cavila

    Joined:
    Jun 4, 2013
    Posts:
    67
    I'm still seeing the line selection getting stuck every now and then. Not sure what triggers it the most. It seems to be clicking on an open editor window while unity is compiling. After that, every click on an editor window selects the whole line and puts the cursor on the following line.
     
  48. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    I think i found tiny bug: when file havent any 'using something' and i try add new one then SI3 window flicker once and throw error
     
  49. Flipbookee

    Flipbookee

    Joined:
    Jun 2, 2012
    Posts:
    2,793
    Excellent! How did I miss that?

    The fix is to change line 2537 in CsGrammar.cs from
    Code (csharp):
    1. if (tokenSet.Matches(Instance.tokenIdentifier))
    to
    Code (csharp):
    1. if (CurrentGrammarNode != null && tokenSet.Matches(Instance.tokenIdentifier))
    Thanks!

    @cavila Thanks for reporting the issue! Seems like I fully broke the triple-click with the last update :p
     
  50. rpgw

    rpgw

    Joined:
    Jul 3, 2012
    Posts:
    47
    Been using the beta for a day or so now after a few weeks with SI2.
    Such a huge improvement! Aside from a few minor things this is well on the way to surpassing MonoDevelop and SublimeText, certainly for all of my scripting needs.
    It really deserves to do very well indeed. Nice work!

    One issue I noticed very quickly was a common shortcut that seemed to be out of line with the mac standard.
    CMD-LeftArrow and CMD-RightArrow are shortcuts for 'start of current line' and 'end of current line' in OSX text applications. In SI3 they seem to be 'start of document' and 'end of document'. The home and end keys serve the expected arrow key functionality, but they aren't readily available on a mac laptop keyboard.
    So the CMD-arrow shortcuts are fully engrained in memory and lots (and lots) of jumping to the top and bottom of the document ensued. :) Changing those to OSX standard on Mac would be great.

    What do people think of disabling (if possible) the Unity undo whilst focused on the SI3 window? On mac it is CTRL-Z to undo but CMD-Z for Unity undo. This results in my frequently accidentally undoing changes I made in the Unity editor without knowing it. Sometimes important value changes in the inspector. Or perhaps CMD-Z could be undo when focused on SI3 ?

    A few times I have seen the text from all the tabs slowly creeping in from the far left and far right.

    Feature request: Ability to shift-lines up and down. So if I select some text, a keyboard shortcut will push them up and down in lines, displacing those they pass. (similar to select -> CTRL-CMD+Up/Down arrows in Sublime Text 3).

    Would also greatly appreciate the matching braces highlighting option that was mentioned above.
     
    huulong likes this.