diff options
Diffstat (limited to 'ftplugin/crystal.vim')
-rw-r--r-- | ftplugin/crystal.vim | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index c82c3b74..c23d93f6 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -43,30 +43,30 @@ setlocal errorformat= let g:crystal_compiler_command = get(g:, 'crystal_compiler_command', 'crystal') let g:crystal_auto_format = get(g:, 'crystal_auto_format', 0) -command! -buffer -nargs=* CrystalImpl echo crystal_lang#impl(expand('%'), getpos('.'), <q-args>).output -command! -buffer -nargs=0 CrystalDef call crystal_lang#jump_to_definition(expand('%'), getpos('.')) -command! -buffer -nargs=* CrystalContext echo crystal_lang#context(expand('%'), getpos('.'), <q-args>).output -command! -buffer -nargs=* CrystalHierarchy echo crystal_lang#type_hierarchy(expand('%'), <q-args>) -command! -buffer -nargs=? CrystalSpecSwitch call crystal_lang#switch_spec_file(<f-args>) -command! -buffer -nargs=? CrystalSpecRunAll call crystal_lang#run_all_spec(<f-args>) +command! -buffer -nargs=* CrystalImpl echo crystal_lang#impl(expand('%'), getpos('.'), <q-args>).output +command! -buffer -nargs=0 CrystalDef call crystal_lang#jump_to_definition(expand('%'), getpos('.')) +command! -buffer -nargs=* CrystalContext echo crystal_lang#context(expand('%'), getpos('.'), <q-args>).output +command! -buffer -nargs=* CrystalHierarchy echo crystal_lang#type_hierarchy(expand('%'), <q-args>) +command! -buffer -nargs=? CrystalSpecSwitch call crystal_lang#switch_spec_file(<f-args>) +command! -buffer -nargs=? CrystalSpecRunAll call crystal_lang#run_all_spec(<f-args>) command! -buffer -nargs=? CrystalSpecRunCurrent call crystal_lang#run_current_spec(<f-args>) -command! -buffer -nargs=* -bar CrystalFormat call crystal_lang#format(<q-args>, 0) -command! -buffer -nargs=* CrystalExpand echo crystal_lang#expand(expand('%'), getpos('.'), <q-args>).output +command! -buffer -nargs=* -bar CrystalFormat call crystal_lang#format(<q-args>, 0) +command! -buffer -nargs=* CrystalExpand echo crystal_lang#expand(expand('%'), getpos('.'), <q-args>).output nnoremap <buffer><Plug>(crystal-jump-to-definition) :<C-u>CrystalDef<CR> -nnoremap <buffer><Plug>(crystal-show-context) :<C-u>CrystalContext<CR> -nnoremap <buffer><Plug>(crystal-spec-switch) :<C-u>CrystalSpecSwitch<CR> -nnoremap <buffer><Plug>(crystal-spec-run-all) :<C-u>CrystalSpecRunAll<CR> -nnoremap <buffer><Plug>(crystal-spec-run-current) :<C-u>CrystalSpecRunCurrent<CR> -nnoremap <buffer><Plug>(crystal-format) :<C-u>CrystalFormat<CR> +nnoremap <buffer><Plug>(crystal-show-context) :<C-u>CrystalContext<CR> +nnoremap <buffer><Plug>(crystal-spec-switch) :<C-u>CrystalSpecSwitch<CR> +nnoremap <buffer><Plug>(crystal-spec-run-all) :<C-u>CrystalSpecRunAll<CR> +nnoremap <buffer><Plug>(crystal-spec-run-current) :<C-u>CrystalSpecRunCurrent<CR> +nnoremap <buffer><Plug>(crystal-format) :<C-u>CrystalFormat<CR> augroup plugin-ft-crystal - autocmd BufWritePre <buffer> if g:crystal_auto_format | call crystal_lang#format('', 1) | endif + autocmd BufWritePre <buffer> if g:crystal_auto_format | call crystal_lang#format('', 1) | endif augroup END if get(g:, 'crystal_define_mappings', 1) - nmap <buffer>gd <Plug>(crystal-jump-to-definition) - nmap <buffer>gc <Plug>(crystal-show-context) + nmap <buffer>gd <Plug>(crystal-jump-to-definition) + nmap <buffer>gc <Plug>(crystal-show-context) nmap <buffer>gss <Plug>(crystal-spec-switch) nmap <buffer>gsa <Plug>(crystal-spec-run-all) nmap <buffer>gsc <Plug>(crystal-spec-run-current) |