Quick way to structure/layout code in notepad?

3 replies
I've always used Notepad to edit any code I need, be it, PHP, Javascript, JQuery etc. However, 99% of the time, whenever I open up someone elses code in Notepad it is always scruched up and I have to organise it before I can start editing it. Its so annoying because it can take ages to go through 100's of lines of code and I'm looking for a quick way around this.

The last thing I want to do is have to learn to use one of the more advanced notepad apps because I'm perfectly happy with the bare-bones basic Notepad, infact I love its simplicity.

So any advice on how to organise other peoples code in notepad quickly?
#code #notepad #quick #structure or layout
  • Profile picture of the author sitehero
    For anyone who may be interested in finding a way to do the same thing, I done a bit of research elsewhere and someone gave me a brilliant little sollution to this problem which is kind of obvious. I can't believe I didn't think of this myself.

    Basically, if you open a file in notepade and all the code is scrunched up making it a nightmare to edit, simple right click on the file and open it in Firefox. This will display all the code in the correct structure which you can then copy and paste over the top of the scruched up code in Notepad.

    Easy huh?

    It works for all the types of code I tried so far such as,
    • PHP
    • CSS
    • JAVASCRIPT
    • JQUERY
    • HTML
    (However, with HTML code, you first have to save the file as a different format because obviously a browser will just display the HTML as a webpage and not show the code on screen. Just 'save as' the HTML file as a .css file then open this in Firefox and it will display the code all laid out in the correct structure. Then paste this code over the original scrunched up HTML code and delete the .css file you created and job done... Hope this makes sense!)

    This solution will literally save me HOURs of un-scrunching code and laying it out correctly. Can't believe I didn't think of this before myself.
    {{ DiscussionBoard.errors[5035079].message }}
  • Profile picture of the author KirkMcD
    Or maybe just not use Notepad to begin with?
    If you only want to use what is installed on your PC, try using Wordpad instead.

    There are also plenty of free replacements for Notepad. Notepad Plus is popular.
    {{ DiscussionBoard.errors[5035103].message }}
  • Profile picture of the author Tek Scavenger
    ^^^ +1

    Go for an editor that makes highlights based on the code structures. Emacs is a popular one that's free (GNU) and has binaries on several platforms.
    Signature
    Do you Need to Make Money? Of course, we all do!
    Click for ideas to make money online at home.
    {{ DiscussionBoard.errors[5037081].message }}

Trending Topics