https://github.com/manateelazycat/smart-align
Smart align block around cursor
https://github.com/manateelazycat/smart-align
Last synced: 24 days ago
JSON representation
Smart align block around cursor
- Host: GitHub
- URL: https://github.com/manateelazycat/smart-align
- Owner: manateelazycat
- Created: 2019-06-23T14:50:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-23T14:51:09.000Z (over 6 years ago)
- Last Synced: 2024-12-30T19:35:05.466Z (11 months ago)
- Language: Emacs Lisp
- Size: 128 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# What is smart-align?
In normal way, we need do below steps when align block:
1. Select the region.
2. Type M-x align-regexp RET
3. Type = and hit enter.
I hate select region by hand,
too many cursor movement operations are too inefficient.
So i develop this plugin that you only need do ```smart-align``` in cursor.
This plugin will found block bound around cursor,
then call `align-regexp' with = regexp.
## Installation
Clone or download this repository (path of the folder is the `` used below).
In your `~/.emacs`, add the following two lines:
```Elisp
(add-to-list 'load-path "") ; add smart-align to your load-path
(require 'smart-align)
```
## Usage
Bind your favorite key to functions:
| Function | Description |
| :-------- | :---- |
| smart-align | Align current block smartly |