Change toggle function name

This commit is contained in:
othree_kao 2013-02-22 14:30:39 +08:00
parent 7ae26288dc
commit ba860a3f8b
2 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,7 @@ After installed. Just press / or ? for search, it will map to :M command.
You can call EregexToggle funtion to toggle the keymapping. For example, You can call EregexToggle funtion to toggle the keymapping. For example,
add the following line into your .vimrc file: add the following line into your .vimrc file:
nnoremap <leader>/ :call EregexToggle()<CR> nnoremap <leader>/ :call eregex#toggle()<CR>
Then you can use &lt;leader>/ to toggle eregex.vim. Then you can use &lt;leader>/ to toggle eregex.vim.

View File

@ -288,7 +288,7 @@ unlet s:tmp s:maj s:min
"v260 "v260
let s:enable = 0 let s:enable = 0
function! EregexToggle(...) function! eregex#toggle(...)
let silent = 0 let silent = 0
if exists('a:1') && a:1 if exists('a:1') && a:1
let silent = 1 let silent = 1
@ -309,7 +309,9 @@ function! EregexToggle(...)
let s:enable = 1 - s:enable let s:enable = 1 - s:enable
endfun endfun
call EregexToggle(1) if !(exists('g:eregex_default_enable') && g:eregex_default_enable == 0)
call eregex#toggle(1)
endif
"============================================================================= "=============================================================================
"Functions: "Functions: