Git Product home page Git Product logo

align-cljlet's Introduction

Notice:

This project is now deprecated in favour of the alignment features in clojure-mode 5.1.

See: https://github.com/clojure-emacs/clojure-mode#vertical-alignment

Description:

'align-cljlet' is an emacs addin for aligning let-like forms. This program exists because I was tired of manually aligning let statements in Clojure. This program is designed to quickly and easily allow let-like forms to be aligned. This is my first emacs lisp program and as a result if probably less than optimal. Feel free to suggest improvements or send in patches.

This program was inspired by align-let.el although only borrows one function from that code. I had considered altering align-let.el to work correctly with Clojure however it was easiler to simply start from scratch.

Forms currently handled:

  • let
  • when-let
  • if-let
  • binding
  • loop
  • with-open
  • literal hashes {}
  • defroute
  • cond
  • condp (except :>> subforms)

If there are let pairs together on the same line the code will refuse to align them. For example, the following will not align:

(let [apple 2 pair 3
      peach 23] ...)

will not be aligned.

Custom variables:

defroute-columns The number of columns to align in a defroute form.

Known limitations:

  • This program requires clojure mode to be running in order to function correctly.
  • Does not currently align condp forms that use the :>> symbol.

Installation:

To use align-cljlet.el, add it to your load-path and include the following to your .emacs configuration.

(require 'align-cljlet)

Alternatively you may install this package from Marmalade.

Usage:

To invoke simply position anywhere inside an alignable form and invoke:

M-x align-cljlet

You may wish to bind this to a specific key.

Contributors

  • Glen Stampoultzis
  • Reid D McKenzie

align-cljlet's People

Contributors

gstamp avatar arrdem avatar sgrove avatar

Watchers

Simon Katz avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.