Dev Blog 22: LISA's Direct Line

As I mentioned in the previous post, a couple of months ago I became concerned I was coding features without having a clear understanding of how I wanted to use them, which is an excellent way to end up doing something twice.

I therefore downed tools on the project and started actually using what I had in earnest in the development of a novel. This proved very fruitful: I quickly bumped up against a few quality-of-life issues I'd skirted around and had to fix them.

But the big feature I found lacking was search. LISA's automated live search is attuned to tags (to avoid filling the screen with 'helpful' results every time you type 'the'). As soon as I started using drawers and laying out notes, it became obvious I needed a manual search tool - not just to find things but to navigate the document. I mulled this over for a bit and realised there were opportunities here to do things differently - and hopefully better - than in other packages.

For a start, text editors will generally only search for exact phrases. With Davenport, the fact the document is broken up into notes makes a web-search-style approach possible: put in a few words and it can take you to the notes that best match - the full phrase if possible, otherwise all or some of the words being present. This proved hugely useful since I could quickly locate notes based on no more than a vague recollection of who and what they were about.

Second, in keeping with the conceit of LISA being your ever-present assistant, I ditched the idea of a dedicated search window or menu in favour of an all-purpose command-line. Here's how that works:

Suppose you want to find notes containing a word or words. Press ctrl+f (the usual shortcut for searching), and the command line pops up prefilled with the command:

find |
 Type the words and hit return, and LISA will take you to the first result - easy. Now we can add more commands, such as gather.

Gather works like 'find', except that it creates views of all the notes it finds and arranges them in front of you. I have to say, using Gather the first few times blew my mind; it's easily the most powerful feature of the whole package so far - maybe the definitive feature - and justifies all the work that went into the underlying note/view/drawer system. If I want to see at a glance all the places where I mention a particular character or idea, I simply create an empty drawer to work in, use Gather with a couple of relevant keywords, and it's all there, instantly, on one screen. And because it's all views of existing notes, each comes complete with a handy clickable link back to the original, so you can check the context. I got quite giddy and had to have a walk around to calm down at one point - the amount of time I'd wasted in the past scrolling through pages and pages of notes and ideas, the niggling feeling that I'd had an idea before and couldn't find it, or that I was forgetting some important decision I'd made!

After I calmed down I added a couple more handy commands: +# and -# for adding, removing and replacing tags. These are dead simple: select a bunch of notes and type this command:
+#o=black
to give them all a black outline. Or if you've defined an 'idea' tag somewhere with some formatting, you type the command:
+#idea
and all the selected notes are duly tagged as ideas. Less world-changing than Gather, but very useful for organising and formatting a big chunk of notes.

I'm having to almost physically restrain myself from adding more command features; and it's taking all my willpower not to incorporate a voice command library and start talking to LISA like I'm a bargain-bin Tony Stark. Must... resist...

Meantime, it's back to the novel, to find out what it wants me to implement next. See you next time!

Comments

Popular Posts