3 Replies Latest reply on May 18, 2010 8:57 AM by Randy Edmunds

    Creating an Empty Document

    HenryHartley

      I am now using Dreamweaver (CS5) as my main code editor. I use it for HTML, CSS, Javascript, Perl, PHP, Python, ASP, SQL, and pretty much any file that is in plain text. An annoyance I've found is that there doesn't seem to be a way to open a new file that is completely empty. There seem to be dozens of file templates that I can choose from and if I were mostly creating HTML files, that would be great. But I usually want to create a totally blank file. Not a file that displays as blank in a browser but that is blank in Dreamweaver Code View. Is that possible? If so, how?

       

      --

      HHH

        • 1. Re: Creating an Empty Document
          Randy Edmunds Adobe Employee

          Is this something that you'll do very often? If not, just start with the standard "new" file and, in Code View, hit Ctrl+A (to sleect all) and then Delete.

           

          If you want to change the default file that you get for "new" every time, then edit the Configuration/DocumentTypes/NewDocument/default.* file for the associated file type.

           

          Or you could start with a new Text file and then rename it to .htm .

           

          HTH,

          Randy

          1 person found this helpful
          • 2. Re: Creating an Empty Document
            HenryHartley Level 1

            Yes, it's something I do a lot.Certainly deleting the content of the new file isn't a huge deal but it just seems silly.

             

            Oddly, in Configuration/DocumentTypes/NewDocument/ there was only one file, Default.pl, so that wasn't very helpful. I tried adding a blank document and naming it Default.php and then setting Dreamweaver to open a new file as a PHP file but that did nothing.

             

            I hadn't tried opening a Text file (listed under Other on the new file dialog). That's what I want. I changed the default for <ctrl><n> to open a new text file (I have Show New Document dialog box on Control+N unchecked) and now I'm all set. If I want a particular template, I'll use <alt><f><n> and pick from the dialog, otherwise, I can do <ctrl><n> and get a blank document. Thanks.

            • 3. Re: Creating an Empty Document
              Randy Edmunds Adobe Employee

              Henry,

               

              Glad to hear that you've figured out how to do what you want.

               

              Oddly, in Configuration/DocumentTypes/NewDocument/ there was only one file, Default.pl, so that wasn't very helpful. I tried adding a blank document and naming it Default.php and then setting Dreamweaver to open a new file as a PHP file but that did nothing.

               

              There are 2 Configuration folders. It sounds like you found the "User" Configuration folder, which is where you should be making all of your changes. You should find all of the default documents in the "Application" Configuration folder under the installation folder. Those files should be copied to the user config folder before modifying them.

              I hadn't tried opening a Text file (listed under Other on the new file dialog). That's what I want. I changed the default for <ctrl><n> to open a new text file (I have Show New Document dialog box on Control+N unchecked) and now I'm all set. If I want a particular template, I'll use <alt><f><n> and pick from the dialog, otherwise, I can do <ctrl><n> and get a blank document. Thanks.

               

              Here's cool trick that should help you out:

               

              1. Turn OFF the preference to "Show the New Document  dialog box on Control+N"

              2. In the Files Panel, press <ctrl><n> to get a new document

              3. By default, you'll get an HTML file named something like "untitled.html", and you'll be in Rename mode.

              4. Change the file extension so it's "untitled.css", and hit Enter

              5. Open the file and you'll see that DW changed the contents so it's the default CSS (not HTML) file

               

              Very cool. Note that this only works from the initial Rename mode.

               

              Hope this helps,

              Randy