Ben Crowder

Blog: #text-editing

2 posts :: tag feed :: about the blog :: archive

I ended up tweaking my Vim syntax highlighting earlier this week (after my first post), to be more in line with what Ben had posted. Here’s what I’ve come up with so far (with the disclaimer that all of this code is internal and wasn’t written with the expectation that it would ever be seen by anyone else) (and I’m also still fairly new at writing Go and Rust):

syntax-python.png

And some Rust, Go, and HTML:

syntax-rust.png
syntax-go.png
syntax-html.png

These are certainly more soothing to my eyes, which was something I didn’t realize I needed. While these aren’t perfect in the least — with enough variation between languages to look almost like entirely different color themes, though I think I see that as a feature and not a bug — I’m happy with the tweaks for now and plan to stick with them.


Reply via email or via office hours

Over the weekend I read Ben Kuhn’s post on syntax highlighting and thought the idea sounded intriguing, so I tried it out.

Here’s what I had before (and let me add that I was tweaking my Vim colors a few days before this, so this wasn’t technically my normal setup) (and let me further add that this is fairly old code and not anything particular exciting):

syntax-before.png

And after, where comments are bold and brighter than the rest of the dim code:

syntax-after.png

Hmm. This isn’t a perfect implementation of the idea in the least, but even so, I don’t know that I like having comments so predominant.

This does, however, give me several ideas for modifying my existing color scheme (or starting from scratch, which is feeling a bit more likely right now). Something more soothing, less garish. And still some way to make comments stand out more — italics or a somewhat brighter color, probably. (Sidenote: nvim-treesitter has caught my interest.)


Reply via email or via office hours