Skip to content

xRyul/contextual-select-all

Repository files navigation

Contextual Select All for Obsidian

Replaces Obsidians defualt CMD+A "Select All" with context aware selections.

Features

  • Context-aware selection based on where your cursor is positioned.
  • Support for various Markdown elements:
    • Headings
    • Lists (including nested lists)
    • Checklists
    • Tables
    • Code blocks (press 2x to select whole code excluding press 3x to select whole code including)
    • Blockquotes
    • Paragraphs
  • Works in both Source mode and Live Preview mode.
  • Incremental selection: Click multiple times to expand the selection.

Each press = more content selected. For example:

Code Blocks:

Obsidian_bFfQBGcIWd.mp4
  1. Select current line within code block
  2. Select code block content (excluding ``` lines)
  3. Select entire code block (including ``` lines)

Lists (Unordered and Ordered):

obsidian-select-all-number-list.mp4
obsidian-select-all-bullet-list.mp4
  1. Select list item content (excluding bullet or number)
  2. Select entire list item (including bullet or number)
  3. Select item with all its subitems

Blockquotes / Callouts:

Obsidian_B6bKxPvmxF.mp4
  1. Select blockquote content on current line (excluding >)
  2. Select entire blockquote line (including >)
  3. Select entire blockquote (multiple lines if applicable)

Checklists:

Obsidian_1bvnXf5amK.mp4
  1. Select checklist item content (excluding [ ] or [x])
  2. Select entire checklist item (including [ ] or [x])
  3. Select all consecutive checklist items

Headings:

Obsidian_VjR9hPDXVW.mp4
  1. Select heading text (excluding #)
  2. Select entire heading line (including #)
  3. Select heading and its content (until next heading or end of document)
  4. Select entire document

Paragraphs:

  1. Select current line / paragraph
  2. Select entire document

Tables:

  1. Select cell content

Empty Lines:

  1. Select entire document

How to Use

Install the plugin, and use CMD+A as usual. It automatically replaces official CMD+A shortcut with enhanced one. Press multiple times to cycle and select different elements.

Limitations

  • Codeblocks. Selecting empty line inside the code blocks will select all-content instead.

About

Contextual Select All. Provides context aware selections via CMD+A

Resources

Stars

Watchers

Forks

Packages

No packages published