White text in Sublime Text - colors

I downloaded Sublime text from them website and my code still white, I don't know why. I unistalled and reinstalled it 3 times, tried to install themes packages etc I don't understand what is wrong.

This happens when Sublime Text doesn't know which syntax highlighting to choose. First of all Sublime Text guesses the syntax from the file extension. E.g. if you have a file named my_file_name.php Sublime Text assumes that the PHP syntax highlighting is the best.
In your picture the file name is script_connection without any file extension so Sublime Text doesn't know which syntax it is. You can select a syntax from the menu View » Syntax or press Strg + Shift + P and type Set Syntax. Another way is to click the syntax name (probably Plain Text) on the right bottom corner of Sublime Text and select a syntax format.

Sometimes when we insert Html and css and php codes in one file and as a default Sublime highlight the html and css codes because sublime knows just know html and css codes so we should open sublime application and select view from navigation bar and select syntax and then select php it will knows all types of tags and elements and highlight all.
Sublime => View => Syntax => PHP

Related

Fix code c++ code highlighting in sublime

I would like to copy the C++ code highlighting from sublime into a word document.
I installed the package https://github.com/n1k0/SublimeHighlight/
I have the following text:
When I ask to view as RTF
I get:
Where the highlighting is no longer consistent. Is there any way to fix this?
Additionally, is it possible to copy the native syntax (first image) into rtf?
Best Regards
From the readme of the SublimeHighlight package you are using (emphasis mine):
This SublimeText2 package allows to highlight & export currently edited code to HTML or RTF using Pygments.
So this package will not help to have syntax highlighting like ST.
Sublime Text has included a command to copy the selected text as HTML since build 4092 (November 2020). (Edit menu -> Copy as HTML)
If you really need Rich Text Format instead, you could potentially look for a HTML -> RTF converter, but if you just want formatted text to paste into another application, then this does the job - I just pasted it into LibreOffice Writer for example, and it matched the ST highlighting exactly, as expected.

How to load default HTML file in sublime text 3?

Am using Sublime Text 3 and have seen some people loading default HTML content / template just by typing words like html5or doctype. Which package do i need to use for getting same control ?
The html snippit is included in Sublime Text 3 by default.
From an empty file, set the syntax to HTML (either by saving the empty file with a .html extension, or by pressing Ctrl+Shift+P to open the command bar, and searching for "Set Syntax: HTML").
Then type html into the file, and press tab. Sublime Text should expand the snippet, giving you a basic HTML file with doctype, head, and body tags.
Try emmet plugin. It provides this sort of functionality. https://emmet.io/

RTL language with Sublime Text editor

