Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Tabs for indentation, spaces for alignment... :)

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
blkohn Posted - Mar 27 2020 : 08:06:50 AM
I'm not sure if this has been requested before. I would like to see this functionality to reformat code to follow this.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 09 2020 : 12:32:14 PM
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
blkohn Posted - Apr 09 2020 : 09:35:13 AM
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.
feline Posted - Apr 09 2020 : 05:17:06 AM
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.
blkohn Posted - Apr 08 2020 : 4:37:03 PM
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

feline Posted - Mar 27 2020 : 11:46:04 AM
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.

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