Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Tabs for indentation, spaces for alignment... :)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

blkohn
New Member

USA
5 Posts

Posted - Mar 27 2020 :  08:06:50 AM  Show Profile  Reply with Quote
I'm not sure if this has been requested before. I would like to see this functionality to reformat code to follow this.

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Mar 27 2020 :  11:46:04 AM  Show Profile  Reply with Quote
You are probably looking for the IDE setting:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Tabs -> Insert spaces
IDE tools menu -> Options -> Text Editor -> C/C++ -> Tabs -> Keep tabs

and the IDE commands:

IDE Edit menu -> Advanced -> Tabify Selected Lines
IDE Edit menu -> Advanced -> Untabify Selected Lines

VA is happy either way. But be aware that if you are using VA Snippets to insert blocks of text, we will insert them as set, so if they are filled with tabs or spaces that is what we will insert. Just something to be aware of if you encounter unexpected tabs / spaces in your editing.

zen is the art of being at one with the two'ness
Go to Top of Page

blkohn
New Member

USA
5 Posts

Posted - Apr 08 2020 :  4:37:03 PM  Show Profile  Reply with Quote
No, that is not what I mean at all. Perhaps reading this might clarify my request: https://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 09 2020 :  05:17:06 AM  Show Profile  Reply with Quote
Generally we try not to get involved with code formatting, because it feels like everyone has their own individual requirements for code formatting, making it a very complex area. This is a good example of this. The idea makes sense, but I don't think I have come across it before.

zen is the art of being at one with the two'ness
Go to Top of Page

blkohn
New Member

USA
5 Posts

Posted - Apr 09 2020 :  09:35:13 AM  Show Profile  Reply with Quote
That's a shame to learn. Resharper does this: https://www.jetbrains.com/help/resharper/Reference__Options__Languages__CSharp__Formatting_Style_Tabs_and_Indents.html. I had hoped Visual Assist would as well.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 09 2020 :  12:32:14 PM  Show Profile  Reply with Quote
Are you looking for support in C++ or C# or both?

If you are looking for C++, have you turned On:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> General -> Enable ClangFormat support

if you have, have you ever used ClangFormat before? Having a look at the page:

https://clang.llvm.org/docs/ClangFormatStyleOptions.html

suggests that the following ".clang-format" file, placed in your solutions root directory, should help.

# top level Clang Format file
Language: Cpp
TabWidth: 4
UseTab: ForContinuationAndIndentation


explained just above:

https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000