Skip to content

PatrickF1/Dedent-Text-Alfred-Workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Dedent — Alfred Workflow

An Alfred workflow that removes common leading indentation from clipboard text and pastes the result.

Useful when copying a subsection of YAML or other indented code — for example, grabbing a nested block from a large config file and pasting it as a standalone snippet. Also handy when copying output from CLI tools like Claude Code, where text is often indented relative to the terminal.

Before / After

Say you copy a nested section from a YAML file:

    deploy:
      replicas: 3
      resources:
        limits:
          memory: 512Mi

After running Dedent, the common indentation is removed:

deploy:
  replicas: 3
  resources:
    limits:
      memory: 512Mi

Surrounding fenced code block markers (```) are also stripped automatically.

Install

  1. Download Dedent.alfredworkflow
  2. Double-click to install in Alfred

Usage

  1. Copy indented text to your clipboard
  2. Open Alfred, type dedent, and hit Enter
  3. The dedented text is copied to your clipboard and auto-pasted

Updating the workflow

The source files are:

  • dedent.py — the Python script that does the dedenting
  • README.md — also used as the workflow's about text in Alfred

Edit those files, then rebuild:

python3 build.py

Important: Always run python3 build.py and include the updated Dedent.alfredworkflow in every commit that changes dedent.py or README.md. The workflow file is the distributable artifact and must stay in sync with the source files.

Double-click Dedent.alfredworkflow to reinstall in Alfred.

About

Copy and paste indented snippets without excess leading whitespace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages