oils.vim/doc/algorithms.md at main

oils.vim - Vim syntax highlighting for Oils

Codeberg.org
Ah yes, GitHub Issues: the world's most *almost* perfect notebook. 🎉 Who needs actual notebooks when you can have links and syntax highlighting 🖍️ in a never-ending sea of #markdown and URLs? Just don't try to find your notes without a search engine! 🕵️‍♂️
https://simonwillison.net/2025/May/26/notes/ #GitHubIssues #Notetaking #SyntaxHighlighting #Productivity #HackerNews #ngated
GitHub issues for notes

GitHub issues is *almost* the best notebook in the world. Free and unlimited, for both public and private notes. Comprehensive Markdown support, including syntax highlighting for almost any language. Plus …

Simon Willison’s Weblog

Working on making a syntax highlighter for my new #esolang, Bespoke. I'm using Tree-sitter, because a Textmate grammar wouldn't be powerful enough.

So far, it recognizes each word as a series of "digit" tokens and colors those. I will tweak it to support the actual instructions!

#programming #programminglanguage #code #coding #language #syntaxhighlighting #treesitter

I have a non-Mullenweg post about #WordPress: does anyone have a good recommendation for a #SyntaxHighlighting plugin to replace Crayon? This is for our work CMS. But the catch is: has to be a plugin that works with Classic WordPress plugin (i.e. non-Gutenberg UI).

Need to customize syntax highlighting in a code block? Get the syntax definition from https://kate-editor.org/syntax/, modify it, and then pass it to pandoc with `--syntax-definition`.

E.g., if a specific program name should be highlighted in bash scripts, then grab `bash.xml` from that site and add `<item>my-command</item>` to the list of unixcommands.
#pandoc #syntaxHighlighting

Syntax Highlighting

Kate

Nowadays, eventhough I am becoming an avid fan of Emacs editor, sometime I use other editors.

Kate is one of the nice editor, I am using for many years, as KDE is my desktop.

Kate is a simple GUI based text editor, which has very good features. explore its features here – https://kate-editor.org/about-kate/

Few days back, I was explore few huge airflow log files, to find some specific errors. KDE opened the log file automatically in Kate editor.

For my surprise, it opened the huge files with highlighting the error lines.

As I am using CLI editors on local and remote machines most of the times, I have to go through all the lines always. Eyes are trained to skim quickly and find the errors patterns easily. But at this time, the Kate editor, gave color different for all the error messages. The right side small preview window helped to goto next error sections easily.

These may be the default features of other IDEs or modern editors. But, these are new tiny happy inventions for me.

Thanks KDE team and Kate developers for making our life easier and bringing happiness to all.

What are the other open source editors have these features? What is the editor you are using? Share your thoughts in your blog and reply here with the URL.

https://goinggnu.wordpress.com/2024/05/19/kate-unsung-excellent-editor-by-kde/

#editor #error #Kate #logs #syntaxHighlighting

Features

