Using Sublime Text to Edit Tiddlers

Ahoy,

I’m currently often using Sublime Text in combination with GhostText to edit tiddlers by using its ability to live-edit any browser textarea. However, this requires a Sublime plugin and a Firefox plugin.

Recently, this works less and less reliably. I often get empty windows in Sublime, or the transferred text is marked as MarkDown, with corresponding syntax highlighting, which it is not. Worst of all, when editing multiple tiddlers this way simultaneously, sometimes the contents of one tiddler is copied to another.

Does anyone have another way to make Sublime work with TW / Firefox, or maybe a whole different external editor setup altogether? BTW, I have single-file wikis, if that makes a difference.

Have a nice day
Yaisog

Have you looked at the Sublime Text syntax tiddler.tmlanguage ? I use this sometimes when looking at really long tiddlers and just copy and paste between the browser and Sublime Text. The syntax highlighting might be missing some features, but at least it would solve the problem of your text being marked as Markdown

Apologies for necroposting, I’ve just managed to get a working (albeit slightly different setup). Details below.

As I wrote here Is it possible to install the GhostText browser extension into TiddlyDesktop? , I settled on GhostText as well, since it worked in browser. I’ve got no feedback in the linked thread, by which I conclude that this must be a rarely happening scenario (very likely because the average TiddlyWiki user does not feel as clumsy as I do when writing wikitext, thus they are happy with writing in the browser :rofl: )

Once I wasted enough time with trying to get GhostText into TiddlyDesktop, I turned back to regular web browsers. I had to find a solution for the dreaded (from an end user’s perspective) save problem. Tried to set up Timimi on Ubuntu (and failed), but the timing of the Chrome notification re: Timimi thread was perfect: TiddlyStow, which I’ve never used before, was mentioned there. It does not work with Firefox. It works with Chromium and Vivaldi.

Having saving and GhostText installed in the browser, I had to pick a text editor. Vim being my daily driver, I tried that first. Something about installing dependencies for the GhostText Vim plugin did not work and I’ve decided to try Neovim before digging deeper again. Instead of picking vanilla Neovim (and wasting another century configuring it from scratch), I picked https://www.lunarvim.org , but TiddlyWiki related stuff below shall probably work with vanilla Neovim as well.

LunarVim uses the ~/.config/lvim/config.lua file, mine looks like this:

-- install plugins
lvim.plugins = {
  "roma0104/vim-tid",
  "sukima/vim-tiddlywiki",

  "croaker/mustang-vim",

  "subnut/nvim-ghost.nvim",
}

lvim.colorscheme = "mustang"

lvim.keys.normal_mode["<F7>"] = ":set filetype=tiddlywiki<CR> :set wrap<CR>"

First two plugins are TiddlyWiki related. Mustang is my favorite colorscheme. And I added a binding to set the file type and turn on line wrapping (useful for long lines containing wikitext filters).

After this I’m pretty much set up: I launch lvim in a terminal, load my single file TiddlyWiki into the web browser through TiddlyStow, so saving works, and proceed. Once I edit a tiddler, I right click on the textarea, activate GhostText, switch to lvim and do the text editing.

Since I also have wikis with Markdown tiddlers, I’ll very likely add another binding to toggle filetype to markdown as well.

The wikitext syntax provided by vim-tiddlywiki plugin feels rudimentary. I expected to get nicer syntax highlight, like visual ricing of filter elements (filter operators, variables etc). It did not happen by default and I’ll have to read the plugin docs and perhaps even skim through the source code to find out if that’s supported at all. If not, I’ll be at the mercy of some future Vim guru who will do it and eventually share an updated version of the TiddlyWiki syntax for Vim, since I’m confident this is above my level of knowledge.

No worries I will add my 2 cents for perspective as I don’t find myself using the Sublime Text plugin too much. If I write something longer I will usually use markdown.