From 18efda3933a867dd21df483bbfeae52231783d46 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 6 Feb 2018 11:15:01 +0800 Subject: Update --- ftplugin/crystal.vim | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'ftplugin/crystal.vim') diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index 57ceb97d..6ef907be 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -50,18 +50,17 @@ command! -buffer -nargs=* CrystalHierarchy echo crystal_lang#type_hierarchy(expa command! -buffer -nargs=? CrystalSpecSwitch call crystal_lang#switch_spec_file() command! -buffer -nargs=? CrystalSpecRunAll call crystal_lang#run_all_spec() command! -buffer -nargs=? CrystalSpecRunCurrent call crystal_lang#run_current_spec() -command! -buffer -nargs=* -bar CrystalFormat call crystal_lang#format() +command! -buffer -nargs=* -bar CrystalFormat call crystal_lang#format(, 0) -nnoremap (crystal-jump-to-definition) :CrystalDef -nnoremap (crystal-show-context) :CrystalContext -nnoremap (crystal-spec-switch) :CrystalSpecSwitch -nnoremap (crystal-spec-run-all) :CrystalSpecRunAll -nnoremap (crystal-spec-run-current) :CrystalSpecRunCurrent -nnoremap (crystal-format) :CrystalFormat +nnoremap (crystal-jump-to-definition) :CrystalDef +nnoremap (crystal-show-context) :CrystalContext +nnoremap (crystal-spec-switch) :CrystalSpecSwitch +nnoremap (crystal-spec-run-all) :CrystalSpecRunAll +nnoremap (crystal-spec-run-current) :CrystalSpecRunCurrent +nnoremap (crystal-format) :CrystalFormat augroup plugin-ft-crystal - autocmd! - autocmd BufWritePre if g:crystal_auto_format | CrystalFormat | endif + autocmd BufWritePre if g:crystal_auto_format | call crystal_lang#format('', 1) | endif augroup END if get(g:, 'crystal_define_mappings', 1) -- cgit v1.2.3