https://github.com/elnaril/gedit-plugin-collection
Collection of plugins for gedit
https://github.com/elnaril/gedit-plugin-collection
gedit gedit-plugin json-formatter plugin prettifier
Last synced: 19 days ago
JSON representation
Collection of plugins for gedit
- Host: GitHub
- URL: https://github.com/elnaril/gedit-plugin-collection
- Owner: Elnaril
- License: mit
- Created: 2024-12-11T20:01:17.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-12T16:40:44.000Z (11 months ago)
- Last Synced: 2025-10-25T02:53:56.817Z (3 months ago)
- Topics: gedit, gedit-plugin, json-formatter, plugin, prettifier
- Language: Python
- Homepage: https://www.buymeacoffee.com/elnaril
- Size: 611 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gedit Plugins
Collection of Gedit plugins:
1. [JSON Formatter](#JSON-Formatter): Verify, Format and Minify json documents
2. [Prettifier](#Prettifier): Prettify data structures
---
---
## Installation
1. Get the file `gedit-plugin-collection-x.y.z.tar.gz` from the latest [release](https://github.com/Elnaril/gedit-plugin-collection/releases)
2. Extract its content into the folder `~/.local/share/gedit/plugins`
So you should have something similar to:
```bash
.local/share/gedit/
└── plugins
├── jsonformatter/
├── jsonformatter.plugin
├── prettifier/
└── prettifier.plugin
```
3. Activate the plugin(s) you wish in the Gedit Preferences window.
## JSON Formatter
This plugin allows you to easily:
- Verify (CTRL-ALT-v) a JSON document is a correctly formatted
- Format (CTRL-ALT-J) a JSON document
- Minify (CTRL-ALT-j) a JSON document
#### Format Example:
```json
[
{
"inputs": [
{
"internalType": "address",
"name": "initialOwner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
}
]
```
#### Minify Example:
```json
[{"inputs": [{"internalType": "address", "name": "initialOwner", "type": "address"}], "stateMutability": "nonpayable", "type": "constructor"}]
```
## Prettifier
This plugin allows you to make readable data structures defined with {, [, ", ...
Keyboard shortcut: CTRL-SHIFT-P
Let's say you have this document:
```text
{ 'commands': b'\x10', 'inputs': [ ( , { 'actions': b'\x06\x0f\x0c', 'params': [ ( , { 'exact_in_single_params': { 'PoolKey': { 'currency0': '0x0000000000000000000000000000000000000000', 'currency1': '0xBf5617af623f1863c4abc900c5bebD5415a694e8', 'fee': 3000, 'tickSpacing': 50, 'hooks': '0x0000000000000000000000000000000000000000' }, 'zeroForOne': False, 'amountIn': 100000000000000, 'amountOutMinimum': 798750268136655870501951828, 'hookData': b'' } } ), ( , { 'currency': '0x0000000000000000000000000000000000000000', 'minAmount': 0 } ), ( , { 'currency': '0xBf5617af623f1863c4abc900c5bebD5415a694e8', 'maxAmount': 100000000000000 } ) ] }, { 'revert_on_fail': True } ) ], 'deadline': 1732612928}
```
You can get it formatted like that:
```text
{
'commands': b'\x10',
'inputs': [
(
,
{
'actions': b'\x06\x0f\x0c',
'params': [
(
,
{
'exact_in_single_params': {
'PoolKey': {
'currency0': '0x0000000000000000000000000000000000000000',
'currency1': '0xBf5617af623f1863c4abc900c5bebD5415a694e8',
'fee': 3000,
'tickSpacing': 50,
'hooks': '0x0000000000000000000000000000000000000000'
},
'zeroForOne': False,
'amountIn': 100000000000000,
'amountOutMinimum': 798750268136655870501951828,
'hookData': b''
}
}
),
(
,
{
'currency': '0x0000000000000000000000000000000000000000',
'minAmount': 0
}
),
(
,
{
'currency': '0xBf5617af623f1863c4abc900c5bebD5415a694e8',
'maxAmount': 100000000000000
}
)
]
},
{
'revert_on_fail': True
}
)
],
'deadline': 1732612928
}
```