scrod / nv

Notational Velocity: modeless, mouseless Mac OS X note-taking application
http://notational.net
GNU General Public License v3.0
2.07k stars 404 forks source link

Rich Text (Styles, Color) Formatting? #27

Open ghost opened 14 years ago

ghost commented 14 years ago

While I love NV's minimalism, I could use one more feature--the ability to view text & background colors.

Full rich-text support would turn NV into a perfect alternative to TextEdit. I wonder if it's not available b/c a conscious decision, or b/c it's not possible with other features in place. I don't know anything about programming, but I'm willing to take a look!

scrod commented 14 years ago

(I'll write a blog post about this soon enough:)

Not including the full suite of rich text features was an intentional decision. You might not have noticed this behavior, but part of why NV's text formatting works the way it does is to let you change the default font face and size across all existing notes at any time, without losing any per-note formatting. The only other app I know of that works this way is CopyWrite.

NV has to go to a lot of trouble to prevent the normal rich-text system from interfering with font-changes, as Cocoa's text editing controls don't have this behavior "out of the box". That is, in a generic Cocoa rich text editor, variants such as bold and italic are preserved as attributes of the font, whereas NV works more like SimpleText from the original Mac OS in that these styles are (effectively) preserved independently. Furthermore, for fonts without bold or italic variants like Monaco, NV will synthesize these variants on its own.

And the reason for limiting all other non-font rich-text attributes (such as paragraph formatting) is that each of these options inevitably crop up in your text when you least want them; it's a fact of life in Mac OS X. And most of them are nearly invisible until they get in your way—e.g., ligature settings that you won't know about until you see that ugly conjoined "fl" amidst your non-antialiased monospaced characters. Sure you can always remove unwanted formatting (when you can see it), but why should users have to deal with options that are otherwise useful only in typesetting and word-processing programs? Remember: Notational Velocity is first and foremost a note-taking application. Its goal is to make taking and finding notes as fast and effortless as possible, and the core activity of note-taking is writing. Thus, anything that impedes writing reduces the overall effectiveness of the program.

NV is actually one of the few note-taking apps to lack generic rich-text editing (see here), so I don't think there's much market justification for another TextEdit clone; e.g., those needing such features can probably find what they need among the literally hundreds of note-taking apps already in existence. And of course you are absolutely welcome to strip out the style-preserving code in your own copy of NV and add the standard formatting menus if other apps aren't sufficient; this is after all why I made the source code available.

I'd definitely like to add a preference for global foreground and background colors, though.

jerclarke commented 14 years ago

Scrod I think you are absolutely right about formatting. It's a pain in the ass and you almost never want that level of copy/paste in the real world, especially in something like NV. Most note-taking software strips out all formatting.

If you give NV some HTML or PHP source it will faithfully copy in your text as far as I can tell, which at least in my case accounts for most situations.

I'd also like to deeply +1 your idea to have a background/foreground color setting. People have different screens and different eyes and a color-based option is becoming standard in serious writing apps. To me it is almost as important as the font size option for making writing comfortable. Making it global is definitely the right way to go. It's the background of NV, not the document being edited.

Thanks for the app, I have fun with it.

danawoodman commented 13 years ago

I'll +1 a global foreground/background color option. I think that would add a lot to the program without (hopefully) causing any issues with note formatting.

I really appreciate your thorough response to the ticket and it makes sense as to why you made the decisions that you did. I love to see developers making decisions that they stick with when they have good reasoning.

Thanks for a great piece of software!

scrod commented 13 years ago

Perfect! Because I just released version 2.0B4 with that exact feature. You can read more about it here: http://scrod.posterous.com/notational-velocity-204

danawoodman commented 13 years ago

Haha, little did I know! Great, now time to play around!

Cheers Zachary!

billturner commented 13 years ago

Not quite a full-on rich text feature request, but would it be possible to add a single new text formatting option: code (monospaced, etc)?

I store loads of code and CLI snippets in NV, and it would be nice to have those set apart from the rest of the text in a monospaced font. No colors, no size changes, just if it's possible to specify monospaced (like it is to specify bold, italic, strikethrough, etc). Thanks!

jerclarke commented 13 years ago

Hey Scrod, thanks for the background feature! Along with the continued bugginess of Smultron, it has allowed me to move more and more of my notes/todos into NV and the keyboard interactions and document paradigms make me really happy.

The one thing I miss from Smultron isn't even something it's creator had in mind: The ability to highlight text with a different color. By this I don't mean the ability to arbitrarily give any background color to a bit of text, but rather to set certain bits of text as a special color.

The way I did this in Smultron was to exploit the Apache code syntax, which I had set to make all comments (any line starting with #) green. So in my nested lists of to-do items, I would make a certain depth (section headings) start with # which both made them green and made them look like bulleted lists (sort of). This was an amazing compromise as it kept my documents completely plaintext, but allowed me to use colors if necessary (I'd also make some things blue by typing them as because < and > also had apache syntax meanings).

Coming back to NV, I really miss this ability and I think something comparable would be really useful to a lot of people. It seems to me the simplest solution would be to add "highlighted" to the short list of special formats that you support on top of the plain text, along with bold and italic. There could be a fourth color option in the "Fonts and Colors" section of the preferences where you set the text color (or background color, whichever you prefer) for highlighted text. I personally don't think this is too much of a slide down the slippery slope of formatted text, and if used creatively could solve a LOT of valid "note taking" use cases that are not well served by italic and bold in the current versions.

Thanks as always for the great app, hope you can consider this request :)

bobthecow commented 13 years ago

While we're making requests, can I put in a request to remove bold, italic and strikethrough support? I feel like there are enough rich text editors out there, and I'd rather have a note taking app that's completely incapable of rendering formatted text.

Thanks :)

jerclarke commented 13 years ago

If you don't use them the bold italic and strikethrough have no effect on your workflow. Why would you want to remove well-done features that hurt no one, especially when they are very useful for lots of people who like everything else about NV. All of them are styles that people could use when taking notes with a pen and paper, and I'd argue that highlighting is similarly present in analog note-taking for good reason. None are about making it a desktop publishing or WYSIWYG authoring tool, they are about taking notes that have enough visual diversity to account for complex information.

There are lots of text editors that don't support any rich text either, the existence or lack of a feature in other software doesn't mean it shouldn't be in this app. NV should try to be the best possible note-taking app while keeping the content itself pure, not dogmatically pursue the ideal of spartan formatting at the cost of usability.

bobthecow commented 13 years ago

haltlos commented 11 years ago

styles are (effectively) preserved independently

Why would somebody still want to set NV to "store and read notes on disk as" RTF files?

From the now-defunct blog post:

On the subject of external editing, NV now preserves a note-file's existing extension while saving, and allows you to specify an alternative default file extension for new notes.

I don't understand. How does external editing, NV's own (imposed) styling and the file extensions relate to each other? Regarding the latter,

haltlos commented 11 years ago

To answer my own question, "alternative default" extension sounds contradictory; that confused me. What is meant, is that you can change the file type/extension for new notes. I'm confident, finding the other answers involves more import, export, and external editing experience.

But why are file types and extensions presented separately in Preferences?