Messy code formatter

Post your requests and ideas on the future development of mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
SpiderKenny
Posts: 6
Joined: 23 Jan 2012 13:44

Messy code formatter

#1 Post by SpiderKenny » 23 Jan 2012 13:49

I wish the compiler, or rather the IDE, would have some of the long standing bugs in it's formatter fixed.

For example, if you set the editor to use TABS instead of spaces, then the option to match brackets and braces highlights the matching bracket/brace in the wrong place.

If you set the editor to use TABS instead of spaces, then the syntax error underline (red squigly line) appears in the wrong place.

If you are using tabs instead of spaces, and set tab size to 4 then pressing TAB sometimes gives your 2 columns per press, sometimes 4.

SpiderKenny
Posts: 6
Joined: 23 Jan 2012 13:44

Re: Messy code formatter

#2 Post by SpiderKenny » 24 Jan 2012 11:09

Here is an example of the messy code formatter.
This is my project before I save and close it.
Image

The I simply close the IDE and open it again, and now my code looks like this:
Image

I know it's not the end of the world. But proper code layout is important and this just saps development time!

To be honest, I'd rather be able to use something like NetBeans or Eclipse as the IDE - they have had years of development and are very good editors, with the Mikro-e compilers, which are great.

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Messy code formatter

#3 Post by janko.kaljevic » 24 Jan 2012 13:03

Hello,

We have not encountered similar behavior before.

Please can you take a print screen of the Editor Options window (both Display and Options tab).
Also if you can please post here project that describes this behavior.

Did you changed Editor options before opening your project?

Best regards.

M14
Posts: 8
Joined: 18 Sep 2008 23:13

Re: Messy code formatter

#4 Post by M14 » 05 Mar 2012 19:41

I am experiencing the same messy thing with the tab's. I configured 'Tab Width' on 2, so each tab should be 2 characters. For some reason it shifts 1 character at random lines, with a big mess and extra work as result. I also think there are to much settings for the formatting. Writing all the code in Notepad++ saves a lot of stress ;).

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Messy code formatter

#5 Post by filip » 06 Mar 2012 10:27

Hi,

Have you turned off Smart Tabs from the Advanced Editor Options in the Tools menu ?

Regards,
Filip.

M14
Posts: 8
Joined: 18 Sep 2008 23:13

Re: Messy code formatter

#6 Post by M14 » 06 Mar 2012 19:38

Both 'Smart tabs' and 'Want tabs' are turned off. What is the use of that last option?

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Messy code formatter

#7 Post by filip » 08 Mar 2012 11:54

Hi,

Here is the description of the Want Tabs option :
The WantTabs property specifies whether Tab is handled by the component or by the form. If WantTabs is true, TAB inserts the tab character into the component’s text.
If WantTabs is false, Tab moves the input focus to the next control in the tab order
Regards,
Filip.

syedadeel2
Posts: 7
Joined: 23 Apr 2012 08:35

Re: Messy code formatter

#8 Post by syedadeel2 » 29 Jan 2015 04:44

Hello,

Please use this for mikroC code formatting here is the http://techguys.itshell.net/19-all-cate ... -formatter.

Dominic75
Posts: 87
Joined: 05 Oct 2012 23:37
Location: Quebec, Canada

Re: Messy code formatter

#9 Post by Dominic75 » 29 Jan 2015 05:28

We have not encountered similar behavior before
http://www.mikroe.com/forum/viewtopic.php?f=97&t=63209

Look through the board, you will see that it's happening very often. (And someone took the time to make a tool to format the file, that tells me that it's not something new...)

I also don't understand how changing the option should affect the file after a close/open. If the file is opened, and it has a format, why a close / reopen should change the format?

syedadeel2
Posts: 7
Joined: 23 Apr 2012 08:35

Re: Messy code formatter

#10 Post by syedadeel2 » 29 Jan 2015 05:43

Dominic75 wrote:
We have not encountered similar behavior before
http://www.mikroe.com/forum/viewtopic.php?f=97&t=63209

Look through the board, you will see that it's happening very often. (And someone took the time to make a tool to format the file, that tells me that it's not something new...)

I also don't understand how changing the option should affect the file after a close/open. If the file is opened, and it has a format, why a close / reopen should change the format?
This is not new Dominic75, they always say will send the issue to developer and then nothing... Their Editor is created in Delphi and i investigate the issues in their.

i emailed them long one which issues and even said that i can do remote session to show your developer a list of issues and can help your developers to fix it. but no response. so i finally created my own little code formatter as i post the link above post. they never listen.....

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 Wish List”