I’m going to come clean right off the bat. The title of this post is my half-hearted attempt at clickbait: what you are about to read can’t reasonably be described as a security issue. It barely even qualifies as advice, in that the thing I intend to demonstrate you should NEVER DO is something you didn’t have any plans to do in the first place. It’s really more of a fun…
I am DELIGHTED to announce the release of version 1.0.0 of Rainbow Trails . It contains a small but meaningful number of bug fixes and filed off edge cases, and includes a completely reworked and highly configurable new timing system allowing precise control over the speed the rainbows traverse the buffer. It also features some improvements to highlighting. If you already use Rainbow Trails,…
I wrote a new plugin over Easter. It is called Rainbow Trails 1 and it adds a touch of MAGIC to your motions. If your life could do with a spot of COLOUR, You should go install it now! I’m not good at naming things. Did I mention this very site was delayed for literal YEARS till I managed to come up with a good domain name? 2 ↩︎ Of course, then two came along at once.…
The Question After seeing the macro Game of Life , Benoit de Chezelles asked on Mastodon: I replied: But just because something isn’t practical , doesn’t mean it’s not possible , and so I decided to write this post to explain how you can write a macro that acts differently depending on whether an f, motion succeeds or fails. The Challenge Benoit politely declined to give me a…
I’ve never done Advent of Code before, and I wasn’t planning to do it this year 1 , but for some reason I decided to try my hand at solving the 2023 event’s Day 1’s challenges in Vim, using only its editing commands. (So ex commands are allowed, but Vimscript’s more programmerly constructs — functions, loops, conditionals, etc. — aren’t.) It was fun! So much…
I have devised an entirely new method of sorting numbers. Quicker 1 than quicksort, more EFFERVESCENT than bubblesort, I present to you: Vim Macro Sort Vim Macro Sort uses NO Vimscript, NO chicanery with control characters, and it NEVER leaves normal mode. It’s just a plain old ASCII text file with a bunch of editing commands in it. Try It Out! Start using this new sort macro TODAY! Download…
When I found out that Bram had died I posted a short thread on Mastodon, but I haven’t written anything here yet because I haven’t quite been able to work out why it hit me as hard as it did and what I wanted to say about it. Two months on, I still haven’t really figured it out, so I’ll just say that, by all accounts, Bram was an exceptionally generous person, and note that…
Vim’s insert mode completion has a very nice feature where you can start typing a natural language word and then press Ctrl-X Ctrl-K to complete it. By default, it pulls the words used for the completions from the file specified with your 'dictionary' option, but this requires you to have such a file, which is not always 1 the case for the computers I do my Vimmin’ on. But there is a…
Tim Chase posted a clever little :substitute command on Twitter : Had some regex with lots of repeated \d in them like \d\d\d\d Converted them all to \d{n} notation in vim using :%s!\%(\\d\)\{2,}!\='\d{'.(strlen(submatch(0))/2).'}'!g Just in case it's useful for anybody else. — Tim Chase (@gumnos) May 18, 2023 As always , my instinct was immediately to see if you can do it as a macro 1 . You…
Because vimclippy is a shell command, iVim users may fear they are OUT OF LUCK when it comes to FAST clipboard-editing, and that they are doomed to forever tapping out "*P … :%y* like NEANDERTHALS. But there is a way. Step 1: Create a User-Defined Command First we’re going to set up a :VimClippy Ex command to insert the current content of the clipboard into a buffer and set up the…