News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Bad Indentation

Started by Sasha, October 10, 2020, 02:36:14 PM

Previous topic - Next topic

Sasha

Why sometime Indentation not works properly? Because I got a white space in the block when I press "TAB" key.
It is very annoying because I want a text marker to jump outside the block when I press "TAB" key.

Example:
#include <iostream >

In this example I wanted the text marker to jump after ">" but it creates a white space in the block. After this this I need to manually use the mouse or direction key to make it move outside the block and delete the white space.

oBFusCATed

This is how programming editors work.
Tab and space key are used for indenting.
If you want to skip words you'll have to use ctrl-left/right arrow keys.

Why do you expect the behaviour you expect? Why do you think this is the normal behaviour?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Sasha

Because TAB and SPACEBAR are different keys and should not be used for the same reason.
I always use SPACE bar to create white space and CTRL+SPACEBAR for creating 4 white spaces directly.
The TAB key is very comfortable to use it to jump out side the block and ENTER new line to start typing new code.
In CB it is working fine sometimes as I want it to be, But not all the times.
I can record the video to submit, I am not sure if this is a bug.

Sasha

To understand the Issue I have captured a short video.

oBFusCATed

No, need for a video. Tab does indentation in all programming editors I've used.
What editor have you used before where TAB is used for navigation and not indentation?

I'm only interested for a reference or historical understanding of editors.
I doubt we'll change current behaviour.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Sasha

indentation inside block in VS is always working fine and not creating any spaces. In CB it works fine as well but not all the times.

oBFusCATed

This is an interaction with the CC I guess.
On the first line most probably you have include completion triggering.
On the second you've mistyped "include", so include completion doesn't trigger and so indentation is inserted.

You'll have to show a video of VS which doesn't behave like this in no CC/inteli-sense context.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Sasha

It behaves the same sometime even if there are no spell errors.
I deleted VS when I installed CB and I don't have VS installed at the current time because CB is more comfortable to work with, only need some Improvements.