Sysprogs forums › Forums › VisualGDB › formatting with visualGDB 5 is REALLY crap! (sorry..)
- This topic has 28 replies, 6 voices, and was last updated 7 years, 4 months ago by Rumchiller.
-
AuthorPosts
-
October 29, 2015 at 11:14 #7121MartijnParticipant
I like the new intellisense features in VisualGDB 5, but it give me also new formatting options.
And these options are preventing me from using the new intellisense features at all, because I only can enable all at once or none.
I would REALLY like the use the formatting options visual studio gives me by default. They give me much more freedom then when I use the new VisualGDB version.
But I actually like a lot of options in visualGDB, but I really hate that visualGDB broke my formatting options and I can’t get them the way I want!
PLEASE make the formatting options an optional feature to use. This is really holding me back to use the full capability of visualGDB.
edit: It is mainly the indentation of braces after an if statement. I don’t want indentation there!
- This topic was modified 9 years, 1 month ago by Martijn.
October 29, 2015 at 12:30 #7124MartinBonnerParticipantAh! I had wondered what was breaking my formatting. Mixing formatting up with IntelliSense is a mistake anyway, and not allowing people to control it is really poor.
October 30, 2015 at 23:23 #7127supportKeymasterHi,
The Clang IntelliSense includes formatting because switching the IntelliSense engine actually also disables the original formatting. Normally VisualGDB should import your VS settings and format your code accordingly. If it does not happen, we will certainly fix this. Could you give an example of a code formatted with our IntelliSense, with original IntelliSense and a screenshot of your VS indentation settings? This should allow us reproduce the problem and fix it.
November 2, 2015 at 09:26 #7147MartinBonnerParticipantAs an example of the sort of problem I am getting, my usual style of formatting is:
if (test) { foo(); }
However, with Clang intellisense, as soon as I hit “{” on a new line, it gets indented to:
if (test) {
I know there are some people that like that style of indenting, but I AM NOT ONE OF THEM!
November 3, 2015 at 04:51 #7151supportKeymasterHi,
The brace formatting is controlled by a Visual Studio setting under Tools->Options->Text Editor->C/C++->Formatting->Indentation->Indent Braces:
Please double-check that it’s not enabled for you. If it is disabled, but VisualGDB still formats the code incorrectly, please let us know which version of Visual Studio you are using so that we could suggest further diagnostic steps.
November 3, 2015 at 16:26 #7153MartinBonnerParticipantYes it is clear. The Visual Studio information is appended to this message.
The problem appears to be that when I type
if (a)<ENTER>
it is formatted as:
if (a) <caret here>
(whichever Intellisense is active). If I then type “{“, the native Intellisense undoes the indent, but Clang doesn’t (both insert the trailing “}”. So I get either
if (a) {}
or
if (a) {}
If I then start typing new lines of code, I get another level of indentation from the {, so Clang looks like:
if (a) { b; }
(Any differences between this report and the previous one, boil down to me actually looking at what is on the screen, rather than mis-remembering. Sorry!)
- This reply was modified 9 years, 1 month ago by MartinBonner.
- This reply was modified 9 years, 1 month ago by MartinBonner.
November 3, 2015 at 19:39 #7157supportKeymasterHi,
Thanks, that explains it. The Clang IntelliSense updates the bracket indentation when it sees both the opening and the closing bracket. By default when you type ‘{‘, the IntelliSense automatically inserts the ‘}’ and formats both of them according to your settings. Looks like you have disabled this feature via Tools->Options->Text Editor->C/C++ (VisualGDB)->Advanced->Typing Assist->Auto-match brackets.
We recommend enabling it back to get better formatting. We have also added a fix to the upcoming v5.1 version that will automatically un-indent the braces when bracket matching is disabled. Let us know if you want to try a pre-release build with this fix.
November 4, 2015 at 09:50 #7163MartinBonnerParticipantSorry, nope. Auto-match brackets is set to “True”.
November 6, 2015 at 18:45 #7167supportKeymasterOK, strange. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.1.0.581.msi
Open the Clang IntelliSense diagnostics console, clear it, type the opening brace and observe the console output. Does it mention anything about the event being suppressed?
We have also added a fallback mechanism that should fix the indentation even if the auto-pairing did not get invoked.
July 20, 2016 at 17:16 #8676jimPParticipantWas this issue ever resolved? I am having a similar issue. It looks like when smart indenting is turned on VisualGDB seems to override ‘Indent namespace contents’ under C/C++->Formatting->Indentation. So every time I hit <Enter> my cursor is automatically tabbed while I am inside the namespace block.
- This reply was modified 8 years, 5 months ago by jimP.
July 21, 2016 at 06:02 #8681supportKeymasterHi,
We have just rechecked that and confirm that the namespace content indentation follows the generic “indent braces” setting. We have fixed it in this build: http://sysprogs.com/files/tmp/VisualGDB-5.2.5.954.msi
July 21, 2016 at 18:44 #8686jimPParticipantThat seems to have fixed it. Thanks!
April 8, 2017 at 00:19 #10934thedixonParticipantPardon for pulling out old topic, but I am confused by it. Currently VS behaves like so:
when I type namespace asdf { and hit enter, it goes to the column 1 (I have indent namespace contents set to no). But after I finish typing the codeline and type finishing semicolon, line gets spacing inserted in front.
goes from this
namespace asdf {
some_code
to this
namespace asdf {
[space inserted here]some_code;
How can I fix it, I don’t want content of my namespaces to be indented.
- This reply was modified 7 years, 8 months ago by thedixon.
April 8, 2017 at 01:23 #10938supportKeymasterHi,
Thanks, looks like our bug. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.2.16.1462.msi
April 10, 2017 at 13:15 #10952thedixonParticipantConfirmed fixed
-
AuthorPosts
- You must be logged in to reply to this topic.