开发者

XHTML doctype template for Notepad++

开发者 https://www.devze.com 2023-02-04 04:23 出处:网络
When I create a new file on npp its just a blank document, can I make it generate an html doctype strict/transitional like how dreamweaver does with the premade t开发者_Python百科emplates?You can achi

When I create a new file on npp its just a blank document, can I make it generate an html doctype strict/transitional like how dreamweaver does with the premade t开发者_Python百科emplates?


You can achieve this by using macros:

  1. Press Start Recording button on Notepad++ toolbar:

    XHTML doctype template for Notepad++

  2. Open a new document

    XHTML doctype template for Notepad++

  3. On the newly opened tab, TYPE your template code (type code, don't paste it)
    (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">)
  4. Press Stop Recording button:

    XHTML doctype template for Notepad++

  5. Save your just recorded macro:

    XHTML doctype template for Notepad++


    assign a keyboard shortcut if you want:

    XHTML doctype template for Notepad++

  6. Run macro from menu or invoke it by keyboard shortcut you assigned on save, whenever you want to create a new template-based document:

    XHTML doctype template for Notepad++

Also you can open as many template-based documents as you want, by selecting option Run a Macro Multiple Times from Macro menu:

XHTML doctype template for Notepad++

XHTML doctype template for Notepad++

That's it. I hope this info will be helpful for you.


There is also a simple plugin called "NewFileBrowser" which you can find using Plugins>Plugin Manager. It will set up two templates for you that you can use for your boilerplates. Actually the default value it comes with are an html 4.01 template and a java class.

Configuring it is quite easy to figure out. Once installed it gives you a menu item under Plugins>NewFile&Browser>Create New File which will open a new document with your boilerplate contents in it.

It's perfect if, like me, you only need it for new html documents.

0

精彩评论

暂无评论...
验证码 换一张
取 消