Sublime Forum

Tool chain ideas

#1

This is an ideas dump rather than feature request. The only feature request might be to write up more such tool chaining ideas.

As I consider a tool chain around Sublime Text for my own R&D purposes (on Ubuntu) I have developed a nice cohort of tools which work with Subl Text which is the main “cog” in a desktop engine.

Speed is my aim. Rather than hopping through various hurdles in session switching.

I start by using Albert (only available in Linux) to utilise their rich python extensions (and more custom extensions I have built with aid of Claude - also Claudette built into Sublime Text).

Alternatives to Albert are Alfred for Mac and Listery for Windows (which I use only occasionally)

In Albert I utilise

Snippets extension, launch te Albert “visor” (which as a metaphor reminds me of 1951 sci-fi Robot GORT - “Klaatu barada nikto”) and I start developing my own language constructs.

I add a new snippet by “snip [add]” or view snippets by "snip ". Ensure that Snippets extension is enabled in Alberrt Handlers GUI.

This Albert snip is created as a *.txt file but can be saved as any other extension such as *.md, *.qmd and so one. The main point is that we are quickly into the Subl ecosystem by just three key clicks.

At any point in a workflow outside Sublime text such as in a browser session.

I see something which needs to be captured and can create a new snip saved in Sublime Text. Then return to browser or email session.

It is this “session hopping” which is difficult to manage and Albert offers a fast meta portal into Subl Text.

Albert > ctl+shift+space > snip | [add]

snip to search through all Albert created snips. For fast indexing.

See companion list of Albert extensions. “Files” for one. And others. Create your own extension.

If Albert Files is invoked this takes me into Ubuntu Krusader dual panel Manager. And I can invove Krusader UserActions on Subl Files. adding another dimension. But again this is Ubuntu. A similar flow can evolve for Windows. Perhaps with Total Commender. All of this extends Subl master cog.

We can also exploit Recoll indexing engine (Ubuntu and Windows) focused on the snippets vault.

In Recoll > Preferences > Index configuration > Global Parameters > Start folders …

insert only Ifor Subl snipp et indexing)

~/.config/albert/snippets

~/.config/sublime-text-3/Packages/User/

Or you can index your entire desktop (but it takes time to rebuild)

Then in Recoll rebuild index … File > Rebuild Index

You can now visit Recoll and insert any complex search pattern to run though your entire collection of files (including content). With more powerful search operators. Hover mouse over Recoll query field to see list of advanced options.

I regard this as easier than the Subl search flow since Recoll has much more powerful query features. Recollq option (CLI) can also be run through command line.

More ideas if there is interest in building a cohort of tools.

0 Likes

#2

Hi there @innovator. I am trying to better understand what problem this solves or efficiencies it affords. Am I following that you are capturing content from multiple sources into your own personal knowledge base (ala. Obsidian) that you then read/process in ST?

What is the use-case here? Are you able to provide a simple worked example? What are the inputs and outputs?

I am a pragmatic animal, and I need to understand the problem, before I can fully appreciate the solution.

0 Likes

#3

Thank you for the question. Why? It is time and motion study.

I too am an engineer/pragmatist. Instead of asking for new features do it yourself.

I have the detritus of years of work buried in my creaking Dell desktop.

Here is just one scenario (incidentally I do not use Obsidian, it was just one experiment in my detritus).

I am in Ubuntu although I can dive into a nearby Dell Windows when I need to. But predominantly Ubuntu.

Order out of chaos needed.

Example as requested: I am in say Proton Foundation ecosystem. My inflow.

And I have many tabs open in different browsers (Chrome, Firefox). and other apps in readiness. I see them in Stacer. This is Houston Centre.

I read a note in the tsunami of emails. I want to retain that or respond. And quickly. Or I might by logging in and the one time password comes back via a different route.

I do not want to disturb my current flow. So I hit [ctrl+shift+space]. Up pops a “visor” (my visual metaphors at work).

I type “snip add”.
Or I can type to retrieve login details using another Albert extension.

I write “Reply to Subl Forum” … and I write this reply. I copy into clipboard ready to go back to this forum, reply, then back to the main work.

Snip instance sits in my Docky bar.

I go back to my Proton Mail in browser. Also in docky bar.

I need to reflect back on some notes in Snippets.

