Add notification to vim autocomplete toggle
This commit is contained in:
parent
40f08840bb
commit
33077b64a1
1 changed files with 5 additions and 3 deletions
|
@ -1,15 +1,17 @@
|
|||
function s:autocomplete(enabled)
|
||||
if a:enabled
|
||||
let g:autocomplete=1
|
||||
for letter in (split("abcdefghijklmnopqrstuvwxyz", ".\\zs"))
|
||||
exec "inoremap ".letter." ".letter.""
|
||||
endfor
|
||||
let g:autcomplete=1
|
||||
echo "Autocomplete enabled"
|
||||
else
|
||||
unlet g:autocomplete
|
||||
for letter in (split("abcdefghijklmnopqrstuvwxyz", ".\\zs"))
|
||||
exec "iunmap ".letter
|
||||
endfor
|
||||
unlet g:autocomplete
|
||||
end
|
||||
echo "Autocomplete disabled"
|
||||
endif
|
||||
endfun
|
||||
|
||||
command -nargs=1 Complete call <SID>autocomplete(<q-args> == "on")
|
||||
|
|
Loading…
Reference in a new issue