---
title: "one eyed fighting kirby"
description: "Just give em the ol one eyed fighting Kirby"
date: 2026-06-11
published: true
tags:
  - vim
template: til
---


> Just give em the ol one eyed fighting Kirby

This is a vim substitution technique to capture the rest of the line as a
capture group.

``` vim
:'<,'>s/longhorn\(.*\)/longhorn\1-rwx
```

This one captures pesky optional `"` and places it back at the end if it found
one.

``` vim
:'<,'>s/longhorn\("\?\)\(.*\)/longhorn\2-rwx\1
```

!!! see-also

    <a href="/thought-200/" class="wikilink" data-title="The One Eyed Fighting Kirby" data-description="!https://www.youtube.com/watch?v=9_Ekt1PZBzQ&amp;t=351s" data-date="2024-01-26">The One Eyed Fighting Kirby</a>

