bluegray / highlighter Goto Github PK
View Code? Open in Web Editor NEWSublime Text plugin to highlight any sequence of characters. Highlights mixed tabs and spaces, some unicode characters and trailing space by default.
License: MIT License
Sublime Text plugin to highlight any sequence of characters. Highlights mixed tabs and spaces, some unicode characters and trailing space by default.
License: MIT License
How to highlight if uses space for indent?
Add Command Palette commands...
Highlighter: Disable Highlighting
Highlighter: Enable Highlighting
Or maybe just...
Highlighter: Toggle Highlighting
...I know I can do this through Highlighter's settings file. Would be nice to be able to quickly toggle with Command Palette IMO though :)
Ideally would be good to have all hidden characters marked, include CR and LF
on osx 10.10.5 and sublime text 2.0.2 build 2221
i had to replace the DEFAULT_FLAGS_COOL in highlighter.py with valid options for sublime text 2 to get the plugin to load
DEFAULT_FLAGS_COOL = sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_EMPTY
per https://www.sublimetext.com/docs/2/api_reference.html add_regions() documentation:
sublime.DRAW_EMPTY. Draw empty regions with a vertical bar. By default, they aren't drawn at all.
sublime.HIDE_ON_MINIMAP. Don't show the regions on the minimap.
sublime.DRAW_EMPTY_AS_OVERWRITE. Draw empty regions with a horizontal bar instead of a vertical one.
sublime.DRAW_OUTLINED. Draw regions as an outline, rather than filled in.
sublime.PERSISTENT. Save the regions in the session.
sublime.HIDDEN. Don't draw the regions.
also, i would suggest some default settings that are a bit more wide reaching, or at least have one of the settings demonstrate unicode ranges as well as individual unicode characters
"highlighter_regex": "(\t+ +(?![*]))|( +\t+)|([\t ]+$)",
"highlighter_regex_cool": "[\u007F-\uFFFF]",
"highlighter_scope_name": "string",
"highlighter_scope_name_cool": "string.regexp",
The highlighting in the build results view is not helpful, so please disable it.
Just to be clear, it's not broken -- the highlighting matches my regexp perfectly -- it's just not helpful in there.
I wouldn't mind being about to disable highlighting for specific syntax modes, like plain text, etc. Maybe we could have "highlighter_ignore_syntax_modes" array in it's user prefs JSON?
For example... This would especially be helpful because Highlighter highlights all the mixed whitespace used intentionally by packages like SublimeGit package (SublimeGit needs to use mixed whitespace in git diff output, but it uses it's own syntax mode, so above suggestion would allow us to disable Highlighter for clashing syntax modes).
PS. It's a great package though, thank you for Highlighter!
On thing that keeps bugging me when working collaboratively on files is the accidential adding of new lines in the middle of a file and not using the same kind of indention as used in the other lines. I know that what .editorconfig is for ;-)
Would be cool though to see theses usages of wrong indention being highlighted. Something like this: https://regex101.com/r/1OOLDz/1
I guess due to its being depended on 4 different regex modifiers it's not working out of the box with your plugin. I'm not even sure if it's a good thing to add but I'm curious about your thoughts ;-)
even though I have the "highlighter_enabled": true
the highlight doesn't work until I'll toggle from on -> off -> on
I would expect the highlighter always work in the backgroud.
Thank you for the useful package.
"Ideographic space" is a character which represents a little wider space, which is mainly used in China, Korea and Japan if I understand it correctly.
AFAIK, many Sublime Text users in Japan use the TrailingSpaces package to highlight ideographic spaces and it would be nice if Highlighter package would support to highlight ideographic spaces by default :)
Comment blocks in PHP almost always start with tabs and have a single space to keep things neat like so:
/*
* Detect resource request
*/
With the number of these comment blocks in all modern PHP projects, could we not highlight those lines? It makes PHP classes look crazy error laden when they're not.
Hi,
I use different indentation modes for different languages. Highlighter is otherwise a great package, but it would be great if I could set different regexps in the language-specific sublime-settings files.
There should be an option to disable this for specific scopes, eg. tabular in LaTeX.
Sometimes, you just have to have mixed whitespace: http://screencloud.net/v/dPV9
Currently a dash character ("–") gets highlighted in source code as soon as the package is installed.
Hi,
The insecable space is used in France « ». It can cause many issues in a php code or in a sql code.
I have used this regex but sometime the highlighter don’t match my special character :
(
+\t+)|[\u2018\u201c\u201d\u2013\u2014]|[\t ]+$`
Any suggestion?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.