A fix needed for auto indenting with tabs enabled.

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
Tecktron
Posts: 27
Joined: Wed Apr 10, 2013 5:17 am

A fix needed for auto indenting with tabs enabled.

Post by Tecktron »

This has been something that has been bothering me for quite some time.
When using indenting as tabs, if I go down a line to an indent and start typing, I should get tabs to that point.
The editor is not smart enough to realize that I have the option 'indent with tabs' on and creates a whole bunch of spaces instead.
If I only want to indent with tabs, why does it create all these spaces?
It's frustrating and annoying to have to keep going back and converting these spaces to tabs.
It would be nice if the editor would actually pay more attention to my preferences and insert the appropriate amount of tabs, then spaces if needed, to match my position.

Code: Select all

	function foo() {
		//This line was auto indented correctly, I added it first. I hit enter 5 times

        //Up here, I matched the indent and started typing. Note the spaces, not tabs
        	//This line's a mix of tabs and spaces, I went down to the indent and hit tab

		//I added this line next, it auto indented correctly. I will now go up 3 lines

	}
The code block above doesn't translate it too well, but you can see the line I added by moving the cursor up a position then typing added in the line with spaces.
I can send also picture.
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: A fix needed for auto indenting with tabs enabled.

Post by Aivars »

Ok I see what you mean, basically if you start typing somewhere in the middle of an empty line, you feel like the beginning of the line before the cursor should be pre-filled with tabs. I'll add it to the issues but I'm wondering whether or not such behavior might work against you in specific cases.
Blumentals Software Programmer
Tecktron
Posts: 27
Joined: Wed Apr 10, 2013 5:17 am

Re: A fix needed for auto indenting with tabs enabled.

Post by Tecktron »

Yes I have thought about this, and personally I don't like to mix spaces and tabs, as most good coding conventions suggest.
I find in most cases (99%) I'm either working with the tab indents or without them, not both.

I find that when working with tab characters, this auto-space issue is far more cumbersome to deal with (especially when writing class methods and such), than a few very specific cases in the other direction.

Thank you!
User avatar
pmk65
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: A fix needed for auto indenting with tabs enabled.

Post by pmk65 »

I noticed the same problem.
Code Indented/written in Webuilder looks nice in Webuilder, but opening it in any other editor shows that the indentation is totally screwed up due to the mix of tabs and spaces.
There are 10 types of people in the world: Those who understand binary and those who don't.
Post Reply