Git Product home page Git Product logo

tw5-codemirror-plus's Introduction

tw5-codemirror-plus's People

Contributors

adithya-badidey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zhangaz1 cdaven

tw5-codemirror-plus's Issues

Retain compatibility with the official autocomplete plugin.

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).

[feature request] macro syntax

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">>

Edit-text boxes are oversized

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.

Revert to normal CodeMirror behaviour when theme is set to "default" or "tiddlywiki"

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.

[Bug] em doesnt work

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.

Feature request: Ignore leading spaces in bulleted lists

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.

[feature request] macro definitions

\define macroMe(name:"teacup")
I'm a little $name$
\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 $name$ is highlighted in another color, maybe <>?

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)

Internal-link autocompletion window hidden

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

image

Customized Autocompletion

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:

@alice
==> [email protected]

Feature request: Close brackets automatically when using autocomplete

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.

[feature request] external links

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/]]

Feature request: Show autocomplete suggestions automatically without a shortcut

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.

Highlight CamelCase links

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.

Bug in Auto-completion

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.

[Feature] Autocomplete for [[ and {{

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 [[

Spell checking

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.