Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Adaptive "insert spaces/keep tabs" setting

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mwb1100 Posted - May 18 2009 : 2:45:32 PM
My preference for the tab key is to insert spaces instead of tab characters. However, I've inherited a bunch of source files that actually vary as to whether they have tabs or spaces for indenting. The team's policy is to have any edits made to a file conform to the existing usage in the file.

It's quite a pain to have Visual Studio use different behavior for different documents - my current method is to work on the files using my settings then run files that use hard tabs through an entab utility.

It would be nice if something (VAX maybe) could determine when a file is opened that it currently uses one or the other setting and would dynamically change the editor's setting for that document to match.

I have no idea if this is possible (in particular I don't know if this setting can be changed on-the-fly), but if something could, for example, detect that if 80%+ of the lines that start with whitespace start with a hard tab then change the setting for that document, it would make my life a little easier.

3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 26 2009 : 11:55:17 AM
For the IDE macro, just record an IDE macro, then turn the setting on or off. When you read the resulting macro code you often find that instead of jumping through the dialog's there is a direct VBScript call to do what you want.

IDE Tools menu -> Macros -> Record TemporyMacro

or Ctrl-Shift-R if you prefer.
mwb1100 Posted - May 25 2009 : 5:24:25 PM
Thanks for considering this (I understand about the camel's nose under the tent, though).

The macro suggestion is a good one - I'll see if I can figure out how to write such a thing and get it integrated into VS.
feline Posted - May 23 2009 : 6:55:45 PM
I have asked internally to see what people make of this idea. I have ended up working in similar situations, so I understand your problem.

If we add this to VA then it is the thin end of the wedge for code formatting, which might be a good thing or a bad thing It is a very popular request, but it is also a somewhat tricky request.

You should be able to set up a pair of IDE macro's, one to turn on inserting tabs and one to turn it off. This would let you easily change the IDE settings via a couple of keyboard shortcuts or custom toolbar buttons. I know its not the same, but you might find it helps a bit.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000