vkbo / novelWriter

novelWriter is an open source plain text editor designed for writing novels. It supports a minimal markdown-like syntax for formatting text. It is written with Python 3 (3.9+) and Qt 5 (5.15) for cross-platform support.
https://novelwriter.io
GNU General Public License v3.0
1.92k stars 99 forks source link

Epic: Refactor Quotes and Dialogue #1773

Open vkbo opened 3 months ago

vkbo commented 3 months ago

Prompted by @tmarplatt, this Epic ticket will track some efforts into improving handling of auto-replacement of quote symbols, and highlighting of dialogue. I've considered making some changes here for a while, and the feature requests contain a lot of ideas to build on.

Firstly, I would like to separate the quote replacement from the dialogue highlighting. The quote symbol settings are currently there to replace key presses on the keyboard of ' and " straight quotes with the user's preference of symbols. I don't want to change this feature. It is also not really what the feature requests are about.

Instead, I would like to define a set of rules for highlighting dialogue that better works for different languages. They should also work for alternative styles other than the standard rules. Sometimes an author also needs some creative flexibility here.

Feature Issues

Implementation

A form to set these rules should have an easy way to pick the symbols to use without having to type them on the keyboard. Similar to the current quotes selector dialog, but with additional symbol, support like at least en and em dashes.

Add a new section named "Dialogue Highlighting" in Preferences for these settings, and consider making it possible to override them on a per-project basis by adding a "Override Dialogue Highlighting" page in Project Settings.

Related to #1770:

Related to #1771:

Related to #1772:

tmarplatt commented 3 months ago

Yes, an implicit feature request here is to allow creating dialogue/quoting rules per Project. I can even picture the need of having customised rules per Novel! (Perhaps the project is multilingual? Perhaps the author needs flexibility across works in a same project?)