I launch Recoll also in docky bar. I type “subl”.

Up pops all my Snippets. I can right click and Preview.

I can deepen search by asking … give me a subl snippet (depending on what Recoll index is set) containing “some term” … see the query operators options by hovering over the Recoll query bar.
Then armed with some content in my clipboard I return to Proton Mail.

Of course you can extnd this for more exotic Subl searches such as “HaXe” or “SVG” or “qmd”.

From my own experience this avoids dancing between different apps. Time and motion study. Subl is only one cog in the machinery. A very good one, but one cog nonetheless.

Another example might be logging into some cloud service and you need your login profile. Use power of Albert with other extensions to avoid disrupting your flow.

This reply to forum is copied to my clipboard to paste in reply to your question. And saved in my Subl snippets vault for good measure. It might be recycled. I think back to the many replies lost in “sunset” forums such as Atom. I now keep my own Wayback Machine. Indexed by Recoll.

and I need to understand the problem, before I can fully appreciate the solution.

The problem is: time taken, focus switching, energy consumed, costs.

Does above answer your question?

But as the saying goes “you can lead a horse to the water”

POSTSCRIPT … I use this same snip approach in crafting prompts to Claude rather than their tiny chat windows where typo errors can be made. Subl snip is my despatch note. See Claudette Subl plugin. And I save them in my Snippets vault. Equally replies can be saved as snips. The Wayback Machine again in Subl engine.

Final note. In Claude “despatches” it is necessary to add context. Chats live in siloes. AI research is repeated. At cost of more tokens. More energy. Solution: Keep your context recollections as Snippets. As you craft a Claude snip (created via Albert three key stroke) … bring in “context snippets” from the master Snippets Vault. Add it to your “chat”. Despatch with context. Regain sovereignty and control.

0 Likes

#4

So, if I am reading you correctly … you have created your own ecosystem to store and retrieve your copy history?

I’ll be honest, I use off-the-shelf solutions for this. I am a Mac user and use Copy 'Em for Mac - Apprywhere for this task. It maintains a fully searchable copy history of whatever length you want, that can be sync’d across machines and devices.

Anything I copy is automatically added to Copy Em’ so it is completely frictionless. No extra work needed.

Every ‘snip’ is tagged to the application you were in, for easy retrievability. Any links you copy automatically retrieve the title and a preview. You can organise your most common snips into collections or favourites. You can also block copying from certain apps, such as password managers.

It has a number of built-in transformations to rapidly transform text, or you can pass that work out to ST.

Such tools are fairly common (I have tested many, before settling on Copy Em’), so I am guessing that there are equivalents on Ubuntu

0 Likes

#5

Thanks gbird for listening. But I’m sorry that the context was lost in my story. Often is the case. There is indeed a vast arsenal of Ubuntu tools. Like Mac. But the trick is harnessing a few for “special operations”. This is more, much more, than “store and retrieve your copy history”. It is adding other cogs to the Subl engine. A Meccano set of parts.

https://www.recoll.org/pages/perfs.html

There is a bigger picture not seen, not yet expanded, but truly I do not have time to share. Tempus fugit.
The same principles apply in Mac … using Alfred. When I can afford a Mac to add I will try.

I did take time out to study macland (in fact I have an old Mac somewhere in my room of old stuff - like me who started out engineering in 1955).

Noted App Privacy practices. My engine runs in zerotrust.

It is clear that you are thinking of just “Recall and Paste”

Copy and Paste … for example … does not allow automated batch “pasting” snippets into multiple framesets (text, image, render) in Scribus desktop publisher.

Copy and Paste does not provide automated driving of complex UI like Blender. Or cloud sites. Or … even driving Subl UI itself. A snip plugin to recursively drive Subl UI operations ??? Nahh.

Copy and Paste does not offer creating say KDenLive shows from snips.

Copy and Paste does not offer context flows to say Claude …

I can go on. But I’ll go back to skunkworks mode.
I tried.

Good luck … truly … paste by paste. But try automating Copy Em’ process. From a snip.

POSTSCRIPT … I have just realised that I can develop a script here (on Ubuntu) which I can offer to you to drive your Mac Copy Em’ … whilst you have a coffee. Ponder on that elearning mode. No YouTube.

0 Likes