If I want to insert a line after the line in the middle, I place the cursor at the end of the line in the middle and press the Enter key. Then this happens:
The second line now has a tab before it and the new line also begins with a tab. What could possibly be the logic in that? All lines are left aligned, why in the world are tabs inserted? I have turned off all indentation check boxes in Tools->Options->Text Editor->X#->Indentation but this did not help. Of course these lines are just examples, it happens everywhere and always.
Does anyone know how to make this stop?
I think there's something wrong with modifying the indentation settings, I've also seen some fishy behavior in this area.
Please restart VS and open again the indentation settings, make sure they are all disabled again (just to be sure, enable the "Indent statements inside entities" setting and then disable it again) and go back to the editor, it should work fine now. At least here, Enter on the existing lines does leave them in the beginning as intended now.
Sorry, I can't get it to work. I did as you suggested, several times even, but no cigar. It drives me crazy and just as with the totally inadequate search option I wonder, how can people work like this? What am I doing wrong or what am I missing? Is there perhaps another setting somewhere else that controls the indenting? It seems that while all kinds of fancy stuff is added, the most basic functions do not work properly. I must say that I am seriously considering to use XIDE, providing that this has a better editor. XIDE can handle Winforms I think? Is it possible to use both VS and XIDE (not simultaneously of course) for a project?
No, I am afraid it will be extremely complicated to combine XIDE and VS in the same project, especially if you are using the winforms or WPF editor. That's not the solution, you just need to get used to working in VS, like millions other developers do (admittedly, I am not one myself though).
Does this happen with all prgs that you have? CAn you send me a prg file to give it a try with? I think you said you disabled ALL options in the indentation settings, is that right?
Thank you very much and I am sorry I did not see your reply in the other thread earlier, it would have saved me a lot of irritation. You wrote:
2) Indenting during typing is controlled by the setting in Tools/Options Text Editor/X#/Tabs. If you set the option on this page to "None" then no indenting will happen during typing. If you set it to "Block " then each line will have the same indent as the previous line.
That settings does fix it, both "Block" and "None" prevent the extra tabs. I think the "Smart" setting has room for improvement, to prevent unnecessary indenting as described.
Hi Robert,
I migrated to version 2.13.2.2 from version 2.9.1.1 and also noticed some oddities in the behavior of the VS editor, which are quite often evident. To visually show what happens when the Smart setting is enabled, I recorded a short video (attached). The video shows the pressed keys (for better analysis, it is recommended to turn on slow playback). Also attached a screenshot of the settings.
For now, I've disabled Smart mode by setting the Tabs setting to Block. But I would like to hope that in future versions the Smart mode will work better.
I posted a similar issue, that Return and Local indent on the previous line when you press <Enter> where these should remain left, aligned with Method/Function, at least IMO.
I wonder if you get the same issues as in the video when you uncheck all Indentation Settings? For me it didn't make any difference.
ic2 post=23979 userid=455 wrote:
I wonder if you get the same issues as in the video when you uncheck all Indentation Settings? For me it didn't make any difference.
When I unchecked all Indentation settings, the behavior of the editor changed inside NAMESPACE: new lines began to align relative to the previous line, regardless of what was in the line (entity definition or its body). But the behavior didn't change in any way outside of NAMESPACE (where I type the function definition at the end of the video): there is still an incomprehensible "dance" of the text.
In general, for me, the preferred type of formatting is the one that is used in VO when applying auto-formatting (CTRL+ALT+I).