Simple Text Expander

I often find myself cruising along and getting held up by the pace of my typing, especially when it is a matter of entering punctuation marks that require a holding of one key (Shift) and tapping another key. I am actually a very fast typist, but when writing dialog, I get thinking so fast that I just type it all out and then go back to enter the punctuation marks later.

I’ve learned that the feature I am looking for is a type expander, but I really don’t need all that much. I just want to be able to have the program automatically enter quotes around a certain series of paragraphs. When there is only one statement or statements with a lot of descriptive wording mixed in, it is no problem to make the additional keystrokes.

Just an idea. Thanks,

Ernesto

I’ve never heard of anything like that. It strikes me as a problem that would be exceptionally difficult for a computer to solve: knowing what you mean to be dialogue vs. narrative. It would probably take a super-computer like Watson that can partially understand English and form “conclusions” on the purpose of the statement. Watson has the equivalent of 6,000 high-end computers worth of CPU and RAM. :wink:

Is it just a case where you’d want to, say, triple-click a paragraph and then have some kind of macro that would insert quotes on either end of that selection? It seems like it wouldn’t be super-useful, if you ever break up your dialogue with narrative, but maybe in those cases you don’t need something like this. I’m not familiar with many text expanders, but if they do something like that and you find it necessary, it might be well-worth shelling out the money–I’m sure you’d find plenty of uses for the other features.

Or maybe you could find/write a script or whathaveyou to do this? Or wait and do it in another word processor after compile if you happen to know one offering a feature like this–I think TextMate does that, not that I’d consider TextMate exactly a “word processor”…

Anyway, is that what you’re talking about?

That would be easier to do, as TextMate supports regular expressions, so you could search for ^ which looks for the beginning of any line, and replace it with "; then search for $ and replace likewise. You’ll still need to select the dialogue material itself to constrain the search and replace to only the selected text, though. Once set up, this can be saved as a macro in TextMate and then executed on selected text with a quick keystroke that you set up.

You can kind of do this with Scrivener, too, by inserting carriage returns into the search box, but it would be more difficult and you couldn’t save the search & replace for future use.

Text expansion probably isn’t the right direction to look though, as these are all designed with the idea in mind of expanding text as you type, and so need some kind of text trigger. Some of them have the ability to insert the contents of the clipboard into the expanded text, so you could do something like this where you selected a paragraph, cut it, typed in “quoteMe” and had it return "{CLIPBOARD}". That doesn’t really solve the problem though as it takes more keystrokes and fiddling than just holding down the shift key in the first place.

Something you might try is copy something LaTeX does for quotes, write them like this''. That's actually two single apostrophes on the end. Since these sequences will not pop up naturally, you can do a global project search and replace at the end to fix them all to curly quotes---or if you don't want curly quotes, just use one thing like this``. That’s still two keypresses, but no shift keys.

It’s easier than that. TextMate can be set up (and is by default) to recognize " as the beginning of a pair, with another " as the end of the pair. Just select the text and hit ". TM will put quotes at the two ends of the selected text.

:bulb:

I would suggest that you simply write in two stages: First, when inspiration strikes that hard, write along and don’t care about punctuation or spelling. No bolt of enlightning lasts forever, so there will surely come a time when inspiration runs out and your hands need time to relax. You may use that stage to go through your text again and add all dots and quotations marks and whatever, change a word here and there - see it as a first rewriting. No text is written in one flush, anyway.