https://github.com/suyanlong/aligner
🐝🐝🐝 🔥🔥🔥Aligner is a perfect multi-line symbol column alignment tool 🐝🐝🐝 🔥🔥🔥
https://github.com/suyanlong/aligner
aligner alignment-comment cd ci cli command-line cross-language cross-platform developer developer-tools devops format formater go toolkit vscode
Last synced: 3 months ago
JSON representation
🐝🐝🐝 🔥🔥🔥Aligner is a perfect multi-line symbol column alignment tool 🐝🐝🐝 🔥🔥🔥
- Host: GitHub
- URL: https://github.com/suyanlong/aligner
- Owner: suyanlong
- License: gpl-3.0
- Created: 2020-04-17T01:59:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T09:04:31.000Z (about 3 years ago)
- Last Synced: 2024-06-19T23:14:31.427Z (almost 2 years ago)
- Topics: aligner, alignment-comment, cd, ci, cli, command-line, cross-language, cross-platform, developer, developer-tools, devops, format, formater, go, toolkit, vscode
- Language: Go
- Homepage: https://github.com/suyanlong/aligner
- Size: 7.97 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# aligner
Aligner is a perfect multi-line symbol column alignment tool
## Feature
* cross-platform
* TODO 过滤
* 开启代码段控制 aligner disable/enable
* 文件修改监控格式化。后台进程守护。
* 与vscode、idea 集成
* =、+、-、/ 等运算符号对齐
* 自定义符号对齐
* 第一行开启不控制
* 自适应语言代码对齐格式化
* 单行注释与左边的代码间距设置四个空格
## How to get
```
go get github.com/suyanlong/aligner
```
## Usage
install to PATH env
```shell script
aligner -h
NAME:
aligner - A new CI/CD cli, align multiple lines of single comments or symbols
USAGE:
aligner [global options] command [command options] [arguments...]
VERSION:
aligner v1.0.0-2-g4e9cb99 darwin amd64 Wed Apr 22 11:26:05 UTC 2020
COMMANDS:
comment align multiple lines of single comments
check aligner check whether the symbols are aligned
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--comment value, -c value annotation symbols
--path value, -p value alignment path (default: "/Users/suyanlong/github/aligner")
--replace, -r replace file (default: false)
--ext value, -e value file extension
--ignore value, -i value ignore file or direction
--help, -h show help (default: false)
--version, -v print the version (default: false)
```
## Example
### aligner before python.py file
python.py:
```python
class GosTxType:
gosMallPay = "-10" # XXXX
appPay = "-9" # XXXX
ecPay = "-8" # XXXXXXXXX
addPool = "-7" # XXXXXXXXXX
cityFee = "-6" # XXXXXXXX
taskFee = "-5" # XXXXXXX
```
### aligner after python.py file
```shell script
aligner -c "#" -e ".py" comment ./python.py
```
python.py:
```python
class GosTxType:
gosMallPay = "-10" # XXXX
appPay = "-9" # XXXX
ecPay = "-8" # XXXXXXXXX
addPool = "-7" # XXXXXXXXXX
cityFee = "-6" # XXXXXXXX
taskFee = "-5" # XXXXXXX
```
## use aligner

## Contribution Welcomed !
Contributors
* [suyanlong](https://github.com/suyanlong)
Report issue or pull request, or email 592938410@qq.com