adithya-badidey / tw5-codemirror-plus Goto Github PK
View Code? Open in Web Editor NEWAn attempt to make a better writing experience for TW using codemirror.
License: MIT License
An attempt to make a better writing experience for TW using codemirror.
License: MIT License
From Soren on the TiddlyWiki Google Group
Small bug in the new autocompletion: if I have a completed link, like [[MyLink]], and then with the cursor outside of any brackets later on that line I press Ctrl+Space, the text between the beginning of the link and the current cursor position changes to "[[Filter error: Syntax error in filter expression".
Will have to handle edge cases.
From Mohammed in the google groups
It would be awesome if we can have a roam-like autocomplete for the wiki link.
List tiddlers in the snippets dropdown list after type a char after [[
Currently when writing lists, if a space is added after the *
but before the text, this space is actually rendered in the formatted markdown. I think it is probably more common for people to write markdown lists like this:
* Item1
* Item2
Rather than like this:
*Item1
*Item2
For this reason, it would make sense for the extra space to be ignored so that both of the above examples will be rendered in the same way by the plugin.
Currently when you go to Settings -> CodeMirror -> Set a Theme
, and set the theme to anything other than cmplus
, much of the features of cmplus
remain present, including the text formatting.
I think it would make more sense if switching to these themes disabled all the features of cmplus
. Obviously this can be done by disabling the plugin, but this is inconvenient and makes less conceptual sense than just switching the theme.
This is more of a question than an issue because I'm unsure of what is the expected behavior.
I'm using codemirror plus in firefox. Before switching from the vanilla codemirror I had spell checking but now I don't. Is there any way to have both things?
snowgoon88/TW5-extendedit#15 is really good to auto complete the internal links.
Can TW5-codemirror-plus support this?
Currently when using autocomplete the text is added without closing the brackets (i.e. [[Title of tiddler
).
It seems to me that in most cases it would make sense for the closing brackets to also be added automatically for both transclusions and links.
Thanks for the great plugin.
\define macroMe(name:"teacup")
I'm a little
\end
Can macro definitions have a certain color, and the macro name to be bold? For example, I wish this whole block to be <>, where
As an extension to this thought: can I target this whole text block in CSS? This is a desirable workflow for me: on mouse-hover, this whole block of text is very visible, to allow no room for mistakes while editing. Then with no mouse hover, it assumes the coloring as stated above, or maybe even just a lighter opacity (I can do this with CSS of course, if it's a class that can be exposed to me)
It would be nice if CamelCase text could be highlighted as links if the appropriate setting is on in the wiki. Having non-CamelCase links highlighted actually makes the CamelCase ones even harder to see since your eyes begin to learn to look for the highlighting.
Pressing ctrl+space is OK, but I think having the suggestions pop-up automatically would make the experience even more streamlined, especially if you are going to be selecting from multiple results.
I appreciate that some users may prefer having a shortcut, so maybe it could just be a configurable option?
Thanks for the great plugin.
When clicking on a link object, the link should open in a new window (in case of an external-link) or as a new tiddler (in case of an internal link)
This explains how this can be achieved:
The edit text box is oversized compared to default TiddlyWiki, to the point that it feels quite cumbersome.
To see this go to https://tiddlywiki.com/ and create a new tiddler. Then go to https://adithya-badidey.github.io/TW5-codemirror-plus/wiki.html and do the same. The empty text box is more appropriately sized in the first instance.
The same issue seems present in the settings. See "Default tiddlers" and "Text for new journal tiddlers" under Control Panel > Info > Basics.
Thank you for creating this plugin, it's extremely useful.
I'm having an issue with the autocompletion window appearing behind the editor, so I am unable to see the list of tiddler titles to select the one I want. If the cursor close to the right edge of the edit box, I can see part of the list, but otherwise it is completely hidden.
TiddlyWiki version 5.1.23
CMPlus version 0.2.2
There are too many colours right now - some more balancing will make the editor more aesthetic.
Maybe look at examples from https://ethanschoonover.com/solarized/
It does not seem to work out of the box when using both plugins (cmplus and https://saqimtiaz.github.io/sq-tw/editor-autolists.html)
Here is a MTC:
The CodeMirror Autocomplete Sub-plugin provided in the official TiddlyWiki repository provides different functionality to the autocomplete feature of CodeMirrorPlus. It gives autocompletion for html, javascript and xml and also for already present words within a text-editor instance. This is very useful when you have to write a lot of code, while CMPlus is more useful when writing prose that links to other tiddlers.
It would be cool if both of these features could be used together, possibly requiring CMPlus to have the option to customise the shortcut used to activate autocomplete (or use no shortcut at all).
From Soren on the Google Groups
Can't speak for how Diego imagined it, but this kind of custom autocomplete is a really interesting idea. I would imagine that beginning an autocomplete run with a custom prefix would run an arbitrary filter and provide (much like the command palette in VSCode et al.) the results of the filter as choices. A variable completionText accessible within the filter would provide access to the current partial match (with the prefix removed).
It would be even awesomer if the current tiddler was also accessible within the custom filter, and if the text completed when you accept the completion can be something different than what's shown in the list (not sure if CodeMirror offers this kind of "snippet"-ish capability; see second example).
So e.g., config tiddlers could look like:
title: TagAutocompleter
tags: $:/tags/CodeMirrorAutocomplete
description: Allow tags to be autocompleted
prefix: #
filter: [tagging[]prefix]
title: EmailAutocompleter
tags: $:/tags/CodeMirrorAutocomplete
description: Given part of a contact name, autocomplete the contact's email address
prefix: @
filter: [tag[Contact]search:fullnameget[email]]
Then, say, to find specifically a tag called Test, even with 500 non-tag tiddlers beginning with T:
#T
==> Test
And to complete an email address:
This needs to be implemented. Should be fairly simple.
https://github.com/Gk0Wk/TW5-CodeMirror-Enhanced is trying to make a framework that can enhance TW codemirror in an easy way, maybe this is another way toward the goal of TW community.
Like [[*]]
and {{*}}
, can <<* "">>
have a color? And within it, can strings starting and ending with "
also be styled? Sample:
<<list-links "[tag[task]sort[title]]">>
<<macroMe "ant">>
https://github.com/laobubu/HyperMD Have some feature we might need, maybe you can use some code from it, to boost this project?
For html links, they're colored already, but can that be extended so that maybe clicking on them while CTRL is held down, will result to the link opening in another browser tab? Also, I write external links this way a lot:
[[title|http://adithyab.tiddlyspot.com/]]
can it be treated differently from a normal tiddler [[*]]
link ? Sample:
[[title|http://adithyab.tiddlyspot.com/]]
I have commented out the code for now so urls can be used without messing up the formatting of the whole file.
Need to fix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.