ReCopied

Help

Formatters Reference

Every token and modifier for building your own formatters, in one place.

A Formatter reshapes a clipping when you copy it. You write a format string with {tokens} that get filled from the clipping, optionally piped through modifiers. Build them in Settings › Formatters.

Not the same as Convert. The automatic Convert options in a clipping's detail (color to HEX/RGB/HSL, timestamp to ISO/Local, JSON to Pretty/Minified) are not written as formatters. They appear on their own for recognized types. This page covers the formatter language you use to build your own.

Tokens

Replaced with values from the clipping being copied.

Token Inserts
{text} The clipping's text (its main content)
{title} The title you gave the clipping (empty if none)
{url} The link URL (for link clippings, or a detected source URL)
{app} The app the clipping was copied from
{host} The host/domain of the source URL
{date} The capture date, formatted
{n} The item number when merging several clippings (1, 2, 3, …)

Unknown tokens are left literal, so {foo} stays {foo}.

Fill-in variables

Write [[name]] for a value you type at copy time. ReCopied prompts for each one before copying, and shows inline fields in the detail preview.

Hi [[name]], re: {title}

Modifiers

Pipe a token through one or more modifiers with |. Chain them left to right:

{text | trim | upper}

Case

Modifier Result
upper UPPERCASE
lower lowercase
titlecase Title Case
camelcase camelCase
snakecase snake_case
kebabcase kebab-case
constantcase CONSTANT_CASE
slugify url-safe-slug

Whitespace and lines

Modifier Result
trim Remove leading/trailing whitespace
singleline Collapse to one line, squeezing runs of spaces
normalizews Collapse repeated spaces/tabs per line
sortlines Sort lines alphabetically
dedupelines Remove duplicate lines
unlist Strip leading bullets/numbering from each line

Web and Markdown

Modifier Result
bulletlist Prefix each line with "- "
numberlist Number each line "1.", "2.", …
blockquote Prefix each line with "> "
paragraphs Wrap each line in <p>…</p>
striphtml Remove HTML tags
htmlencode Escape & < > etc. to entities
htmldecode Decode HTML entities back to characters
extracturls Pull out all http(s) URLs, one per line
extractemails Pull out all email addresses, one per line

Developer

Modifier Result
encode Percent-encode for URLs
decode Percent-decode
base64 Base64 encode
base64decode Base64 decode
hex Hex encode (UTF-8 bytes)
unhex Hex decode
jsonescape Escape for a JSON string
formatjson Pretty-print JSON

Fallback

Modifier Result
default:VALUE Use VALUE when the token is empty (e.g. {title | default:Untitled})

Combining clippings (and multi-line clippings)

A formatter can also have a separator, prefix, and suffix (set in the editor's Merge options). These join items:

  • Merge: select several clippings, then Merge with the formatter. Each clipping is rendered with the format, then joined by the separator and wrapped in the prefix/suffix.
  • Single multi-line clipping: a formatter with a non-default separator or a prefix/suffix treats each line as an item, so it joins the lines the same way. This is how Comma-Separated and HTML List work on one clipping.

Examples

Goal Format Notes
Markdown link [{title}]({url})
Quote a block > {text} or {text | blockquote} per line
Slug from a title {title | slugify}
Bullet each line {text | bulletlist}
Numbered list {text | numberlist}
Constant name {text | trim | constantcase} e.g. MY_VALUE
URL-encode {text | encode}
Pretty JSON {text | formatjson}
Extract emails {text | extractemails} one per line, or a message if none
Comma-separated {text} plus separator ", " joins lines/clippings
HTML list <li>{text}</li> plus prefix <ul> and suffix </ul>, wraps each line/clip
Fallback title {title | default:Untitled}