Author |
Topic  |
|
cmartel
New Member

4 Posts |
Posted - Aug 18 2020 : 6:21:33 PM
|
Environment Microsoft Visual Studio Community 2019 Version 16.6.3 VisualStudio.16.Release/16.6.3+30225.117 Visual Assist 10.9.2353.0
Visual Studio's Text Editor settings for C/C++ > Tabs is set to "Keep Tabs". The project has an .editorconfig overriding this through indent_style = space.
Repro steps 1. Open the .h file (and only that) from C++ header/cpp pair. 2. Add a function declaration (or anything that'll allow a Refactor snippet) to the .h file. 3. From VAX's Quick Actions and Refactorings, choose "Create Implementation".
Result: The corresponding .cpp is opened and the Refactor snippet is inserted, but using tabs instead of spaces. Expected result: The snippet is inserted with spaces as per the .editorconfig override.
Do note that if the .cpp document is already open, refactoring will correctly use spaces instead of tabs. Likewise, if the C/C++ setting is set to spaces instead of tabs, it'll insert spaces even after automatically opening the document.
I'm not sure if this is a VAX or a VS issue as I don't recall noticing this behaviour before I updated VS2019 sometime in the last month, but because it involves VAX refactoring, I figured I'd let you know.
Thanks again for VAX and keep up the good work! :) |
|
feline
Whole Tomato Software
    
United Kingdom
19137 Posts |
Posted - Aug 19 2020 : 10:36:21 AM
|
I am seeing the same effect here.
case=142807
If it helps, after running Create Implementation the generated code is still selected, so you can use the IDE format selection command, CTRL-K, CTRL-F by default, to reformat the code according to the .editorconfig settings. Not ideal, but this should help a bit when you notice this happening. |
zen is the art of being at one with the two'ness |
 |
|
|
Topic  |
|
|
|