Sublime Text 3 Highlighting Jquery Angular Syntax Issue - sublimetext2

After updating from Sublime Text 2 to Sublime Text 3, I have experienced some issues with the highlighting of variables mostly in the case of Angular or JQuery elements no longer having a highlight of pink (using Monokai theme; default)
Has anyone experienced this issue or know a way to resolve this?

These variables have, with the normal javascript syntax, the scope variable.other.dollar.js. The scope variable and variable.other have no highlighting in the monokai colorscheme. If you want to add a highlighting on your own, you can just modify the colorscheme. To do this I would recommend the Package Resource Viewer. Just press ctrl+shift+p and select PackageResourceViewer: Open Resource and navigate to the monokai colorscheme. This will open the colorscheme xml file.
If you save it, it will not change the existing one (which is read only in a zip folder), but create it in your Packages folder. This colorscheme will shadow the existing one. Add the following entry at a reasonable position and the variables should be highlighted pink:
<dict>
<key>name</key>
<string>JQuery Variable</string>
<key>scope</key>
<string>variable.other.dollar.js</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FF90FF</string>
</dict>
</dict>
In general you can use the ScopeHunter to retrieve the scope and adapt the colorscheme to fit your requirements.

Related

How to remove an embedded hyperlink in Visual Studio Code

