Line Arrange is an Obsidian plugin that allows users to rearrange lines or blocks of text in various ways, including sorting, reversing, and shuffling. Users can perform these operations based on visual width or lexical order.


Features

  • Line-Based Operations

    • Sort Lines by Width: Arrange selected lines based on their visual length.

    Sorted Lines

    • Sort Lines Lexically: Arrange selected lines in alphanumerical order.

    Lexisorted Lines

    • Shuffle Lines: Randomize the order of selected lines.

    Shuffled Lines

    • Reverse Lines: Flip the order of selected lines.

    Reversed Lines

  • Block-Based Operations

    • Sort Blocks by Visual Width: Arrange selected blocks hierarchically based on their visual length. Sorted Blocks
    • Sort Blocks Lexically: Arrange selected blocks hierarchically in alphanumerical order. Lexisorted Blocks
    • Shuffle Blocks: Randomly reorder selected blocks, but maintain hierarchy. Shuffled Blocks
    • Reverse Blocks: Flip the order of selected text blocks, but maintain hierarchy. Reversed Blocks

Usage

  1. Open a note and select the lines you want to arrange.

    Select Lines Usage

  2. Use the command palette (Ctrl/Cmd + P) and type:

    • Sort lines to arrange lines based on their apparent width.

    Sort Lines Usage

    • Shuffle lines to randomize the order of the selected lines.

    Shuffle Lines Usage

    • Lexisort lines to arrange lines based on their alphanumerical order.

    Lexisort Lines Usage

    • Reverse lines to reverse the order of the selected lines.

    Reverse Lines Usage


List of Commands

  • Lexisort lines
    • Action: Lexically sorts the lines in the selected text.
  • Reverse lines
    • Action: Reverses the order of the lines in the selected text.
  • Sort lines
    • Action: Sorts the lines in the selected text.
  • Shuffle lines
    • Action: Shuffles the lines in the selected text.
  • Lexisort blocks
    • Action: Lexically sorts the blocks in the selected text.
  • Reverse blocks
    • Action: Reverses the order of the blocks in the selected text.
  • Sort blocks
    • Action: Sorts the blocks in the selected text.
  • Shuffle blocks
    • Action: Shuffles the blocks in the selected text.

Installation

  1. From within Obsidian:
    • Open Settings.
    • Navigate to the Community plugins section.
    • Search for “Line Arrange”.
    • Click “Install” and then “Enable”.
  2. Manual Installation:
    • Download the latest release from the GitHub releases page.
    • Extract the contents to your Obsidian plugins folder: YourVault/.obsidian/plugins/lineArrange.
    • Enable the plugin in the Obsidian settings.

Contributing

  • Open an issue for bugs or feature requests on the GitHub repository.
  • Fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, reach out via GitHub Issues.