Syntax Highlighting for .bat and .cmd files and fixed width font by default.

Code Writer App Suggestions and Support Forum

Posted 6 years ago by David Moore
Avatar

I edit and create a lot of .bat  and .cmd files. The lack of syntax highlighting for these files really weakens the experience. 
Also I use spaces for indentation. This looks really bad when the default font is not fixed width.

Comments (7)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi David,

Thank you for the feedback.  May I ask for more detail on what looks bad that you see when using spaces in a non-fixed-width font?


Actipro Software Support

Posted 6 years ago by David Moore
Avatar

Without the fixed width font some code could look like this:

DISABLE_PACKAGE_CODEGEN := 1
DISABLE_DOXYGEN                := 1
NODEPS                              := 1
DONT_INCLUDE_DEP_FILES := 1
OSBUILDVERSION := 1703
P4_EXPORT_ROOT         := //us

With a fixed width font all of the values of the variables are lined up like this:

DISABLE_PACKAGE_CODEGEN := 1
DISABLE_DOXYGEN                    := 1
NODEPS                                        := 1
DONT_INCLUDE_DEP_FILES      := 1
OSBUILDVERSION                       := 1703
P4_EXPORT_ROOT                     := //us

 

With the non fixed-width fonts the letters are different widths from each other and the space characters are very narrow. This makes lining up code in an easy to read way difficult to do.

I guess if you were creating code in code writer you could line it up a bit better to start with, but still you can see in my second example it is still not perfectlt lined up. With a fixed width font it lines up perfectly.

[Modified 6 years ago]

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi David,

Yes with spaces in non-fixed-width, it's difficult to line things up properly when the spaces are in between characters (vs. at the start of the line).  It would be the same in pretty much any code editor.

In that scenario (non-fixed-width), I'd probably recommend you use tabs instead since tab stops should let you align to the tab stop X-coordinates.


Actipro Software Support

Posted 6 years ago by David Moore
Avatar

It would be the same in pretty much any code editor.

But every other code editor that I've used has a fixed width font by default.

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, 

I'm pretty sure we set Consolas as the default font, and that is fixed-width.  Either way, you can change the font in the Settings pane.


Actipro Software Support

Posted 6 years ago by David Moore
Avatar

Cambria was selected when I first opened the program.

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi David,

Thank you for reporting this.  It appears that when we added some more font options in the previous build, we didn't update the default font index.  So it pushed the default to something other than Consolas.  We've fixed this for the next build.

[Modified 6 years ago]


Actipro Software Support

The latest build of this product (v4.2.42) was released 3 years ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.