zap gremlins, remove lines, external editors

I have only been using Scrivener for a month, and am having some frustration using it. Granted some of it is from having switched from Windows, but some is from missing software that I previously used. Overall I like Scrivener (would prefer straight text editing, yes I know about Ulysses).

Here are my questions:

  1. can I “zap gremlins” in Scrivener?
  2. can I (automatically) remove empty lines in Scrivener? (in other words remove CRLF, or whatever Mac uses, as well as lines with only space)

if so where are these functions?

  1. is there anyway to pass a ‘document’ to an external editor, edit it, and return the result? (other than copy and paste!)

Thanks in advance.

There are a number of us here who prefer plain-text editing, though most tend to congregate in MultiMarkdown section. :slight_smile: I myself only use Scrivener as a plain-text editor, and use its formatting features more as notation tools for my own purposes. I find this approach to be a lot easier than something like Ulysses, where you must first configure a format range type, then configure its appearance (though their method does have advantages on the export side).

Anyway, all of the text manipulation tools are located in the Text/Convert... submenu, but the things you list are not addressed. Most people adjust paragraph spacing and empty lines with find and replace. You can enter carriage returns into that tool (both the project-wide and document local versions) by holding down the option key and typing in the control character. It will be invisible, but in doing that you can search for, say, three carriage returns and replace them with two.

Zapping gremlins would probably not be relevant since Scrivener is a rich-text UTF-8 based editor, there isn’t really a concept of a “gremlin” that would be useful in a majority of cases. In fact, a lot of people have Scrivener set up to intentionally insert “gremlins” all over the place. :slight_smile:

In older versions of the operating system, there were decent techniques for doing this. Apple has since deprecated, and then in Snow Leopard made it much more difficult to use at all, the techniques on merits of security. Some programs, like TextMate, still have ways of getting around the blocks, but they are a bit flaky in my experience, especially when used against an application like Scrivener that hosts lots of internal documents. It screws up the undo stack, and can cause buffers to get crossed in some cases ending up with data going to the wrong spot and wiping stuff out. It’s possible, but you have to be pretty careful.

The only valid alternative is for the hosting application itself to provide services for this, which Scrivener does not. There hasn’t been a huge amount of demand for such a thing since most users work in rich text, and quite a lot of what Scrivener supports in its editor is not supported by other Mac editors, which could result in data loss.

My own experience with all of the issues you list is that over time they gradually go away. Initially, like you it sounds, I had a lot of material coming in to Scrivener from other places and found I had to do much of the text cleaning in programs that had these tools available. Again, TextMate being my choice for plain-text manipulation. As time has gone by though, I’ve ended up doing original drafting just in Scrivener, and so things like spacing issues and so on have become non-existent. That’s just my experience, anyway. The only real exception to that is when I’m drafting a document in MMD and realise it’s becoming unwieldy. Then I’ll use Scrivener’s MMD import to translate the document structure into Binder structure and continue working on it in Scrivener from that point on. But because MMD has stricter formatting requirements, there is never a problem of conforming the text after import—it’s going to end up MMD anyway so it should stay the way it is.

Sorry, that was an awful lot of rambling on for what essentially amounts to a “no, it doesn’t do that”!

Not sure this is what you’re asking for, but you can download Devon’s free WordService app which will clean up any text in Scrivener or TextEdit or many other applications.

Can you just select the imported document and, using the Scrivener styles drop down menu in the menu bar, apply a style that strips out blank spaces?

Here’s a descritpion of WordService 2.7:

This service provides 34 functions to convert, format, or speak the currently selected text, as well as insert data or show statistics of the selection within all Cocoa applications (such as TextEdit, Mail, iChat, Safari, XCode, or our commercial applications) and Carbon applications supporting services.

Features:

Reformat, Remove line attachments/endings/links/multiple spaces/multiple feeds/quotes, Trim line beginnings/line endings/lines, Sort lines ascending/descending, Shift left/right, Initial caps of words/sentences, All caps and lowercase, Mac/Windows/Unix line endings, Rotate 13, Straight/Smart Quotes, Encode/Decode tabs, Insert date/date and time/time/contents of path, Speak native/German text, Statistics.