Author Topic: Bad Indentation  (Read 3641 times)

Offline Sasha

  • Multiple posting newcomer
  • *
  • Posts: 21
Bad Indentation
« on: October 10, 2020, 02:36:14 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Bad Indentation
« Reply #1 on: October 11, 2020, 12:00:06 am »
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!]

Offline Sasha

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Bad Indentation
« Reply #2 on: October 11, 2020, 12:05:56 pm »
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.

Offline Sasha

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Bad Indentation
« Reply #3 on: October 11, 2020, 12:18:22 pm »
To understand the Issue I have captured a short video.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Bad Indentation
« Reply #4 on: October 11, 2020, 12:19:44 pm »
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!]

Offline Sasha

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Bad Indentation
« Reply #5 on: October 11, 2020, 12:22:02 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Bad Indentation
« Reply #6 on: October 11, 2020, 06:28:20 pm »
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!]

Offline Sasha

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Bad Indentation
« Reply #7 on: October 12, 2020, 06:06:37 pm »
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.