Giter VIP home page Giter VIP logo

sublime-lispindent's Introduction

sublime-lispindent is a plugin for sublime text 2 that properly indents lisp code.

Installation

With package control (recommended)

Use Sublime Package Control, the package is called lispindent.

Manually

  1. Clone the repository or download the zipfile.
  2. The resulting folder - either from cloning or unzipping - should be moved to Installed Packages inside your data folder.

The location of the data folder varies between systems:

  • Linux - ~/.config/sublime-text-2
  • OSX - ~/Library/Application Support/Sublime Text 2
  • Windows - %APPDATA%\Sublime Text 2

Supported languages

clojure.clj, .cljs, .edn
common lisp.lsp, .lisp
racket.rkt, .rktd, .rktl
scheme.ss, .scm, .sch

If your language is not one of the above, open an issue or contact me to get it included.

You can also add your own language or change the existing configurations in the menu Preferences->Package Settings->Lispindent->Settings.

For a minimal configuration that should work fine for most languages, I recommend the following:

"<language-name>": {
	"detect": ".*\\.(<file-endings>)$",
	"default_indent": "two_space",
	"regex": "$"
}

Replace <language-name> with the name of your language. It does not matter what you write here, as long as it is distinct from the other languages.

Replace <file-endings> with the possible file endings for your language. Note: without the dot! Delimit endings with |. Example: lsp|lisp for common lisp.

Key bindings

enter Insert a new line with indentation
ctrl+i or
cmd+i (osx)
Indent selected lines (or the current line, if there is no selection).

To change key bindings, open the menu Preferences->Package Settings->Lispindent. Select Key Bindings โ€“ Default for windows/linux, or Key Bindings โ€“ OSX for mac.

License

sublime-lispindent is licensed under the zlib license:


Copyright (c) 2012 Jonathan Fischer Friberg

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

  3. This notice may not be removed or altered from any source distribution.

sublime-lispindent's People

Contributors

jarhart avatar nomnel avatar odyssomay avatar trevor avatar

Watchers

 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.