Application Features View and edit multiple documents at the same time, by splitting horizontally and vertically the window Lot of plugins: Embedded terminal, SQL plugin, build plugin, GDB plugin, Replace in Files, and more Multi-document interface (MDI) Session support General Features Encoding support (Unicode and lots of others) Bi-directional text rendering support Line ending support (Windows, Unix, Mac), including auto detection Network transparency (open remote files) Extensible through scripting Advanced Editor Features Bookmarking system (also supported: break points etc.

Kate

I've been working on a new post on how tree-sitter and syntax highlighting work with or without neovim

https://open.substack.com/pub/toftpokk/p/tree-sitter-explained?r=3mbe0b&utm_campaign=post&utm_medium=web

#neovim #treesitter #syntaxhighlighting

Tree-sitter Explained

For a long time now, I’ve wanted a syntax highlighter that would make my terminal highlighter (highlight) and text editor (neovim) agree on the color of the syntax highlight. So I came across tree-sitter, an external project that neovim uses to highlight stuff. I read a lot and found that many resources teach tree-sitter as only a

Toftpokk’s Substack

Need help ASAP with... paying attention, apparently. I made a typo, it threw off my syntax highlighter, and I mistook that for a malfunctioning syntax highlighter.

Original post:

Need help ASAP with finding a text editor for Bash.

So far all of the following text editors are unable to properly syntax highlight Bash herestrings:

* Vim
* Neovim
* Nano
* Kate
* IntelliJ IDEA
* Visual Studio Code

I'm at a loss. Even Vim isn't up to the task. I don't have the time or brainpower right now to learn Emacs. If anyone knows a text editor that can highlight Bash herestrings right, please ping me!

#bash #linux #ubuntu #programming #texteditor #texteditors #text #syntax #SyntaxHighlighting #help #shell #sh

Syntax Highlighting code snippets with Prism and the Custom Highlight API

Can you Syntax Highlight a code snippet on the web without overloading the DOM with a ton of <span> elements wrapped around the tokens? Thanks to the Custom Highlight API, you can!

Bram.us

Glow; Color; List

We’ve got three resources in today’s Drop, each named with a single word, that will help you build beautiful creations.

Subscribe

Glow

There’s a new, lightweight syntax highlighter in town: Glow (GH | docs). It’s technically part of the Nue web framework, but can function independently, and we’re going to focus on that independent nature of is framework component.

The Nue folks call Glow a microscale framework, especially when compared to the size of other highlighting libraries (Glue is 5K). Their Shiki comparison was pretty wild (this is their graphic):

Aesthetics are housed in just a handful of CSS variables and, unlike Shiki, Highlight.JS, or Prism, there aren’t a bazillion giant config files to deal with.

The code defines a series of regular expressions and rules that are common across many programming languages, such as keywords, strings, numbers, and comments. This approach enables it to cover the basic syntax highlighting needs of a wide array of languages without needing specific configuration files for each one.

The HTML_TAGS array and related functions (getTagsgetMDTags) dynamically adjust the highlighting rules based on the language being processed. This is done by filtering the rules applicable to the given language and applying them accordingly. This flexibility means that adding support for a new language can be as simple as adding its unique syntax rules to the existing framework. And, the parseRow and renderRow functions work in combination to parse each line of code and apply the appropriate highlighting based on the matched patterns.

It’s a pretty clever approach!

I tossed together a 60-line vanilla JS example (ref: section header graphic) that shows how to define some custom variables, read in a source file, and shove it in a <pre> block. The entire vanilla JS part is 4 lines (minus whitespace and comments):

// get glow from CDNimport { glow } from 'https://cdn.jsdelivr.net/npm/nue-glow@0.1.1/+esm'// get a source fileconst res = await fetch(`https://rud.is/data/generate-random-planets.R`)const rcode = await res.text()// render it into an HTML elementdocument.getElementById("src").innerHTML = glow(rcode, { language: 'r', numbered: true })

The documentation is good, but is somewhat Nue-centric, and we won’t be covering Nue until later this year. But, kick the tyres and see if the minimalist approach in Glow works well-enough to shave some bandwidth off your pages.

Color

This past week we had our sixth annual (virtual) Community Open Forum at work where I was slated to give a talk on our second annual report on internet mass exploitation. Rather than drone on and on with boring stats and facts I ended up turning it into a Jeopardy game (which also ended up slightly embarrassing my friend, who is also the company founder). I wanted to have the charts (yes, we still went over the details of the report) match the Jeopardy theme (ref: section header) and used that as an excuse to do another survey the landscape of “make a palette from an image” tools.

To my shock and surprise, the Extractor tool from Adobe Color was joy to use (as well as being free to use).

The theme extractor:

lets you define color points and cycle through “moods” (i.e., cycle through the look of the harmonized palette based on the amount of black and the intensity in the colors).

The gradient extractor:

lets you define the number of stops, then select the color points for them.

And, the tool lets you check the contrast ratio of your choices to help ensure folks can actually see your work.

It loads fast, and works well in incognito mode, but if you do have an Adobe account, you can save your work in your library.

List

List.js (GH) by Jonny StrĂśmberg is a small, delightfully simple library that supercharges HTML tables, lists, and various other elements with search, sort, and filter functionalities. It’s designed to be unobtrusive, seamlessly enhancing existing HTML without the need for extensive modifications or dependencies. This makes List.js an incredibly versatile tool for folks looking to add a layer of interactivity and functionality to web creations without the overhead of heavier frameworks or libraries.

I could drone on, but the site has tons of examples, and I whipped another one up that shows how to use it as an ES6 module in a vanilla JS context. The example has a before/after view, as well, to help you see the differences (and, how little it takes to add some style and functionality).

Subscribe

FIN

Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev â˜Žď¸

https://dailydrop.hrbrmstr.dev/2024/02/18/bonus-drop-41-2024-02-18-singularly-super-simple-tool/

#lists #paletteExtractor #syntaxHighlighting

Bonus Drop #41 (2024-02-18): Singularly Super Simple Tools

“Glow” is a lightweight syntax highlighter that works independently and uses minimal CSS variables. “Color” introduces Adobe Color’s theme and gradient extractor tools for creating harmonized…

hrbrmstr's Daily Drop