Skip to content

ttcremers/clojure-emacs-setup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clojure Emacs Setup

It's basic ~100 lines user friendly setup for Emacs beginners which provides comfortable Clojure development environment.

This is a clone which is basically identical from the original but integrates Solarized as default theme

look

Plugins

  • Clojure mode
  • Paredit
  • Parentheses Highlighting (with RainbowDelimiters)
  • NREPL
  • Auto Completion
  • Lisp Indentation
  • Textmate mode
  • Solarized Theme (Default)
  • Tomorrow Theme

Off by deafult

  • Line numbers
  • Relative line numbers
  • Vim-mode
  • Whitespaces cleaning
  • Tomorrow Theme

Installation

  1. Download Emacs
  2. Emacs for MacOS
  3. Linux
  4. Windows
  5. git clone git@github.com:edtsech/clojure-emacs-setup.git ~/.emacs.d

Usage

Emacs basics

  • C-x C-f - "find" file i.e. open/create a file in buffer
  • C-x b - create/switch buffers
  • C-x C-b - show buffer list
  • C-x k - kill buffer
  • C-x 2 - split window horizontally
  • C-x 3 - split window vertically
  • C-x 0 - close current window(split)

Full Emacs Command List

Plugins

Paredit

  1. C-<right> (def) a -> (def a)
  2. C-<left> (def a) -> (def) a

Paredit Cheetsheet

Auto completion

Just use tab key.

NREPL

M - is meta key, can be redefined, but usually its Alt key

  1. C-c M-j or M-x nrepl-jack-in - connect to nREPL
  2. C-M-x - evaluate the top level form
  3. M-. - jump to the definition of a symbol
  4. M-, - return to your pre-jump location

NREPL Keyboard shortcuts

Textmate mode

  1. ⌘t - go to file
  2. ⌘l - go to line
  3. ⌘/ - comment line

Textmate mode README

Customize

Indentation

;; Set Compojure indentation
;; (put <macro|function> 'clojure-backtracking-indent '(<indent-first-arg> <indent-second-arg> ...)
(put 'GET 'clojure-backtracking-indent '(2 2 2))
(put 'POST 'clojure-backtracking-indent '(2 2 2))
(put 'PUT 'clojure-backtracking-indent '(2 2 2))
(put 'DELETE 'clojure-backtracking-indent '(2 2 2))
(put 'PATCH 'clojure-backtracking-indent '(2 2 2))

Improvements

If you have some ideas how to improve the setup, I'm happy to participate. And if you need some help or you have a problem ping me on twitter(@edtsech) or send me an email.

Setups for other editors

Thomas Cremers is a freelance (software developer at http://vicinitysoftware.com)

About

User friendly Clojure setup for Emacs beginners.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%