New extension: Comma List

A new extension to solve a common text-editing task:

Comma List

Split a comma-separated list into separate lines, and vice versa.

Download: CommaList.popclipextz

Description

CommaList-demo

The extension has two actions, both with the same icon, which appear only when the text selection contains a suitable input:

  • The Join with commas action is available when the text selection contains more than one line. It replaces each newline with a comma and a space. Blank lines, and spaces at the start and end of lines, are ignored.
  • The Split into lines action is available when the text selection is a single line, with at least one comma. It replaces the commas (and any spaces around the commas), with newlines.

About

This is an extension for PopClip.

Author

Nick Moore

Requirements

Requires PopClip 2021.11.

Links

Changelog

v1 - 30 Apr 2022

  • Initial release
4 Likes

This will be very helpful!! Thanks, Nick!

1 Like

This is incredibly helpful. I need this often -/ thank you!

1 Like

One thing that’s cool is that you can combine it with the Sort extension to sort a comma separated list. As in, Split commas into lines → Sort lines → Join lines with commas

Of course, this does bring to mind the possibiliy of compound actions, where a sequence of actions could be chained to make another action :thinking:

2 Likes

4 posts were merged into an existing topic: Action chaining

I think I suggested this. WOOT. Thank you.

1 Like

Looking to do exactly this but at the period at the end of a sentence. Thus, some text would go…

From this:
Lifestyle Medicine is a peer-reviewed, open access, interdisciplinary journal providing a forum for all those interested in the rapidly growing specialty of lifestyle medicine. The journal considers articles and reviews which focus on the clinical and scientific aspects of lifestyle medicine and its incorporation into clinical practice. Academic rigour is of particular importance.

To this:

  • Lifestyle Medicine is a peer-reviewed, open access, interdisciplinary journal providing a forum for all those interested in the rapidly growing specialty of lifestyle medicine.
  • The journal considers articles and reviews which focus on the clinical and scientific aspects of lifestyle medicine and its incorporation into clinical practice.
  • Academic rigour is of particular importance.

Is there a way to modify this script to achieve this? Sorry, not a programmer, but i would find this enormously useful.

1 Like