"Edit with external editor" option

This sort of silly hyperbole does your argument no good whatsoever, you know.

I just said the truth. Technical writing is Scrivener is hell. You cannot even properly indent a block of code. “Properly” == with spaces or tabs.

As a tool to organize the text, it is great.

Of course you can indent code – just use the paragraph indent options (you may have to assign a shortcut in Options-- it’s years since I used V1 so I can’t remember what they are. In Version 3, Ctl-alt-left and right will indent and outdent by the tabs you’ve set up in the ruler.

Now if you’re saying that it’s hell to write in Scrivener because it doesn’t do language-aware automatic code indentation, then we’re back to the hyperbole, aren’t we?

If you want to say “Scrivener is not a state of the art code writing tool”, then I don’t think anyone would disagree. How many people do you think want to use it that way, who don’t know how to use either external sync or automated copy and paste?

BTW, you really should try the Beta – it has several improvements which may help you.

“Properly” == with spaces or tabs.

Indentation created using paragraph indents can’t be copied into text editor and will be lost if you sync the project with external folder as plain text.

I’m not even sure there is an option to convert it to spaces during compilation to plain text.

Could that possibly be because it is primarily a tool for writing novels and other such long-form writing?

So you have to use an external text editor because you can’t do code indents, but you can’t use an external code editor to cope with the code indents Scrivener can do? This is getting very confusing…

So use tabs instead (and automatic language aware indenting is only clever tabbing or spacing after all), then if you want to swap tabs for spaces or vice versa use the substitutions pane in compile. You can change tabs to spaces there, and in V3 at least, you can also do regex substitutions in the same dialogue (as well as in the editor/project replace functions).

But enough: you are of course free to use it whichever way you wish.

Yeah, probably. I’m not trying to be a hater. This is a good app, but it has its own weak sides. What I’m trying to accomplish is to point out on these weak sides in hope they will be fixed.

You have 2 options to indent the code:

  1. spaces or tabs
  2. paragraph indentation.

The latter option is a part of formatting. It’s not any different from e.g. red text. When you copy such things into plain text editor, they are lost.

Weak sides? :smiley:

I know. If you read your posts again, you will see the contradictory positions you are adopting.

But you’ll have to reconcile them without me. You’ve had the position explained to you, with possible workarounds. I don’t see any point in going over the same ground time and time again. Good luck with finding a process that suits you.

Since you use Sublime Edit, and your primary complaint with the folder sync feature is that it requires frequently going to the file system, you should know that is not necessary! Sublime Edit is, like many modern coding editors (including Vim, even vanilla, but can be enhanced further by plug-ins) also a capable project level tool. It’s also very easy to get started with it:

  1. Instead of opening one single file, try opening the entire sync folder at the root level.
  2. If nothing special happened, you may have the sidebar disabled on start, use the View ▸ Side Bar ▸ Show Side Bar menu command.

Thus far this would suffice for simple editing sessions. You have accelerated access to sidebar files via the universal “Goto Anything”, can do cross-file searching and replacing with Find ▸ Find in Files, etc. Stuff like that is going to be a lot more efficient than going back to Scrivener, searching there, locating the chunk of text you want to edit and then using a command to open a separate window in your editor.

  1. But you can go a little further by making this a saved project, by using Projects ▸ Save Project As…, and now you have a simple thing you can double-click on, as well as define special settings to (like maybe a more prose-oriented theme than coding).

This is after all a barebones IDE. It is designed to make working with a network of interrelated files as easy as possible. If you’re Alt-Tabbing out to Windows File Explorer to open .txt files in Sublime, you can do much better.

There are other tools that work excellently with sync folders. Even other complex software that offers similar tools can be coupled together with Scrivener’s folder system. Ulysses for example (a Mac-only writing tool), has an external folder feature, and plays nicely with Scrivener. I’m also using a tool called nvUltra which is basically a tool that makes editing a folder full of files as easy as a streamlined notepad tool (anyone that used Notational Velocity or nvAlt knows what that is about). It’s an excellent “front end” to an external sync folder, particularly if you use Markdown to write.

It should be enabled by default, but make sure the option to take snapshots is enabled. There is no reason to turn that off in my opinion, as it records a complete record of all syncs in both directions. If you accidentally edit the same resources in two places, you can resolve the conflict with the backup copy created by snapshots.

That is something the aforementioned beta can do. It can optionally convert paragraph and indent formatting to literal whitespace, based on simple 10-pitch math. It is capable enough to even generate a screenplay, which is very strict in terms of spacing.

What most people mean when they refer to external file editing is an inside-out approach, where the host software creates a temp file somewhere and then requests that file be opened by X software (or the system default), and the proceeds to aggressively poll that temp file for changes to the disk, updating the internal store as it does.

The other method of handling this problem is of course the watch folder, or the sync folder as we call it. With this model the software either actively polls or is commanded to sync with an entire group of files via some “inbox” or public storage area that extends internal storage into the file system.

We feel this is the best approach for Scrivener, because Scrivener is less about “documents” and more about outlines. It encourages an approach where individual items in the binder are short and to the point, meaning one might have to use “Open in External Editor” fifteen times to actually open an entire chapter—and then you’ve got fifteen aggressive I/O monitors slowing the system down.

Another complication has been pointed out already, and that is that Scrivener has a variety of features that no other editor on the market has. Most of those features are accomplished via the plumbing that is provided by using a rich text editing system—which means any kind of syncing that drops to plain-text destroys those special features (never mind italics).

The external folder sync feature does its best to avoid that kind of destruction, by operating at a paragraph level of granularity, and providing additional conversion and processing routines to round-trip stuff other editors can’t do. I’m not sure if an actively polled external temp file system could provide the same level of protection without demanding even more resources from the machine.

To conclude: this has been requested before, and this probably won’t be the last time it is requested—our answer remains the same: there is a feature for this already. It’s not that we do not see the merits in this capability, and all of your arguments for it, and where Scrivener has weaknesses, are sound (I don’t get why there is such a backlash against that here). It’s just that our approach isn’t quite what you had in mind, and so your best bet is to find ways to make that feature work well for you.

2 Likes

AmberV, thanks. Most of your points makes sense for me.