Navigating and rearranging scenes

After more than a month of work I have finally finished adding scene management to FocusWriter! This is something I have wanted to add for a very long time, and I am excited that it will finally be in the next feature release. It took me a lot longer to implement than I was expecting, and a lot of different attempts to get it to something I am happy with.

On to some details! In essence this is simply a way to quickly navigate and rearrange a document. What I have done is add a sidebar on the left side of the window (resizable by dragging, and only shown when you mouse over and click an expander button). The sidebar lists the scenes of the document and allows you to click to go to different scenes, or to select multiple scenes and drag them around.

One thing that took awhile was deciding what text to show in the sidebar, and how to track it without slowing down typing. In the end I decided to use the first three lines of text for each scene, and it updates them only when the sidebar is shown. I did it that way so that you don’t have to create a description for each scene. Of course, you can write a description at the beginning of a scene, but it is not required and it will be counted in the document statistics.

A scene is detected when a scene divider is found at the beginning of a paragraph. By default it looks for the text ##, but the user can change that to be something else. I considered using text sections as defined by RTF and ODT, but that would not have worked with plain text files. I also didn’t want the scenes to be accidentally thrown away by other word processors.

Hovering over hidden scene list Showing scene list


16 Responses to Navigating and rearranging scenes

  1. Michael says:

    Brilliant! I’ve been searching for the perfect writing tool and have been using emacs’ org-mode — I enjoyed being able to quickly navigate large sections of the document. At the same time, I enjoyed the focused simplicity of FocusWriter and grew tired of spending so much time futzing with emacs to get it to do what I want. This seems like a great compromise.

  2. Graeme says:

    Thanks, I hope it works well for you!

  3. Gilles says:

    Graeme, This is wonderful news. I am amazed at the elegance of FocusWriter. It is as aesthetically pleasing as it is simple to use. I have been coming back to it over and over.

    Like Michael, have also been using Org Mode in Emacs for the same reasons as his. This feature will make FocusWriter my favorite editor for drafting.

    I am very curious about your other plans for this program.

  4. Graeme says:

    Thanks, it isn’t always easy to balance form and function.

    I am working on adding a few more features for the next version (editable shortcuts and reloading files), but mostly I only have bug fixes and code cleanups left to do.

  5. Todd Lucas says:

    Great, so I’m going to be able to change the scene marker to // so it’ll pick up what I’ve been using all along? That’ll be fantastic, and make it very quick for me to test the new release when it drops.

    I notice a filter box at the bottom of the scene list. Will it include AND filtering?

  6. Graeme says:

    Yup, you will be able to set it to // and have it pick things up right away.

    Right now the filter only does a simple string match of the text in the list, but this is because I am just using Qt’s QSortFilterProxyModel. I could extend it before release to allow AND filtering.

  7. Todd Lucas says:

    That would be really awesome. I’m already in the habit of putting a //comment in front of each scene with something between list of tag and description of the action. I’m always trying to pick up on threads of scenes where two particular characters appear together or trying to figure out if/when a certain character was present on a certain set or any other number of things where being able to search by Term1 AND Term2 (AND sometimes beyond that) would cut down my search time from non-trivial to nearly instantaneous.

    Really looking forward to getting behind the wheel of the new stuff you’ve been packing into FW lately.

  8. Graeme says:

    I do see how it could be useful to have more complex filtering, and I will definitely have to think about it.

    Regular expression based filtering would be incredibly easy to add and quite a bit more powerful, but it isn’t quite what you are looking for. You could accomplish it with a regular expression like (Term1.*Term2|Term2.*Term1), but I imagine that would probably be bit of a hassle to remember.

  9. Todd Lucas says:

    Not to mention type 20 times a day ;-p Single term filtering is already something of a luxury, so the fact that you included it right off the bat is cool. Once you get multi-term filtering, then you can get FW to mimic many of the vaunted features of a certain other Qt based (at least the Windows version is) writing application, without the nasty chrome and data loss bugs.

    Champing at the bit, but trying not to be too obvious about it ;-p

  10. Gilles says:

    Hey Graeme, any prognosis on when this update will go live in the Ubuntu ppa? Sorry for sounding impatient, I’m just itching to give a go 🙂

  11. Graeme says:

    When it’s done. 🙂 My best guess would be September, but that it is still only a guess.

  12. Gilles says:

    I know it’ll be well worth the wait. Thank you for sharing your awesome work with us.

  13. mrbernie2 says:

    Hi! Great work! Is it possible to have the scene list display only the first line so that they can be used like headings or titles?

  14. mrbernie2 says:

    Just to elaborate on my last question, I was wondering if I could change the amount of lines that focuswriter’s scene list displays for each scene. I would like for it to display only one line, so that this line could be the heading/title of each scene. Right now, I have so many sections that they do not fit on the scene list without scrolling, but they would if the scene list only displayed a title. The first and second lines of the scene are not important to me in this case. This is the final issue that prevents me from converting to focuswriter completely, as I still use MsWord (gasp!) to drag and drop my headings and move back and forth between them. Is this feature adjustable? Thank you for such a wonderful program!

  15. Graeme says:

    @mrbernie2 At the moment you can’t control the number of lines shown for the scenes, but it shouldn’t be too much work for me to add that in the next feature release. I can see why it might be useful to show just the scene titles.

  16. mrbernie2 says:

    Thanks! 😀