I have a csv file I am working with in Visual Studio Code(VSC). The file contains several hyperlinks attached to text in the document. For example:
Available at SSRN: [https://ssrn.com/abstract=3261275][1]
I want to remove these hyperlinks. I checked the basic editing documents for Visual Studio Code. However, they provide no guidance on how to edit text in Visual Studio Code. Rather, the only available information is on editing text in VSC is how to develop or use keyboard shortcuts. And, after looking through all off the keyboard shortcuts - I have not been able to find a command to remove a hyperlink or clear text formatting.
If this were a word document I could simply right-click and select remove hyperlink or select the clear formatting icon. However, I have been unable to discover how to perform this function in VSC.
How do I remove a hyperlink from text in CSV file in Visual Studio Code?
Thanks!
// Controls whether the editor should detect links and make them
clickable.
"editor.links": true,
That is the default, set it to false in your settings.json.
If you want to set it to false for certain filetypes only, you would use something like:
"[plaintext]": {
"editor.links": false,
},

HTML text style shortcuts functioning within Github repository file edits?

I am just starting to learn Javascript, and I have a small question about editing files within a Github repository.
I am writing functions within a file in my repository that involve mathematical equations, and I am finding that within the editor itself, it is changing the style of the text based on common HTML shortcuts. In my case, whenever I use the asterisk key, *, to multiply values, the editor file will show all text between two consecutive asterisks in italics. It doesn't change the nature of the code itself at all, so it's just a QOL issue for me personally. It's just strange to see blocks of my code appearing italicized within the editor.
Is there any way to have HTML not try and parse such characters as text style shortcuts within the Github repository file editor?
Use .js file extension for Javascript code.
In README.md file put basic description for your project. Basic guid how to write README.md

How can I enable HTML entity highlighting in VS Code?

On the VS Code UserVoice page, there was a request to add suggestions and highlighting for HTML entities such as &. Microsoft marked this as complete with a comment stating "This feature was implemented in Visual Studio 2013 for HTML and Razor documents." I assume that means that it was implemented in VS 2013, but not VS Code.
Assuming that's correct, how can I add highlighting for these items within HTML documents? They seem to highlight properly within XML documents. Looking at syntaxes/html.plist, it looks like it should be capturing HTML entities, so I would assume the theme would color them appropriately, but I don't really understand how any of it works on the backend.
My questions are:
Should VS Code be highlighting these items?
If not, can I change the HTML syntax file or theme file to make it do so? If so, how would I do that?
Here's html.plist (which is the default, as it installed):
<key>entities</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.entity.html</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.entity.html</string>
</dict>
</dict>
<key>match</key>
<string>(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)</string>
<key>name</key>
<string>constant.character.entity.html</string>
</dict>
<dict>
<key>match</key>
<string>&</string>
<key>name</key>
<string>invalid.illegal.bad-ampersand.html</string>
</dict>
---EDIT---
Here's some screenshots to clarify what I mean (both taken with same theme):
XML.plist looks pretty similar to HTML.plist when it comes to these entities, but I won't add XML.plist to this already lengthy question unless someone doesn't have their own copy and wants me to.
You can do it using extensions
You can add new TextMate theme files (.tmTheme) to your VS Code installation using VS Code's Yeoman extension generator, yo code. The extension generator takes an existing TextMate theme file and packages it for use in VS Code.
ColorSublime has hundreds of existing TextMate themes to choose from. Pick a theme you like and copy the Download link to use in the Yeoman generator. It will be in a format like "http://colorsublime.com/theme/download/(number)". The 'code' generator will prompt you for the URL or file location of the .tmTheme file, the theme name, and other information related to the theme.
Copy the generated theme folder to a new folder under your .vscode/extensions folder and restart VS Code.
Open the Color Theme picker theme with File > Preferences > Color Theme and you can see your theme in the dropdown. Arrow up and down to see a live preview of your theme.
You can create a theme yourself too
You can also author your own TextMate themes from scratch. Consult the TextMate theme and language grammar naming conventions documentation for details.
Besides the TextMate language grammar standard scopes, VS Code also has custom theme settings which you can use to tune your own theme:
rangeHighlight: Background color of range highlighted, like by Quick open and Find features.
selectionHighlight: Background color of regions highlighted while selecting.
inactiveSelection: Background color of selections when not in focus.
wordHighlight: Background color of a symbol during read-access, like reading a variable.
wordHighlightStrong: Background color of a symbol during write-access, like writing to a variable.
findMatchHighlight: Background color of regions matching the search.
currentFindMatchHighlight: Background color of the current region matching the search.
findRangeHighlight: Background color of regions selected for search.
linkForeground: Color of links.
activeLinkForeground: Color of active links.
hoverHighlight: Background color when hovered.
referenceHighlight: Background color of a reference when finding all references.
guide: Color of the guides displayed to indicate nesting levels.
You can find an example VS Code theme here which includes the custom settings.
Authoring a theme is fairly tricky as the grammars all behave a bit differently. Try to follow the TextMate conventions and avoid language specific rules in your theme as grammars can also be replaced by extensions.
This is a feature request for VS Code: https://github.com/Microsoft/vscode/issues/784
Answering your questions:
Yes.
You can submit a Pull Request to the project, thus benefiting everyone else! The code you want to modify is here and here's how you can contribute.
You can change the "Color Theme" to highlight HTML entities in VS Code.
Go to Preferences -> Color Theme and select another theme – for example "Light+ (default light)" oder "Dark+ (default dark)" to make highlighting of HTML entities work.

Color scheme/Theme used in Plain tasks sublime plugin

Can anyone please tell me, whats the color scheme that is being used by Plain Tasks? Any sublime color scheme plugin that you may aware of would be great.
If you go through the files on Github, you'll find that there are several .hidden-tmTheme files. These are formatted just like regular .tmTheme color scheme files, except that they are specific to a certain plugin, and are not visible through the Preferences -> Color Scheme menu. If you'd like to use one of them as a regular color scheme, simply copy the file to your Packages/User directory and rename it to end with .tmTheme instead of .hidden-tmTheme. It will now be available via Preferences -> Color Scheme -> User.

Make sublime text recognize .block filetype as a .html file

I have been working with SquareSpace. The developer mode allows you to customize some of their files which consist of filetypes like, .block, .region, wtc.
However, they are just html files with json-t scattered throughout.
Is there anyway I can get the editor to recognize those file types as html so that I can use autocomplete and just get a better view as to what I'm looking at?
Thanks
Open a file of that type, and click in bottom right corner on the language. Then select Open all with current extension as..., and select HTML from the list.
Press Cmd+Shift+P
Type html
Select Set Syntax:HTML