PHP syntax highlighting [closed]

Since no existing tool satisfied my needs, I wrote my own. Lo and behold: Hyperlight Usage is extremely easy: just use <?php hyperlight($code, ‘php’); ?> to highlight code. Writing new language definitions is relatively easy, too – using regular expressions and a powerful but simple state machine. By the way, I still need a lot … Read more

SublimeText encloses lines in white rectangles

If you still have a problem with those solutions suggested above (with anaconda lint): Disable linting altogether within the user-defined Anaconda settings file, Anaconda.sublime-settings, via the file menu: Sublime > Preferences > Package Settings > Anaconda > Settings – User: When it opens file, just type the following and save it away 😉 {“anaconda_linting”: false} … Read more

Syntax highlighting/colorizing cat

I’d recommend pygmentize from the python package python-pygments. You may want to define the following handy alias (unless you use ccat from the ccrypt package). alias ccat=”pygmentize -g” And if you want line numbers: alias ccat=”pygmentize -g -O style=colorful,linenos=1″ Add one of these above commands to ~/.bash_aliases for permanent effect

Where can I find a list of all possible keys for tm-themes for syntax highlighting?

tmLanguage scope names are based on convention, so there’s no definitive list. The “Naming Conventions” section at the bottom of this TextMate Manual page is fairly comprehensive though. You can also check what scopes are highlighted by VSCode’s default themes, see for instance dark_plus.json and dark_vs.json (which the former is based on / includes). Finally, … Read more

Wrong default syntax highlighting in sublime text 3

Changing the syntax highlighting for any file type is easy in Sublime. Simply open a file with the extension you want to change, then click on View -> Syntax -> Open all with current extension as… and choose whichever language you wish. This will add the current extension to the “extensions” list in Packages/User/LanguageName.sublime-settings, where … Read more

Get X and Y coordinates of a word in UITextView

UITextView conforms to UITextInput, of which a detailed description can be found here. Take a look at the required methods “textRangeFromPosition:toPosition:”, “positionFromPosition:offset:”, “positionFromPosition:inDirection:offset:”, and some of the other geometric-based methods in the UITextInput Protocol. Those might provide the functionality you are looking for. I have not actually tried to make sure these work the way … Read more