Comments (7)
The extension will only tell VSCode what type of text is, not the color. The choice of color depends on the theme of VSCode. There is no reliable way to specify a certain type of text so that the color of the text must be more dimmed than elsewhere.
I might try to make the plain text in the ref tags have a different type to distinguish it from the main text.(e.g. <ref>BookName, ISBN 000</ref>
) But for templates and other types of text,(e.g. <ref>{{template}}</ref>
)
At last but not the least, it's suggested for me that naming a ref and putting it in the references chapter of the article. This is a good writing practice. As follows:
Hello<ref name="hello" />
== References ==
<references>
<ref name="hello">this is a hello</ref>
</references>
VSCode的語言拓展只是在指定某段特定文字的語法類別,並不是在指定顏色。某類型的文字要渲染成甚麼顏色取決於在VSCode用了甚麼主題。插件本身不能明確指定某種文字會被染成甚麼顏色的,也就沒法保障某段文字確實能染成比較暗的顏色。
我或許會試試指定給ref裡面的純文字內容有不同的類型,這樣就能和正文區分開,不過這種指定只限於ref中的純文本。(例子見上)
另外,個人確實推薦給ref命名然後放在參考資料一章。這樣便於閱讀和管理,我想對除了可視化編輯器之外的人來說都有好處吧。(例子見上)
from wikitext-vscode-extension.
thank you for your reply and advice, but I'm mostly working on translations instead of creating new articles, that means that it would be much difficult for me to move all those references over just bear it and find texts between refs. So I'll just wait and see what you can do
from wikitext-vscode-extension.
I redefine the categories of some elements, including ref tags, and then launched a sample survey among some users, but the result is that many people seem to dislike this change. A better solution is to use a language server to make the text structure more explicit and provide some contextual support, but I don't have enough time to do so at present.
from wikitext-vscode-extension.
I redefine the categories of some elements, including ref tags, and then launched a sample survey among some users, but the result is that many people seem to dislike this change. A better solution is to use a language server to make the text structure more explicit and provide some contextual support, but I don't have enough time to do so at present.
Thank you for your work! So the changes are not going to publish right? It's fine by me because I've found a workaround for this which is to paste the source code then use the visual editor for contrasting.
from wikitext-vscode-extension.
Yes, it will be changed. That just means that the default options will not be changed.
Here is an improvement method, I will define the content in ref as meta.embedded.block.ref.wikitext
(tentative). After that, you can customize the colors you need through the editor.tokenColorCustomizations
in the user settings.
from wikitext-vscode-extension.
FYI:
- https://code.visualstudio.com/docs/getstarted/themes#_editor-syntax-highlighting
- https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#scope-inspector
from wikitext-vscode-extension.
Yes, it will be changed. That just means that the default options will not be changed.
Here is an improvement method, I will define the content in ref as
meta.embedded.block.ref.wikitext
(tentative). After that, you can customize the colors you need through theeditor.tokenColorCustomizations
in the user settings.
This effect has been adjusted separately, and the name of the range has been determined to be contentName: meta.embedded.block.ref.wikitext
(It may change in the future). In addition, you can even adjust this part to be transparent.
from wikitext-vscode-extension.
Related Issues (20)
- There are always extra `"` in the preview HOT 3
- Error when pushing changes HOT 2
- can't pull page HOT 2
- Editing Scribunto module - Cannot read properties of undefined (reading 'join');
- Update the extensions to Web extensions
- Wikimedia Two-factor_authentication HOT 2
- Web Extension Error: `TypeError: Failed to fetch`
- Add basic authentication to settings. HOT 3
- Bracket highlighting not working in v3.7.0 HOT 11
- Credential requirement HOT 1
- Commands resolving to Not Found HOT 5
- Citation Snippets for free! HOT 1
- Treat `|}` as table closure only at start of line HOT 5
- Error on launching preview HOT 7
- Braces highlight mismatch HOT 2
- Highlight error caused by `{{` in the HTML tag HOT 1
- Bug: preview doesn't work HOT 7
- Better edit summaries? HOT 3
- Extension committing edits while logged out HOT 8
- Private wiki support? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikitext-vscode-extension.