The RTL languages are not supported in the sublime text editor
I tried this plug-in Bidirectional text support
on windows os
Copied all files from the zip Sublime-Text-2-BIDI-master to the ST3 folder and changed the font type and size.
then I copied the unicodedata.pyd to C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\Bidirectional text support\bidi
now the Tools > Bidirectional text part didn't look gray anymore but it is still disabled.
also I copied these two lines but it didn't work
sys.platform.startswith('win'):
sys.path.append('../../..')
Any help would be appreciated
In order to get Sublime Text to work with Arabic characters using Sublime Text BIDI plugin on Windows correctly, ensure you've done the following:
Copy the plugin folder to the following path C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\
Copy unicodedata.pyd from ST installation directory to both, the main plugin folder which in your case is Sublime-Text-2-BIDI-master and inside bidi folder.
Set your sublime user-settings to the following:
{
"font-face": "arial",
"font_size": 11,
"default_encoding": "UTF-8",
"fallback_encoding": "Arabic (Windows 1256)"
}
Reload the plugin by viewing rtl.py and saving
In the case that doesn't fix it, you can read what sublime console log outputs when you click on Bidirectional text for a given Arabic text, console log can be accessed through ctrl+~.
Very Easy,
Just follow this Video steps
دعم اللغة العربية في برنامج Sublime
1- Download the Sublime-BIDI-master folder from Github of solution
2- Extract it and paste under \Sublime Text Build (whatever)\Data\Packages(the downloaded folder).
3- open sublime wit any RTL Language file and right click anywhere you'll new options (Bidirectional text) .. Click it :).
However, in my Sublime version (build 3126), Arabic letters will be reshaped when switching to Bidi.
Initially in the range U+0621-U+064A, which are the usual Unicode codes for Arabic letters, characters will be mapped to the range U+FE70-U+FEFC, which are codes for each (isolated, initial, middle, final) Arabic connected forms. These latter codes, called Arabic-Presentation-Forms-B, are deprecated by Unicode and their usage should be very limited.
For example, before switching to Bidi, the word كتب, looks ب ت ك, from left to right U+0643 U+062A U+0628. This is the memory order. (It is up to the final rendering tool to display the string in visual order by connecting letters.)
After Bidi switching in Sublime, the word will appear good as كتب, because the codes are ﺐ ‎U+FE90 followed by ﺘ U+‎FE98 followed by ﻛ U+‎FEDB. In this order. That means, in a Bidi enabled tool like a browser, it will appear ﺐﺘﻛ as the final visual order. This is not what the user expects.
So, not only Bidi switching changes the letters code, it also changes the memory order.
Personal experience.
When editing a source file (HTML and other languages or formats) containing some RTL characters, it is really tricky to navigate in the text edited. So the mode "before" (logical or memory order) might be very helpful than the mode "after" (visual or display order). With logical order, it's useless to join letters, it doesn't make sens.
Check this link, I had the same problem but solved it with the Sublime Text BIDI plugin.
I was still facing an issue because of the editor's font. It will be recommended to use a fixed-width font like Courier New. This should ensure the plug-in works as expected.

How to enable brackethighlighter plugin in sublime text 3?

I am using sublime text 3 build 3059 , brackethighlighter plugin is installed but not working how to make it work ? i tried several solutions but no effect.
here is screenshot:
The plugin is working - you'll notice in your screenshot that the opening and closing {} brackets are bold underlined in white (the default style), and are also shown in the gutter, next to the line numbers. If you want to customize the display more, first open Preferences -> Package Settings -> Bracket Highlighter -> Bracket Settings - User. It will be blank at first. Next, open ... -> Bracket Settings - Default. Copy the entire contents of Default to User, then close Default (you can't edit it in Sublime Text 3).
Next, check out the Bracket Highlighter Sublime Text 3 docs and read all about how to customize the plugin to your heart's content. Good luck!

Which Notepad++ plugin is highlighting my HTML colors?

I have a plugin that I installed that does this:
I really like this function (highlighting HTML colors) but I don't know plugin does it. I want to put it on the another copy of Notepad++ but installing plugins is a rather big thing and I don't want to have to install them all - it gets cumbersome.
Does anyone know which plugin highlights my colors?
It's a wonderful feature.
I think that you are referring to the HTML Color plugin. You can find it here
http://npp.campulka.net/
I think that feature was taken out of Notepad++ due to the users' inability to read the text at times if the colors were too overwhelming. Instead, I recommend trying to install the Quick Color Picker or HTML Color plugins. They are about as close as you're going to get:
Quick Color Picker: https://code.google.com/p/nppqcp/
HTML Color: http://npp.campulka.net/
Source: Notepad++ hover preview on link or color?
Check Quick Color Picker for Notepad++.
The plugin puts the colored underline under the color code based on it's value and thus is not obtrusive in reading the text.
I'm using it without any issues with the Notepad++ v6.9.2
I just ran into this and resolved it as follows:
Download and install the UDL file found at https://github.com/notepad-plus-plus/userDefinedLanguages (get the zip file with all languages). Instructions for installation are on that page. Close Notepad++ and reopen, then go in your Notepad++ menu to "Language". You should now see a long alphabet list with subcategories off to the right indicated by an > Go to H then click on the > and select HTML with your HTML file open in Notepad++ The moment you do that, all your HTML syntax will (should!) be highlighted.

Resources