Skip to content

oakmac/sublime-pretty-edn

Repository files navigation

Sublime Pretty EDN

Pretty print, minify, and validate EDN files from within Sublime Text.

Requires babashka to be installed (ie: bb).

Usage

Commands available:

  • Pretty EDN: Format
  • Pretty EDN: Minify
  • Pretty EDN: Validate
  • Pretty EDN: to JSON minified
  • Pretty EDN: to JSON pretty
  • Pretty EDN: from JSON
  • Pretty EDN: from JSON keywordized

Installation

Package Control

Pretty EDN is available via the Package Control plugin:

  1. In Sublime Text, open the Command Palette by typing Ctrl+Shift+p (Cmd+Shift+p on Mac)
  2. Type install and select Package Control: Install Package
  3. A text prompt should appear shortly after Package Control loads a list of packages from the Internet.
  4. Type pretty edn and press Enter
  5. That's it! Pretty EDN is now installed.

Linux / OSX

You can symlink this package repo to the Sublime Text Packages directory:

cd ~
git clone [email protected]:oakmac/sublime-pretty-edn.git
ln -s ~/sublime-pretty-edn ~/Library/Application\ Support/Sublime\ Text/Packages/

TODO / Future Ideas

  • setting to allow location of bb (Issue #3)
  • add "to YAML" support (Issue #4)
  • config options for spacing for formatting
  • config to use fipp instead of clojure.pprint
  • option to keywordize-keys / unkeywordize-keys
  • Use Tonsky's Python Clojure parser and remove dependency on babashka?

License

ISC License

About

Format, Validate, Minify EDN files in Sublime Text

Resources

License

Stars

Watchers

Forks

Packages

No packages published