Skip to content

Commit a1c857b

Browse files
committed
initial commit 0.10.0
1 parent 057f3bc commit a1c857b

15 files changed

+5044
-0
lines changed

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or
4+
distribute this software, either in source code form or as a compiled
5+
binary, for any purpose, commercial or non-commercial, and by any
6+
means.
7+
8+
In jurisdictions that recognize copyright laws, the author or authors
9+
of this software dedicate any and all copyright interest in the
10+
software to the public domain. We make this dedication for the benefit
11+
of the public at large and to the detriment of our heirs and
12+
successors. We intend this dedication to be an overt act of
13+
relinquishment in perpetuity of all present and future rights to this
14+
software under copyright law.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
23+
24+
For more information, please refer to <http://unlicense.org>

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Sublime Text Monokai C# theme for Visual Studio Code
2+
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)
3+
4+
This theme is exactly the same Monokai's theme of Sublime Text but for Visual Studio Code instead. Unlike default VSCode's Monokai, this is an actual, perfect and identical copy of the loved by all Sublime Text's theme. It's name is **Sublime Monokai**.
5+
6+
- [Visual Studio Marketplace: Theme&Colorizer Extension](https://marketplace.visualstudio.com/items?itemName=maximetinu.identical-sublime-monokai-csharp-theme-colorizer)
7+
## Screenshots
8+
![Sublime monokai theme demo](/screenshots/sublime-monokai-demo.png?raw=true "Sublime monokai theme demo")
9+
### Comparison between this theme and Sublime Text's
10+
![This theme vs Sublime Text's](/screenshots/sublime-monokai-vs-sublime-text.png?raw=true "This theme vs Sublime Text's")
11+
### Comparison between default VSCode Monokai theme and Sublime Text's
12+
Observe the differences. Is subtle but it's there.
13+
![Default VSCode Monokai vs Sublime Text's](/screenshots/default-monokai-vs-sublime-text.png?raw=true "Default VSCode Monokai vs Sublime Text's")
14+
## Instructions
15+
Option 1, search for the extension in Visual Studio Code Marketplace:
16+
1. At the Welcome tab *(Help>Welcome)* click "Tools and languages" and search by my "identical sublime monokai theme". Install it.
17+
2. Ready to code!
18+
19+
Option 2, install it as a local VSCode extension:
20+
1. Copy the folders in this repository *csharp-sublime-colorizer* and *theme-sublime-monokai* into your folder *<User Home>/.vscode/extensions/*.
21+
2. Ready to code!
22+
23+
Make sure that you choose the **Sublime Monokai** color theme at the Welcome tab *(Help>Welcome)* and check bottom right if **C# Sublime Colorizer** is working instead of the default C#, as can be seen in the next screenshot:
24+
![Sublime colorizer working](/screenshots/sublime-colorizer-working.png?raw=true "Sublime colorizer working")
25+
26+
**Why override C# parser/colorizer if it's a theme? Keep reading.**
27+
28+
---
29+
30+
## Why default VSCode's Monokai is so different from Sublime Text's?
31+
There are two reasons.
32+
33+
First of all, VSCode's theme assign the same style to certains colorizer rules which differ each other in Sublime Text. It's possible to solve it by modifying the default VSCode Monokai's theme.
34+
35+
Secondly, no matter how much we modify default VSCode's Monokai, it's impossible to get the same color scheme as Sublime Text due to limitations of the C# colorizer that uses VSCode. On the one hand, VSCode groups in the same selector two things which are different styled in Sublime Text, and it is not possible to assign different styles to things with the same selector. On the other hand, the VSCode C# colorizer is more limited due to it is only possible to assign one single selector to each code token, unlike Sublime Text's colorizer, which allows the assignment of multiple selectors to increase flexibility when it comes to styling. This is because VSCode uses a *.tmLanguage* file as colorizer while Sublime Text uses *.sublime-syntax* files to make the parsing. It is possible to convert from *.tmLanguage* to *.sublime-syntax*, but not the opposite, since *.sublime-syntax* is a superset of *.tmLanguage* functionality, so it is not possible to convert in such a way.
36+
37+
In the next screenshot can be seen the gap between the two colorizers:
38+
![tmlanguage vs sublime syntax](/screenshots/tmlanguage-vs-sublimesyntax.png?raw=true "tmlanguage vs sublime syntax")
39+
### So, what's the trick, then?
40+
I've modified the VSCode C# colorizer (the *.tmLanguage* file) to differentiate differents elements. Once that's done, I've modified the default VSCode's Monokai theme to assign the styles as Sublime Text does. That's why it's necessary to modify the official C# parser folder.
41+
42+
**Happy coding!** now with Monokai ;)
43+
44+
---
45+
46+
**UNLICENSED**
47+
48+
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)
49+
50+
- Only tested in Windows 10, but it should also work in MacOS and Linux.
51+
- Only tested with C#, but it should also work for other programming languages. It should be more like Sublime's Monokai working with any language, but it won't be as accurate as with C# since the only colorizer modified is the C# parser.
52+
- Only tested with Visual Studio Code, but it should also work with Visual Studio IDE as long as the *.tmLanguage* file (the colorizer) is modified or replaced and the theme is installed too.
53+
54+
In general, it should also work in any editor which uses the same Text Mate grammar tokens as theme and the *.tmLanguage* as colorizer, as Text Mate editor itself.
131 KB
Loading
18.6 KB
Loading
56.5 KB
Loading
133 KB
Loading
127 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
2+
3+
[{
4+
"name": "maximetinu/sublime-monokai-theme-colorizer",
5+
"version": "0.1.0",
6+
"license": "UNLICENSED",
7+
"repositoryURL": "https://github.com/Maximetinu/Sublime-Text-Monokai-theme-for-Visual-Studio-Code",
8+
"description": "Actual, perfect and identical Monokai Sublime Text Theme for Visual Studio Code and C# colorizer to make it possible"
9+
}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Sublime Text Monokai C# theme for Visual Studio Code
2+
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)
3+
4+
This theme is exactly the same Monokai's theme of Sublime Text but for Visual Studio Code instead. Unlike default VSCode's Monokai, this is an actual, perfect and identical copy of the loved by all Sublime Text's theme. It's name is **Sublime Monokai**.
5+
6+
---
7+
8+
**Important!** Make sure that you choose the **Sublime Monokai** color theme at the Welcome tab *(Help>Welcome)* and check bottom right if **C# Sublime Colorizer** is working instead of the default C#, as can be seen in the next screenshot:
9+
10+
![Sublime colorizer working](/screenshots/sublime-colorizer-working.png?raw=true "Sublime colorizer working")
11+
12+
---
13+
14+
## Screenshots
15+
![Sublime monokai theme demo](/screenshots/sublime-monokai-demo.png?raw=true "Sublime monokai theme demo")
16+
### Comparison between this theme and Sublime Text's
17+
![This theme vs Sublime Text's](/screenshots/sublime-monokai-vs-sublime-text.png?raw=true "This theme vs Sublime Text's")
18+
### Comparison between default VSCode Monokai theme and Sublime Text's
19+
Observe the differences. Is subtle but it's there.
20+
21+
![Default VSCode Monokai vs Sublime Text's](/screenshots/default-monokai-vs-sublime-text.png?raw=true "Default VSCode Monokai vs Sublime Text's")
22+
23+
**Why override C# parser/colorizer if it's a theme? Keep reading [the repo](https://github.com/Maximetinu/Identical-Sublime-Text-Monokai-theme-for-Visual-Studio-Code)**
24+
25+
**Happy coding!** now with Monokai ;)
32.9 KB
Loading

0 commit comments

Comments
 (0)