Code (Format) Different in Text Editor

RobertK

Member³
:mad:
arrrrgh WHY is it so ???????
Code that looks nicely formatted, nicely lined up, looks like CRAP in plain text editor ?

I'm proud of nicely formatted code :



But opening in text editor, code actually look like this:



Makes me feel like crap :(

I hate Tabs so I never use it in code.
I disallow Tabs as you can see in my setup:



Marco, anyway to fix this ???
thanks
 
Robert,

In my opinion, not using tabs is a good step for looking the same in different editors. You might double check that there aren't tabs by putting it into an editor that can show if it's a tab or not, or finding and replacing the tabs.

Another step would be to use the same "fixed width" (meaning, for example, the "i" is the same width as "M") font in all of your editors. It looks to me like you have a variable width font in your examples, so the font looks great, but the letters don't line up vertically.

I use "Courier New" in all my editors and UNIX terminals and I don't use tabs. I think the font is kind of boring, but it's the best looking fixed width font as far as I can find and my code looks the same in all my editors. Other examples of fixed width fonts are Courier and FixedSys.

Try it out on a small example and see if it works!

Mike
 
The images you posted obviously have hard tabs. These tabs were inserted with another editor, or with PL/SQL Developer when the "Use tab character" preference was enabled.

Since you have set the tab size to 1, the appearance will be different in PL/SQL Developer compared to an editor with a different tab size.

Replace the tabs with spaces to fix this, and make sure that you only edit the sources with editors that do not use hard tabs.
 
thanks for the replies,

by Marco Kalter:
Since you have set the tab size to 1
But...as you can see, again, here, none of the 3 boxes are checked.
and also setting it to zero does NOT work, as soon as one click Apply/OK, back to 1 it goes. :mad:



by Marco Kalter:
....make sure that you only edit the sources with editors that do not use hard tabs.
:confused:
Man, I swear I only EDIT & SAVE code files with your application, I might open with text editor but that's it, not save.
(this is the whole point of my posting this)

BTW, here is my Beautifier rule - NO TABS



Marco, please confirm that your application is indeed inserting Tabs, under the same setting as mine, and please let me know how to fix this.

thanks
6.0.6.947
 
Marco, please confirm that your application is indeed inserting Tabs, under the same setting as mine, and please let me know how to fix this.
No, PL/SQL Developer will never insert tabs with these settings.
 
Back
Top