Skip to content

Instantly share code, notes, and snippets.

@pmkhoa
Forked from Deraen/.vimrc
Created March 15, 2017 06:32
Show Gist options
  • Save pmkhoa/a34a08c6dc5bedb0af960942fce3ae88 to your computer and use it in GitHub Desktop.
Save pmkhoa/a34a08c6dc5bedb0af960942fce3ae88 to your computer and use it in GitHub Desktop.
Vimrc clojure parts
" Parts of my .vimrc which might be relevant to Clojure users.
" Src: https://raw.githubusercontent.com/Deraen/dotfiles/master/.vimrc
" NeoBundle is a Vim package manager
" Check https://github.com/Shougo/neobundle.vim for installation
" Autocomplete - https://github.com/Valloric/YouCompleteMe
NeoBundle 'Shougo/vimproc', {'build': {'unix': 'make'}}
NeoBundle 'Valloric/YouCompleteMe'
" Clojure syntax highlight
NeoBundle 'guns/vim-clojure-static'
" Editing stuff for S-expressions (forms, elements...). Alternative to paredit.vim. - https://github.com/guns/vim-sexp
NeoBundle 'guns/vim-sexp'
NeoBundle 'tpope/vim-sexp-mappings-for-regular-people'
" REPL - https://github.com/tpope/vim-fireplace
NeoBundle 'tpope/vim-fireplace'
" Rainbow parenthesis - https://github.com/kien/rainbow_parentheses.vim
NeoBundle 'kien/rainbow_parentheses.vim'
" Enable Rainbow Parentheses when dealing with Clojure files
au FileType clojure RainbowParenthesesActivate
au Syntax * RainbowParenthesesLoadRound
" This should enable Emacs like indentation
let g:clojure_fuzzy_indent=1
let g:clojure_align_multiline_strings = 1
" Add some words which should be indented like defn etc: Compojure/compojure-api, midje and schema stuff mostly.
let g:clojure_fuzzy_indent_patterns=['^GET', '^POST', '^PUT', '^DELETE', '^ANY', '^HEAD', '^PATCH', '^OPTIONS', '^def']
autocmd FileType clojure setlocal lispwords+=describe,it,testing,facts,fact,provided
" Disable some irritating mappings
let g:sexp_enable_insert_mode_mappings = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment