gil900

Font mode for SciTE that will that will make "_" (underscore) look short as a dot (".")

9 posts in this topic

#1 ·  Posted (edited)

In many cases, it is necessary to define subgroups... For example If I have some sub-system that  contains a number of functions..

In C++ I could create the sub-system as a class and in the class I write the function. The main goal is to have syntax that looks elegant, and understandable
like this:

subsystem.function1()

 

But in Autoit we can't use the dot as a mark to display this logic  structure.

 

In Autoit all I can do is create file named subsystem.au3 and in that file write any function like this

Quote

subsystem_function1()

 

BUT,  the underscore is disgusting, ugly, not elegant and the worst part is that it takes lot of space on the display.

So my idea is edit this character only to make it much shorter.

SciTE use the "Courier New" font. so I edited the file "cour.ttf" In "C:\Windows\Fonts" and make it shorter.

I attached the file here so you can use it also. But I strongly recommend  to make backup to the original file before doing this!

 

This is how it will look after the mod:

 

Screenshot_2.png

 

Download the modified font:
cour.ttf

EDIT: Don't download this font. it does not looks like in the recent images.

 

have a nice time!  Hope I gave something useful.

 

NOTE: the only problem that is not so seriously  is that it affect  any editor that use this font! If there is a way to tell SciTE to use specific font file then that would be betterPlease tell how to do it if it possible.  Thank you!

 

 

Edited by gil900

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

3 hours ago, gil900 said:

BUT,  the underscore is disgusting, ugly,

That is an emotion, but in my humble opinion an Editor should show a Underscore when the file contains an Underscore and ONLY should show a DOT when the character is actually a dot.

Recommendation: Get over your "Underscore is ugly" issue. ;)

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

it is not only emotion. it is also something practical (if that's the word) - it takes a lot of pixels on the screen. And I use 99 of the time for the purpose I I've described here .. and for that purpose there is no reason why using so much space(pixels). Because it takes Much space, I forced to think more about how to shorten the names of variables or functions -  Then it makes the code less understandable (statistically). And all of this only because of one character.. I can pay the cost of making it not real Underscore because what I get as return is worth it.
In Autoit the DOT

symbol  mostly can't serve this purpose so I do not expect I'll use the dot symbol an a way that may cause confusion.
And if you have good eyes  or glasses (That's how you should deal with the problem .. with glasses) then you should not get confused because there are differences between the signs. In addition, in the most critical scenarios, the editor set to show the DOT sing and  in red/different color. so If you can't see the  so you can see the difference with the help of the editor itself.   BUT, Still, I think it's a good idea to change a bit the Underscore. but then it will not looks like Underscore. but again - who cares? Do you ever use this sing for non-technical purposes You're probably not going to use this mark anyway for thing other then programing or technical stuff.. But if you/I do, then that brings me back to the previous question - HOW I can set in ScITE to use specific font file?

Share this post


Link to post
Share on other sites
1 minute ago, gil900 said:

HOW I can set in ScITE to use specific font file?

SciTEConfig has the option to do this or else make the appropriate changes to SciTEUser.properties manually.

Jos 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

8 minutes ago, Jos said:

SciTEConfig has the option to do this or else make the appropriate changes to SciTEUser.properties manually.

Jos 

SciTEConfig allow me to choose the fonts that available and  installed in Windows. I can't rename the modified font to something else so I forced to overwrite the default font with that name.. so I need to SciTE allow me to select the font by browsing to custom location were I store the modified font file..

It is possible? 

Edited by gil900

Share this post


Link to post
Share on other sites
38 minutes ago, spudw2k said:

If space/pixel real-estate is that important, why not use camelCase?
or PascalCase

 

I use it to create a name for the variable/function. but not to visualise scopes  separations (I hope I have described it right ).
For visualise scopes separations there is need for extra way to do it..
In the example image on the first post here - The third line is not my style.. I worte it just to show that the option to do it like this ( with no capital letters) is there also.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

It seems a lot better now :P
isn't it ?

Screenshot_3.png

Screenshot_5.png

Screenshot_4.png

 

I fixed the big problem. - Now there is no need to overwrite an existing font. I created a new font with a different name and set SciTE to use this font :) 

So it will now effect only on SciTE (and not any other editor as before)

 

NOTE that It may not seem that way, but the new symbol takes even less space then the DOT symbol and of course, much much less space  than the normal underscore symbol. So it is more  efficient  in this sense.
Also, it is more efficient for the eyes - the letters appear much clearer with this font.

Edited by gil900

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now