Skip to content

NewThingsCo/clojure-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clojure-101

Getting started with Clojure.

Development Enviroment

Install Leiningen

Method I

Follow instructions from https://leiningen.org/

Method II

$ brew install leiningen

Install VIM

Assuming that Brew is installed.

$ brew update
$ brew install vim
$ brew install macvim
$ brew link macvim

Install VIM Plugins

Install pathogen.vim or Vundle.vim or some other which you favor.

Recomended plugins

Some VIM settings which I find good

There is lots of vim configurations and like with any editor everybody has their own preferences. Exmple Amix vimrc.

There are from my ~/.vimrc

" Softtabs, 2 spaces
set tabstop=2
set shiftwidth=2
set shiftround
set expandtab

" Share the clipboard outside of macvim
set clipboard=unnamed

" Auto format any pasted text
nnoremap P P=`]
nnoremap p p=`]

" don't use vim backup files
set nobackup
set nowritebackup

" autorefresh changes from FS
set autoread

" Look and feel
set ruler               " set ruler
set number              " add line numbers
"set colorcolumn=80      " add line marker at 80 characters

" Mappings and shortcuts
"make jj do esc"
inoremap jj <Esc>

" use space as leader key
let mapleader = "\<Space>"

" Clojure write and require with one command
command! WriteAndRequire w|Require
map <leader>w :WriteAndRequire<CR>

" Searching and indexing
" Ignore case when searching
set ignorecase

" When searching try to be smart about cases
set smartcase

" Highlight search results
set hlsearch

" Windows, buffers & navigation
" Switch between the last two files
nnoremap <leader><leader> <c-^>

Let's start

$ git clone git://github.com/functional-koans/clojure-koans.git
$ cd clojure-koans
$ lein koan run
$ vim src/koans/01_equalities.clj

Links

Clojure API Cheatsheet

License

Copyright © 2017 New Things Co

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Releases

No releases published

Packages

No packages published