I have accumulated many notes (docs) in the scratchpad. It is very convenient.
I urgently needed to find one of the documents and realized that I have no way of searching all docs in the scratchpad.
thanks in advance for your time and help
The scratchpad is a location on your file system (where exactly depends on where you chose to put it in Preferences > General > Scratchpad).
That means that plain text scratchpad documents can be searched by using the Macâs Spotlight tool. Go to the folder in Finder and press Search, highlight the Scratchpad folder and put your search term into the box. It should highlight all the files inside the scratchpad matching that content.
Unfortunately that only works for plain text files, not for RTF files. In that case youâll need to use either a third party tool, or go to the command line (Terminal).
If you are comfortable with the command line, then all your need to do is run grep within the Scratchpad folder â it will search inside RTF files.
If youâre not comfortable with the command line, then these instructions will show you how, but CAUTION: if youâre not comfortable with the command line, then be aware itâs possible to do some destructive things with it. Thatâs not to say that anything Iâve shown below can damage your files â it canât â, just that you shouldnât type anything else in if youâre not sureâŚ
For the command line, do this:
-
In the finder, right click on the Scratchpad folder and choose âServices > New terminal at folderâ. This will open a terminal window onto your Scratchpad folder.
-
After the prompt (which is probably $), type the following (exactly) then press enter:
ls
(thatâs an ell, not a one). This will show you a list of the all the files in the folder.
[attachment=0]Screenshot 2021-01-02 at 12.54.15.png[/attachment]
(The line beginning david@BOG will look different on your system, The important thing is that it shows you the location of your Scrivener folder (for me ~/Dropbox/Scrivener/Scratchpad), and that somewhere there is a prompt ready for you to type a new line.)
- After the prompt, type the following (exactly) replacing âmy-search-termâ (the quotation marks are usually necessary) with whatever youâre looking for:
grep -i "my-search-term" *
(The -i flag makes the search case-insensitive, so it will find âScrivenerâ and âscrivenerâ. * means search every file.)
- This should give you a list of long lines, which start off with the names of the files containing the matches, even if they are RTF files, and the line in which the match occurs. You can then open the files in the finder / Scratchpad in the normal way.
In this screen shot Iâve search for the word âScrivenerâ, using the code:
grep -i "scrivener" *
It returns 5 matches (NB: it returns every line with a match, so files can appear more than one in the list). Obviously the file names are in the first part of each line, terminating with :.
[attachment=1]Screenshot 2021-01-02 at 12.44.28.png[/attachment]
It sounds complicated, but once youâd done it a couple of times, itâs really easyâŚ
HTH.
thank you VERY much for your detailed reply. I greatly appreciate all the time you took to write it.
I tried out the terminal approach. It works as you describe.
I then thought about using houdahspot, my search app and it is very fast because I created a template specifically to search the scratchpad folder.
thanks again very much and happy new year
Glad it worked â I didnât know whether you had something like Houdah Sport (or Devonthin SphereExpress, which I have). Theyâre definitely easier, though knowing some basic command line utilities like grep can come in very handy now and then!)
are you happy with it ? do you have the impression that they are still new developments or is it an old app they are keeping around ? I bought it but subsequently deleted it because of the amount of space is takes: 3 GB although I had done only a few searches.
Itâs ok, but I donât really use them that much. If spotlight doesnât work, I use the terminal usually. But Devonthink itself is very good.
FWIW, I have DevonSphere Express, but have found its results ⌠puzzling. Iâm currently using Tembo, which is an express search tool from the HoudahSpot people.
Katherine
thanks very much. I wonât waste time with it. I used to use Tembo. HoudahSpot is much more powerful for more complex searches.
thank you
Your post motivated me to find ways to make the scratchpad more powerful, for example:
- in the scratchpad directory you describe, I created 2 folders, one scratchpad archive and the other scratchpad trash. I created Hazel rules based on content. When I want to archive or delete a scratchpad document, I simply type zzarch or zzdel in the document and hazel automatically moves them to the corresponding folder.
- to work around the absence of styles in the scratchpad, I use the keyboard maestro macro action called âapply styles to clipboardâ and created a universal library of styles identical to my Scrivener styles panel which I can use in the scratchpad
- as a workaround to the absence of lists in the scratchpad, I found that if you create a list using the Bear Notes editor â copy â paste the list into the scratchpad, you end up with a fully functional Scrivener list within the scratchpad. By functional I mean that you can move items up, down, left and right, add more items and obviously also delete some and you can change the type of list ie bullet, numbered, roman, etc just like you would in Scrivener
- to create a list rapidly, I created a small list in Bearâ copied to the clipboard â created a Typinator snippet (listyy) and now if I simply type listyy in scratchpad a fully functional list is created
it would be nice if all of this could be implemented in the scratchpad without all the workarounds
I donât mean to take away from the good conversation on using file system tools and additional software to augment the scratch pad. It is meant to be an integrated tool given how it works on a folder of regular old files, and for most things you might want to do beyond what it does, using other tools is the right answer.
That said, ever since Scrivener 3 made functional improvements to the utility of a simplified project window, Iâve stopped using the scratch pad entirely. Why use an intentionally simplified thing that only does one thing, when you can do that, and do everything a project can do?
Now that more recent versions of macOS have broken the toolkit we were using keep files in real-time sync with the disk, there isnât anything the scratch pad can do that a project window cannot.
A few ideas for what a project window can do: searching through notes (there is âF
in the top list view, as well as Quick Search, or even Project Search if you want to get hardcore), tagging notes with labels and keywords, full text writing and revisioning tools, annotating notes with a synopsis, interlinking them, archival to âhiddenâ folders, a proper trash system &c.
Over the years people have asked us to add more and more into the scratch pad, but really the things that get asked for are things that already exist, and that would if implemented only serve to make the scratch pad less unique, and more like thisâŚ
- Scratch Pad Project Template-Win.zip (108.3 KB)
- Scratch Pad Project Template-Mac.zip (127.5 KB)
Thank you VERY much for your comment. Your solarized light themed scratchpad like template is superb and I am migrating from my current scratchpad to your template.
I will create a keyboard maestro macro to insure that it is alway floating when activated.
I had a look at your template and would have 2 questions:
1- I notice that the view is editor horizontal split, but I canât figure out how you put the list of notes/docs on top. What is the âlist of notesâ in Scrivener terms ? Itâs not a Binder, not a corkboard, not an outline. In other words, how could I reproduce the horizontal split view with list of docs on top in any Scrivener project I am working in ? It would be useful to know because the binder often takes up too much space but needs to be there like when you drag and drop files. It that case, I can hide the binder drag and drop in the docs list at the top.
2- in my current (standard) scratchpad, when I drag and drop a PDF into a Note (not into the notes list), a fully scrollable PDF is inserted into the note. With your scratchpad 2.0 template, I only see the first page of the PDF. I suspect that this is a configuration issue, but I canât find the parameter
Thanks again very much !
Youâre welcome!
Yeah! I wish that were a persistent project setting, one that could even be saved into the templateâbut a macro does the trick nicely, especially since it has an if condition for matching a specific window title.
But it is an Outliner. Iâve removed all of the stuff from it that come along with a default setup: there is only one column, the title, and icons are removed from it. The header and footer bars are remove to make it even cleaner. The other settings are navigational: binder affects top editor only (so you can easily switch between large groups of notes), with the special exclusion set to open non-group items in âotherâ, thus clicking on files in the binder loads in the lower half, and finally outliner selection in the top half affects the editor on the lower half.
So thatâs the recipe, and you could do it by hand, but just take this window and open the Window ⸠Layouts ⸠Manage Layouts⌠panel, create a layout, and then apply it to your other project. Youâll want to enable the setting to preserve outliner and corkboard settings, with that. And you might also want to âback upâ your current project window layout firstâand now really any project can become this. Of course Layouts donât load items into splits, so you may need to do some navigation to make the setup sensible, after switching.
I have an âInboxâ folder in most of my large projects, and have this particular setup saved as a Layout, itâs a nice way to shrink an otherwise sprawling project down to nothing, so that it can be used to gather notes from other sources. When Iâm done I just load my sprawling layout and carry on.
That isnât specific to this layout, thatâs just what happens to PDF files you drop into the main editor. It considers PDF a vector image format and isnât designed to work any other wayâtry it in TextEdit as well (or the regular scratch pad for that matter), youâll get the same weird result.
I pinned the top list to the Research folder on purpose though (it is renamed to âNotesâ by the by). Put that PDF into the top list, not the editor on the bottom.
thanks very much for all the explanations. I am extremely happy with the results which will greatly help my workflow because I am constantly working in different apps : browsers, pdfs, mindmaps, etc
have a nice day
Folks, thank you for this discussion and for sharing the scratch pad project. The template imported well into the Win 3 beta, only needed to remove extraneous Outliner columns from the upper window.
Best,
Jim
Uh, yeah, wow trying that, then trying to fix it, and then saving an updated template, exposes a lot of bugs! And frankly I couldnât even fix the project. I presume it may have something to do with the fact that it was created from a very old Mac template that I use as my blank starter for all projects. Maybe it even goes back to the Mac alpha days, and doesnât quite do things the way the Windows beta was programmed to expect. I donât know, I tried to fix it, and it just outright refused to ever work the way it was supposed to.
So I completely redid it from scratch with a new blank project and tested it on Windows to make sure it doesnât blow up. Now it works as expected on both platforms. Iâve updated the original link for any other Windows beta users interested in trying it. I noticed three things did not convey across platforms properly no matter what I tried, but they are all very minor and preferential:
- It was supposed to show up in a custom âNotetakingâ category for templates, not âMiscâ.
- View ⸠Use Label Color In ⸠Outliner Rows was to be enabled.
- Project Settings: Special Folders: Default New Bookmarks Folder is supposed to be set to âNotesâ.
Thanks for letting me know, Jim.
Thanks Ioa, Iâve moved to v2 of your Scratchpad project on the v3 beta! So far so goodâŚ
I have been using the new Scratchpad for a few days and am very happy. In terms of workflow, I would like to be able to toggle between the currently Scratchpad layout and editor only when I am working in a specific note.
In your opinion, what would be the quickest way to do so ?
My instinctive solution was to toggle between editor only and Scratchpad layout, but that does not work because when you switch to editor only, the focus in the Binder becomes the focused document, and when you return to the Scratchpad layout, the notes list is empty (because the focus in the binder has moved from âNotesâ to the current document.
thank you Ioa
For quickly switching between common layouts, Iâve assigned a few to F-keys. Each layout you create is listed off the Window ⸠Layouts ⸠submenu, so itâs a reliable binding.
As for optimising what gets loaded where, this where using Keyboard Maestro, to handle your shortcut management instead of the OS, could be the ticket. Consider that you can use the Navigate menu to focus a specific editor pane, and then once the focus is there, jump directly to any specific note with Quick Search, all with keyboard commands and typing. E.g., your âF5â key that loads the layout could not only do that, but always load the âInboxâ folder in the top pane and select the last note in the list into the bottom pane. Iâve never gone to that length, but now that I think about it, I might.
The combination of layout + navigation with a so.called keyboard maestro conflict palette solves the problem. Thanks very much IOA