vivi.vim
Features
-
Checking syntax
-
Mix integration
-
Viewing references
-
Omni completion
Requirements
Vim 7.3.885 or later with Lua enabled
Installation
NeoBundle 'liquidz/vivi.vim', {
\ 'depends': [
\ 'elixir-lang/vim-elixir',
\ 'Shougo/vimproc.vim',
\ 'Shougo/neocomplete.vim',
\ 'thinca/vim-quickrun',
\ 'thinca/vim-ref',
\ 'osyo-manga/shabadou.vim',
\ 'osyo-manga/vim-watchdogs'
\ ]}
To use Syntastic instead of vim-watchdogs
,
add scrooloose/syntastic
and remove shabadou.vim
and vim-watchdogs
.
Interface
Commands
command | notes |
---|---|
ViviMixRun |
Run |
ViviMixDepsGet |
Run |
ViviMixDepsUpdateAll |
Run |
ViviMixTest |
Run |
ViviMixTestForCurrentLine |
Run |
ViviMixTestAgain |
Run |
ViviKillAllIEx |
Kill all IEx processes. |
Key Mappings
mode | mapping | notes |
---|---|---|
normal |
<Plug>(vivi_mix_run) |
call |
normal |
<Plug>(vivi_mix_deps_get) |
call |
normal |
<Plug>(vivi_mix_deps_update_all) |
call |
normal |
<Plug>(vivi_mix_test) |
call |
visual |
<Plug>(vivi_mix_test_for_current_line) |
call |
normal |
<Plug>(vivi_mix_test_again) |
call |
normal |
<Plug>(vivi_kill_all_iex) |
call |
Configuration
This option supports only vim-watchdogs.
let g:vivi_enable_auto_syntax_checking = 1
Default key mappings is here.
let g:vivi_enable_default_key_mappings = 1
mix run
and mix test
.let g:vivi_mix_run_config = { ... }
let g:vivi_mix_test_config = { ... }
Warming up IEx helps you get quick response in viewing reference or omni completion.
let g:vivi_enable_auto_warm_up_iex = 1
let g:vivi_enable_omni_completion = 1
let g:neocomplete#enable_at_startup = 1 " RECOMMENDED
Default Key Mappings
mode | lhs | rhs | notes |
---|---|---|---|
insert |
>> |
|> |
Pipeline. |
normal |
<Leader>r |
<Plug>(vivi_mix_run) |
|
normal |
<Leader>t |
<Plug>(vivi_mix_test_again) |
|
visual |
<Leader>t |
<Plug>(vivi_mix_test_for_current_line) |
|
normal |
<Leader>vk |
<Plug>(vivi_kill_all_iex) |
Omni Completion
Currently, vivi completes only module functions.
Manual setting example is here, if you don’t want to use g:vivi_enable_omni_completion
.
setlocal omnifunc=vivi#complete#omni
if !exists('g:neocomplete#sources#omni#input_patterns')
let g:neocomplete#sources#omni#input_patterns = {}
endif
let g:neocomplete#sources#omni#input_patterns.elixir = '[^.[:digit:] *\t]\.'
License
Copyright © 2015 Masashi Iizuka
Distributed under the MIT License.