Author Topic: Visual Basic Formatting Options  (Read 2931 times)

acgattegno

  • Guest
Visual Basic Formatting Options
« on: May 27, 2009, 06:09:15 pm »
I hope this is a dumb question, because the alternative annoying. :)

I'm trying to use SE to edit .vb file (VS2008).  I have Visual Basic language Adaptive Formatting turned on, I have Keyword Case checked, and Formatting | Keyword Case set to Capitalize First Letter.

It doesn't.

I have a similar setup for SQL except as UPPER CASE and it works fine.  Changing VB to be configured for upper case doesn't.  It's as if the formatting just isn't working in VB.

Any ideas?  I couldn't find anything when I searched the fora.

acgattegno

  • Guest
Re: Visual Basic Formatting Options
« Reply #1 on: May 27, 2009, 06:21:48 pm »
Nevermind.  It would appear that even though I had the settings all set up, Adaptive Formatting had to see enough files to discover it for itself and thus enable it.

Now if only I could get rid of the dumb popup to select a keyword when I key in "o <space>" (yes, I named a local variable "o") and not have it insert "StringReader" for "String" when I'm keying in a CType() call and key the end-parens -- as in CType(foo, String) expands to CType(foo, StringReader) when I type the close parens.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Visual Basic Formatting Options
« Reply #2 on: May 27, 2009, 06:59:52 pm »
Adaptive Formatting analyzes each file when it is opened to determine what settings match that file. It then overrides the formatting options you have specified so that your edits match the style of the code already in that file.

With your options set as you described, it sounds like Adaptive Formatting is overriding your Formatting setting because the file you are editing is not using keywords with capitalized first letters. Of course, I'd have to see the file to know for sure.

If you always want SlickEdit to use Capitalize First Letter, regardless of how the existing contents of the file are formatted, then you should uncheck "Keyword case" in Adaptive formatting or turn off Adaptive Formatting.