Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coolcat467/idlealign
Idle Align - Emacs Align by Regular Expression as an IDLE Extension
https://github.com/coolcat467/idlealign
align coolcat467 extension idle python python-idle python3 regex regular-expression regular-expressions tkinter-python
Last synced: 2 months ago
JSON representation
Idle Align - Emacs Align by Regular Expression as an IDLE Extension
- Host: GitHub
- URL: https://github.com/coolcat467/idlealign
- Owner: CoolCat467
- License: gpl-3.0
- Created: 2022-10-02T05:36:32.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-02T02:43:34.000Z (6 months ago)
- Last Synced: 2024-09-18T20:06:17.951Z (3 months ago)
- Topics: align, coolcat467, extension, idle, python, python-idle, python3, regex, regular-expression, regular-expressions, tkinter-python
- Language: Python
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# IDLEAlign
Python IDLE extension to align code by a regular expression[![Tests](https://github.com/CoolCat467/idlealign/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/CoolCat467/idlemypyextension/actions/workflows/tests.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/CoolCat467/idlealign/main.svg)](https://results.pre-commit.ci/latest/github/CoolCat467/idlealign/main)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![code style: black](https://img.shields.io/badge/code_style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)## What does this extension do?
This IDLE extension allows you to align a block of code by a regular
expression selecting the text you would like to have aligned and then
running Format -> Align Selection or `Alt+a` on default.
If `space wrap` is enabled in the dialog that appears, regular expression
match in selected text will have a single space added on both sides. If
disabled, this will not happen. This is very helpful for making large
blocks of assignment statements pretty or for making comments for
your ruff rules in pyproject.toml all match up.## Installation (Without root permissions)
1) Go to terminal and install with `pip install idlealign[user]`.
2) Run command `idleuserextend; idlealign`. You should see the following
output: `Config should be good! Config should be good!`.
3) Open IDLE, go to `Options` -> `Configure IDLE` -> `Extensions`.
If everything went well, alongside `ZzDummy` there should be and
option called `idlealign`. This is where you can configure if
idlealign is enabled or not.## Installation (Legacy, needs root permission)
1) Go to terminal and install with `pip install idlealign`.
2) Run command `idlealign`. You will likely see a message saying
`idlealign not in system registered extensions!`. Run the command
given to add lintcheck to your system's IDLE extension config file.
3) Again run command `idlealign`. This time, you should see the following
output: `Config should be good!`.
4) Open IDLE, go to `Options` -> `Configure IDLE` -> `Extensions`.
If everything went well, alongside `ZzDummy` there should be and
option called `idlealign`. This is where you can configure if
idlealign is enabled or not.