diff options
Diffstat (limited to 'bundle/cmd-escape/plugin')
-rw-r--r-- | bundle/cmd-escape/plugin/cmd_escape.vim | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/bundle/cmd-escape/plugin/cmd_escape.vim b/bundle/cmd-escape/plugin/cmd_escape.vim index c37e335..f9952d4 100644 --- a/bundle/cmd-escape/plugin/cmd_escape.vim +++ b/bundle/cmd-escape/plugin/cmd_escape.vim @@ -1,25 +1,6 @@ -let s:active = 0 +if exists('g:loaded_cmd_escape') + finish +endif +let g:loaded_cmd_escape = 1 -function! s:Activate() - cnoremap <Space> \<Space> - let s:active = 1 -endfunction - -function! s:Deactivate() - cunmap <Space> - let s:active = 0 -endfunction - -function s:Toggle() - if s:active - cunmap <Space> - let s:active = 0 - else - cnoremap <Space> \<Space> - let s:active = 1 - endif - - return '' -endfunction - -cnoremap <C-x><Space> <C-r>=<SID>Toggle()<CR> +cnoremap <C-x><Space> <C-r>=cmd_escape#Toggle()<CR> |