A very simple plugin that I wrote to scratch an itch.
When reshaping a list of items or a CSV/TSV data file, sometimes I need to select every Nth line in a line block, or every Nth item from a set of selections.
selery
allows you to do this easily. Details here:
4 Likes
When I wrote this plugin I thought it would be utterly useless to programmers.
Yet, I just used it for variable renaming in a shell script. Assume you have many Str_foobar
names in your buffer (where foobar
is not constant) and you want to change all of them to Foobar_str
. With selery,
- Select all
Str_foobar
names with a regex (e.g, Str_\w+
)
- Put all selections in lowercase
- Split by
_
- Rotate pairwise
- Select every other string with
:selery 2
- Put the first char in uppercase
Better (and more Kakounish) than a macro!
3 Likes