mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-07 05:04:34 +08:00
Give some feedback for commands.
This commit is contained in:
@@ -54,7 +54,7 @@ function! s:TestMappingsDo() "{{{
|
|||||||
normal gg
|
normal gg
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
function! s:DelimitMateDo() "{{{
|
function! s:DelimitMateDo(...) "{{{
|
||||||
if exists("g:delimitMate_excluded_ft")
|
if exists("g:delimitMate_excluded_ft")
|
||||||
" Check if this file type is excluded:
|
" Check if this file type is excluded:
|
||||||
for ft in split(g:delimitMate_excluded_ft,',')
|
for ft in split(g:delimitMate_excluded_ft,',')
|
||||||
@@ -76,13 +76,18 @@ function! s:DelimitMateDo() "{{{
|
|||||||
let &cpo = save_cpo
|
let &cpo = save_cpo
|
||||||
let &keymap = save_keymap
|
let &keymap = save_keymap
|
||||||
endtry
|
endtry
|
||||||
|
if a:0 > 0
|
||||||
|
echo "delimitMate has been reset."
|
||||||
|
endif
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
function! s:DelimitMateSwitch() "{{{
|
function! s:DelimitMateSwitch() "{{{
|
||||||
if b:delimitMate_enabled
|
if b:delimitMate_enabled
|
||||||
call delimitMate#UnMap()
|
call delimitMate#UnMap()
|
||||||
|
echo "delimitMate has been disabled."
|
||||||
else
|
else
|
||||||
call delimitMate#Init()
|
call delimitMate#Init()
|
||||||
|
echo "delimitMate has been enabled."
|
||||||
endif
|
endif
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
@@ -92,7 +97,7 @@ endfunction "}}}
|
|||||||
call s:DelimitMateDo()
|
call s:DelimitMateDo()
|
||||||
|
|
||||||
" Let me refresh without re-loading the buffer:
|
" Let me refresh without re-loading the buffer:
|
||||||
command! DelimitMateReload call s:DelimitMateDo()
|
command! DelimitMateReload call s:DelimitMateDo(1)
|
||||||
|
|
||||||
" Quick test:
|
" Quick test:
|
||||||
command! DelimitMateTest call s:TestMappingsDo()
|
command! DelimitMateTest call s:TestMappingsDo()
|
||||||
|
|||||||
Reference in New Issue
Block a user