HighDots Forums  

Suggestions for formatting code so it's easy to read

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Suggestions for formatting code so it's easy to read in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sammymocha
 
Posts: n/a

Default Suggestions for formatting code so it's easy to read - 11-23-2004 , 12:43 PM






I use the DW code view about half of the time. I like to indent with the
spacebar so it's easier to read. When I open the file later in, say, notepad,
my formatting is pretty much gone. I'm not asking for color, but is there a way
to keep the spacing or are there other ways to make my file easier to read?
Also, perhaps some formatting conventions that will help with this? I open
source code on some sites and it's so clean looking. How do they do it? Thanks
in advance! Anne


Reply With Quote
  #2  
Old   
SnakEyez
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-23-2004 , 12:50 PM






Unforunately, I don't know how to get Notepad to format documents. But I do
know that if you open the file in other editors it should show the proper
formatting. Programs like Notepad are nothing like Web page editors which is
why they interpret the data differently and like I said before I don't think
there is anyway to change this.


Reply With Quote
  #3  
Old   
Heather
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-23-2004 , 12:58 PM



Any formatting you do to any document will be 'erased' once you drop it into
Notepad. If you're looking for a Web Page editor to work on your code,
other than Dreamweaver, the only one I can think of at the moment is TextPad
(http://www.textpad.com/) .

--
Heather

--------------


"sammymocha" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I use the DW code view about half of the time. I like to indent with the
spacebar so it's easier to read. When I open the file later in, say,
notepad,
my formatting is pretty much gone. I'm not asking for color, but is there
a way
to keep the spacing or are there other ways to make my file easier to
read?
Also, perhaps some formatting conventions that will help with this? I open
source code on some sites and it's so clean looking. How do they do it?
Thanks
in advance! Anne




Reply With Quote
  #4  
Old   
Lars Forslin
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-23-2004 , 04:34 PM



Edit Pad is great too. http://www.editpadpro.com/ There is even a free lite
edition.
/Lars

"Heather" <starlet5743 (AT) yahoo (DOT) ca> skrev i meddelandet
news:cnvton$5e5$1 (AT) forums (DOT) macromedia.com...
Quote:
Any formatting you do to any document will be 'erased' once you drop it
into Notepad. If you're looking for a Web Page editor to work on your
code, other than Dreamweaver, the only one I can think of at the moment is
TextPad (http://www.textpad.com/) .

--
Heather

--------------


"sammymocha" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:cnvsre$4d5$1 (AT) forums (DOT) macromedia.com...
I use the DW code view about half of the time. I like to indent with the
spacebar so it's easier to read. When I open the file later in, say,
notepad,
my formatting is pretty much gone. I'm not asking for color, but is there
a way
to keep the spacing or are there other ways to make my file easier to
read?
Also, perhaps some formatting conventions that will help with this? I
open
source code on some sites and it's so clean looking. How do they do it?
Thanks
in advance! Anne






Reply With Quote
  #5  
Old   
Nadia *TMM*
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-23-2004 , 07:25 PM



Have you looked at COMMANDS>Apply source formatting option. Also, somewhere
in the preference you can change the way the source is formatted (not sure
right now - not at my own pc).

--
Nadia
---------------
http://www.DreamweaverResources.com
Free Templates | Free Nav Bar Sets
Dropdown Menu Designs | CSS Layouts
Tutorials | Ecommerce - YVStore | SEO Articles|
------------------------------------------------
Team Macromedia Volunteer for Dreamweaver
http://macromedia.com/devnet/mx/dreamweaver/
http://www.macromedia.com/support/dreamweaver/technotes.html
-----------------

"sammymocha" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I use the DW code view about half of the time. I like to indent with the
spacebar so it's easier to read. When I open the file later in, say,
notepad,
my formatting is pretty much gone. I'm not asking for color, but is there
a way
to keep the spacing or are there other ways to make my file easier to
read?
Also, perhaps some formatting conventions that will help with this? I open
source code on some sites and it's so clean looking. How do they do it?
Thanks
in advance! Anne




Reply With Quote
  #6  
Old   
jjs
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-24-2004 , 11:37 AM




" Nadia *TMM*" <nadia@no-junk=dreamweaverresources.com> wrote

Quote:
Have you looked at COMMANDS>Apply source formatting option. Also,
somewhere in the preference you can change the way the source is formatted
(not sure right now - not at my own pc).
You can set the default indentations in DM under Preferences. (You can set a
number of other options there, too, such as forcing wrap, break on table
defs, and soforth.)

Preferences is your friend.




Reply With Quote
  #7  
Old   
wwiivehicles.com
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-24-2004 , 11:42 AM



Unfortunately that doesn't work on formating ASP code in the pages.

" Nadia *TMM*" <nadia@no-junk=dreamweaverresources.com> wrote

Quote:
Have you looked at COMMANDS>Apply source formatting option. Also,
somewhere
in the preference you can change the way the source is formatted (not sure
right now - not at my own pc).

--
Nadia
---------------
http://www.DreamweaverResources.com
Free Templates | Free Nav Bar Sets
Dropdown Menu Designs | CSS Layouts
Tutorials | Ecommerce - YVStore | SEO Articles|
------------------------------------------------
Team Macromedia Volunteer for Dreamweaver
http://macromedia.com/devnet/mx/dreamweaver/
http://www.macromedia.com/support/dreamweaver/technotes.html
-----------------

"sammymocha" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:cnvsre$4d5$1 (AT) forums (DOT) macromedia.com...
I use the DW code view about half of the time. I like to indent with the
spacebar so it's easier to read. When I open the file later in, say,
notepad,
my formatting is pretty much gone. I'm not asking for color, but is
there
a way
to keep the spacing or are there other ways to make my file easier to
read?
Also, perhaps some formatting conventions that will help with this? I
open
source code on some sites and it's so clean looking. How do they do it?
Thanks
in advance! Anne






Reply With Quote
  #8  
Old   
sammymocha
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-24-2004 , 05:51 PM



Is there any way for me to control code formatting when source code is viewed
from a browser? For example, nested tables staying indented. Besides being
easier to read when I work on it, I'm realizing that all the work I do will be
examined by potential employers, so I want to do it right. Thanks so much!


Reply With Quote
  #9  
Old   
Heather
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-24-2004 , 06:37 PM



As far as I know, there isn't any way to do that in IE, but with FF and
Netscape, the code is colour-coded and usually (not always, in my
experiences) the formatting stays in place. I never use IE to view the
source anymore. It's much easier in FF and Netscape.

--
Heather


"sammymocha" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Is there any way for me to control code formatting when source code is
viewed
from a browser? For example, nested tables staying indented. Besides being
easier to read when I work on it, I'm realizing that all the work I do
will be
examined by potential employers, so I want to do it right. Thanks so much!




Reply With Quote
  #10  
Old   
sammymocha
 
Posts: n/a

Default Re: Suggestions for formatting code so it's easy to read - 11-24-2004 , 07:18 PM



For example, this forum page - the one we're using. Or any mainstream site -
apple, amazon, etc. If you 'view source' you see nice code with indents all
lined up neatly. I don't think it's controlled by which browser you are in,
they all have some way of making their code line up. I have a feeling this is
probably a no-brainer kind of thing, since everybody does it. Am I looking for
a complicated answer to an easy question? Such as when you indent with a
spacebar, is that simply the way they all do it? I think the DW code editor is
great - I sure hope I don't have to change. Thanks so much!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.