Comment & Indentation annoyance

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Comment & Indentation annoyance

Post by Tenaja »

When you have a line of code, and you use the IDE to comment it, then you hit return, the whole line is indented.

This is very annoying, especially within higher fold levels.

This is not a high priority request, but I would at least appreciate it if you added it to the list of updates to make (or consider making) when you are working on the IDE quirks.

One "simple" option with lines contains more than merely whitespace is to place the commenting "; " characters at the indentation position, like Notepad++ does. That eliminates any indentation issues. The comment sections are not as neat, but this would be preferred to the annoyance.

Thanks.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Comment & Indentation annoyance

Post by eesau »

Tenaja wrote:When you have a line of code, and you use the IDE to comment it, then you hit return, the whole line is indented.
Huh? I tried to reproduce this with 4.61 but failed. Do you mean commenting with Ctrl+B or something else?
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Comment & Indentation annoyance

Post by skywalk »

+1
I agree Folding should ignore commented lines or at least have an option to do so.
Of course, if you disable Folding, there is none applied, which is not a solution for me.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
ssb
User
User
Posts: 44
Joined: Wed Jun 21, 2006 11:09 am

Re: Comment & Indentation annoyance

Post by ssb »

skywalk wrote:I agree Folding should ignore commented lines or at least have an option to do so.
+1
Count my vote for this!
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Comment & Indentation annoyance

Post by Tenaja »

I know I wrote "Fold levels," but what that translates to, and maybe I should have used, was "indentation levels."
void
Enthusiast
Enthusiast
Posts: 116
Joined: Sat Aug 27, 2011 9:50 pm
Location: Washington, USA

Re: Comment & Indentation annoyance

Post by void »

I've also experienced this.

It would be nice if the auto-indent feature disregarded lines that start with ;
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Comment & Indentation annoyance

Post by Zach »

I prefer my comments to line up with the lines they are related to, imho..

What really irks me is when I either start commenting as I write, or go back and comment some code that is indented and the comment does NOT indent, but defaults to the outside margin.
This also happens with code sometimes, I guess due to the auto-indentation mucking it up.. Sometimes I prefer to insert indentations in my code / comments..

I guess I could just turn it off and let my cursor pos. fall where it may; but that is a lot of extra work to indent then go back and unindent on the next new line(s), etc..


What would be really nice is having some kind of flexible, learning indentation. If that's even possible.
Post Reply