Author Topic: C# problems  (Read 832 times)

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
C# problems
« on: October 20, 2015, 04:24:47 pm »
(I believe these issues existed in previous versions of Slickedit, but have not been fixed in the beta)

1. When editing a C# file, as soon as I type "class " and hit space, it automatically fills in the class name (from the file name). It even does this on nested classes. I have not found which auto-correct or auto-complete option controls this, but I would like to disable this behavior, without affecting my other auto-correct/auto-complete settings. I can see an argument that it is "proper" C# style, but it's definitely wrong on nested classes, and we do have situations where we don't strictly obey "proper" C# style rules, and I would like my editor to respect that.

2. In a C# file, when a class is nested (either in another class, or in a namespace) and auto-complete performs syntax expansion on the class (putting in braces and hotspots), the hotspot indicator displays incorrectly, as seen in the attached screenshot.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1007
  • Hero Points: 86
Re: C# problems
« Reply #1 on: October 20, 2015, 04:42:11 pm »
For #2, I can reproduce that;  it looks like it has something to do with using tabs for indents, as I can't get it to happen with the default settings.  I'm looking in to it.

For #1, it may be late for an extra ui setting for that, but a viable workaround would be to go to Document -> C# Options -> Aliases, add an alias for "class" like this:

Code: [Select]
class %\c {
%\i%\c
}

    The alias overrides the hard coded syntax expansion.  Interestingly enough,  the hot spots don't get mangled for this alias expansion, it's something specific to how the syntax expansion does it - another clue for me.

   Thanks for the report.

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: C# problems
« Reply #2 on: October 20, 2015, 05:22:12 pm »
Thanks for the alias workaround--that works great!

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1007
  • Hero Points: 86
Re: C# problems
« Reply #3 on: October 23, 2015, 02:03:38 pm »
#2 fixed for the next build.
#1 is only partially fixed - no setting to disable it yet, but now it doesn't fill out the class name for nested classes at least.