项目作者: kcartlidge

项目描述 :
Notepad++ user defined language file for prose
高级语言:
项目地址: git://github.com/kcartlidge/npp-prose-language.git
创建时间: 2020-08-26T09:26:46Z
项目社区:https://github.com/kcartlidge/npp-prose-language

开源协议:MIT License

下载


npp-prose-language

This is a simple language file for Notepad++, which will provide some formatting useful for writers (not coders).
It will kick in for files with the following extentions:

  • .prose
  • .book
  • .chapter
  • .scene

Installing

In the Notepad++ navigate through the menu to Language, User Defined Language, Open User Defined Language folder ... and Windows Explorer will open up a folder.
Place the npp-userDefinedLang-prose-kcartlidge.xml file from here into that folder and restart Notepad++, at which point the language highlighter will be available for all the matching file types.

The main stuff it highlights

As this is designed for writers, not coders, the main highlighting is extremely simple so as to (a) not distract from the flow and (b) keep clutter minimal.

  • dialogue is subtly coloured and italicised
  • numbers are emboldened

Other highlighted stuff you may want to use

For my own tooling, there are several other things you can do. Or ignore them entirely.

  • comments can be done in four different ways
    • // comments out the remainder of the line
    • -- comments out the remainder of the line
    • # comments out the remainder of the line
    • /* and */ will comment out just the enclosed text
  • chapters and scenes, with the ability to fold them up for easy navigation
    • CHAPTER or SCENE designates a new one, and END marks it’s end
      • For clarity only use those markers at the start of a line (not enforced)
      • Remember to end one scene before starting the next

Final stuff that you almost certainly can ignore

These are also for my own tooling, but feel free if it helps.

  • BOOK, CHAPTER, TITLE, AUTHOR, ISBN, PUBLISHER, PUBLISHED, SERIES, SEQUENCE, COVER, COPYRIGHT, GENRE, SYNOPSIS
    • These are all highlighted, but have no function beyond that. For my own purposes I expect lines of book metadata where each is one of these tags followed by a value.
    • The file sample-text.prose is a more complete example showing all of these tags.

Example content

Below this is a screenshot of the outcome of the following sample content.
This example does not contain all options; see the file sample-text.prose for more.

  1. BOOK Some example Lorem Ipsum
  2. AUTHOR K Cartlidge
  3. PUBLISHER K Cartlidge
  4. # This is a sample file only.
  5. CHAPTER One - Sample text
  6. SCENE 1st para of text
  7. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
  8. tempor incididunt ut labore et dolore magna aliqua. "Ut enim ad minim
  9. veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
  10. commodo consequat." Duis aute irure dolor in reprehenderit in voluptate
  11. velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
  12. cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
  13. id est laborum.
  14. END
  15. SCENE 2nd para
  16. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
  17. doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
  18. veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim
  19. ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia
  20. consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
  21. "Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur,
  22. adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore
  23. et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis
  24. nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid
  25. ex ea commodi consequatur?" Quis autem vel eum iure reprehenderit qui in ea
  26. voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem
  27. eum fugiat quo voluptas nulla pariatur?
  28. END

screenshot