This repository was archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Home
Milad edited this page Apr 12, 2016
·
30 revisions
#alchemist.vim

This plugin uses alchemist-server to give inside about your elixir project in vim.
- Elixir > v1.0.4 to run alchemist-server
- Python alchemist_client is the script that talks to alchemist-server
You can use your favourite VIM plugin mannger for installation, in this doc we use Vundle
Add this line to your .vimrc
Plugin 'slashmili/alchemist.vim'
- Auto completion:
<C-x><C-o>while your are in INSERT mode.
By default the docs are shown as markdown.
- Press
Kwhile cursor is under a module or function in NORMAL mode.
- ExDoc: ExDoc [module/function] provides document (press TAB to get autocomplete).
- AnsiEsc to see the docs in ansi color
For Jumping to Elixir/Erlang modules look at g:alchemist#elixir_erlang_src configs.
- Jump to the definition: Press
<C-]>while cursor is under the keyword in NORMAL mode. - Jump through tag stack: Press
<C-T>to jump between tag stack in NORMAL mode.
- ExDef:
ExDef [module/function]jumps to the definition.
- Disable short keys
In case you don't like alchemist.vim semi-tag functionality!
let g:alchemist_tag_disable = 1- Change short keys bindings
let g:alchemist_tag_map = '<C-]>'
let g:alchemist_tag_stack_map = '<C-T>'- Set source path for Elixir and Erlang
If you haven't build Elixir/Erlang from source, you need to set g:alchemist#elixir_erlang_src to be able to jump to Elixir/Erlang modules.
let g:alchemist#elixir_erlang_src = "/home/foo/src/"This directory should contains two directories, elixir and otp
/home/foo/src/
├── elixir
│ ├── CHANGELOG.md
│ ├── lib
│ ├── Makefile
│ ├── ...
├── otp
│ ├── AUTHORS
│ ├── lib
│ │ ├── asn1
│ │ ├── stdlib
│ │ ├── ...
│ ├── ...