Which Notepad++ plugin is highlighting my HTML colors? - 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.

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 display a text file (.txt) as a code file with color in Sublime Text 3

I'm using sublime text 3. And I want to display a text with color like a code file in Sublime. But I don't know how to do. Please help me!.
Thanks you!
You can manually set the syntax of any file using the Command Palette and type "Set Syntax: " or from the bottom right dialog (by default it reads "Plain Text").
If you want Sublime Text to remember your choice, you can also do that from the syntax selection dialog mentioned above, or View > Syntax > Open all with current extension as…".
I think if you need your text file for purposes like note taking, there is a nice hack.
Go to View > Syntax and then select haskell. Haskell syntax highlighting is subtle and works fine. To highlight something just capitalise the first letter and it pops in a different colour. Numbers are highlighted in a different colour again, increasing readability. Finally brackets commas etc have different colour which further helps.
Well, coloring is based on the syntax, like every programming language has its syntax, but the pure text file is hard to detect the syntax since it can be anything. So if you use the Sublime to coding,try save it as a file with file extension first, then the Sublime will detect by itself, however you could also do this manually.
The ability to create your own syntax highlighting rules is one of the excellent features of SublimeText.
Have a look here at some other people wanting to build their own syntax highlighting rules:
How to not highlight object keys such as 'do'/'package' as keywords in Sublime?
Sublime Text - C++ Highlight
That explains the basic tools you need to use to do what you want to do.
Following the same ideas there you can build a syntax highlighting scheme for whatever it is you want to achieve in your text file based on whatever syntax rules you are trying to follow. Hard to imagine what those are for a text file without you supplying exact details but if you want to do it Sublime Text gives you the power to do it.
If you give that a try and have trouble with developing the relevant Regular Expression/s to do what you want to do then post what you have done and how it is not working the way you hoped and perhaps we can help you get to the end of the game.

Can't change comment color in sublime text editor 3?

I have what I would consider the perfect theme colors for my Sublime Text Editor 3 application; however, the only thing that is very annoying and hard to see is the comment colors. They're the same color as the background but maybe just one shade lighter.
I've seen some other posts on here on editing theme color files within Sublime Text but for some reason it seems like the data isn't taking effect. It's like it's going off of cached data or something.
For example, I'm using the "Monokai" theme. I've edited /opt/sublime_text/Packages/Color Scheme - Default.sublime-package and searched for Monokai. I changed the hex color code under lineHighlight, and restart Sublime. Nothing changes. In fact, I've changed numerous hex color codes under that section and restarted Sublime Text and absolutely nothing has change.d
What am I doing wrong here? I'm running this on Linux Mint 17.3 Cinnamon
I was unable to change comments color by editing Monokai.tmTheme even after purging cache or sublime reinstall.
For Sublime 3.1.1 Build 3176 editing Monokai.sublime-color-scheme works.
1. Open Package Resource Viewer
2. Open Color Scheme
3. Open Monokai color scheme
4. Add you desired color in variables (pick here)
5. Change comment color
6. Enjoy your new comments color!
I've done exactly what you said, changed the value under lineHighlight in Monokai.tmTheme in Color Scheme - Default.sublime-package, restarted Sublime Text and it worked just fine. I'm running Build 3103 on Manjaro Linux.
Sublime Text stores its settings and cache ~/.config/sublime-text-3, I suggest temporarily renaming this folder, which should take you to a freshly installed state. Then make sure Sublime Text really restarts and that your color scheme changes are really in place.
I encountered the same problem. I found the following way solved my problem.
According to #Саша Черных, one can go to
tmtheme-editor.herokuapp.com/#!/editor/theme/Monokai to create and download a customized theme. Then, in Sublime Text 3, from [References -> Browse Packages...], you can find where your Packages folder locates. Just put the downloaded file "Monokai.tmTheme" in that folder, restart app, then it's done.

How can I use a right to left language in "Sublime Text" editor

I want to use some strings which are in my language (Persian) in "Sublime Text", but the editor does not show them correctly, for example:
it should be:
<title>عنوان صفحه</title>
but this is how sublime is showing it:
The encoding is set to utf-8.
What should I do to fix it?
There is This Plugin But It Does Not Work Properly
https://packagecontrol.io/packages/Bidirectional%20text%20support
added by barlop
Important Note- As comments indicate, this plugin doesn't really work. People have issues copy/pasting from sublime into notepad. It's OK for viewing but that's not much of an answer.
Note, sublime with this plugin might show leters in the correct order but copy/paste in notepad and it might not so try copy/pasting in notepad first before typing a whole load in there. Also this plugin might not move the cursor in a right to left fashion. (i.e. type a letter the cursor when typing in a right to left language should move to the left)
To install,
i've tested this on ST3 portable.
if you go to the tools menu you see there's no bidirectional option
Then if you go here
https://packagecontrol.io/packages/Bidirectional%20text%20support
see it mentions
their github page here
https://github.com/praveenvijayan/Sublime-Text-2-BIDI
Click on Clone/Download then download zip
extract it and Copy the folder to the packages folder.. i.e. open sublime, do preferences..browse packages , and it gives a folder like C:\Users\harvey\Downloads\ST3\Data\Packages Paste the folder there. (maybe it's better to put it in the user subdirectory, I don't know).
Then go to the tools menu and you see bidirectional options like bidirectional text that weren't there before
And while you're at it you may want to install "package control" if it's not already installed. Go to tools..command palette.. type 'package' see if package control appears. Or go to preferences, see if there is package control listed. If not then you don't have 'package control' installed. You can install package control by going to https://packagecontrol.io/ and click install and it gives you some python code in 2 tabs, one for ST2, one for ST3, and you can paste it into your console(view..console). But it's not strictly necessary you can install the bidirectional package without doing that.
The RTL-Mirror plugin for sublime 3 will show you the correct text by hitting Ctrl+F1 on Windows and OSX and Shift+F1 on Linux. it's not the perefect solution but it helps.
For the last few years my workflow has to been use VS Code as an IDE, for coding, and Sublime Text 3 (sorry, 4) for editing plain text because of its startup speed and because VS Code would be overkill.
However, since it's pretty clear by this point that the ST devs don't intend to implement RTL support, and because I would rather not have to install a third text editor just to deal with RTL text (which there are very few of anyway), there were only two convenient options left for me to open up RTL files on Windows.
Use Windows 10's Notepad (yes, really)
This is the superior solution since the new Notepad works well, starts up faster than Sublime, and not only renders RTL text but renders it quite well. The only downside is the lack of a dark mode.
Use VS Code (or whatever your preferred IDE is)
Both free IDEs like VS Code and paid ones like PHPStorm and IntelliJ seem to support RTL out of the box, but pretty much the only good reason to do this is if you absolutely need dark mode or are not on Windows - otherwise all of them up start up far slower than Sublime, and in the case of VS Code, render RTL text worse than Notepad does (I can't speak for JetStorm IDEs on that front).
Who knows, if I find a better alternative text editor that I can move my custom theme over to I may eventually move away from Sublime completely to another editor, but until then, sticking to two editors.

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.

Resources