diff --git a/README.md b/README.md index 8b3f643..c7dfeae 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ When enabled, center the current line automatically. ## Dependency -[`SaveLoadMapping`](https://github.com/Ace-Who/vim-SaveLoadMapping) plugin. This +[`SaveLoadMapping`](https://github.com/Ace-Who/vim-MappingMem) plugin. This is not necessary but recommended, which can restore the mappings overriden by `AutoCenter` when you turn it off. diff --git a/autoload/AutoCenter.vim b/autoload/AutoCenter.vim index c1a59ee..f8892de 100644 --- a/autoload/AutoCenter.vim +++ b/autoload/AutoCenter.vim @@ -20,16 +20,16 @@ function! AutoCenter#On() "{{{ endif augroup AutoCenter autocmd! - " !!Warning!! Undo and redo also change the text, triggering the AutoCenter + " !!Note!! Undo and redo also change the text, triggering the AutoCenter " autocmd, which changes the effect of undo and BREAKS REDO if this command - " changes the text. So we don't center text in this case. + " changes the text. So we don't center text in these cases. autocmd TextChanged,TextChangedI * \ if !s:isUndoRedo() | call s:center() | endif augroup END " Ues '=' key to center lines in Normal and Visual mode. " Save the mappings first for restoring when turning off AutoCenter. " This requires the 'SaveMapping' plugin - " (https://github.com/Ace-Who/vim-SaveLoadMapping). + " (https://github.com/Ace-Who/vim-MappingMem). if exists(':SaveMapping') == 2 silent SaveMapping '=', 'n', 'global' silent SaveMapping '==', 'n', 'global' @@ -57,7 +57,7 @@ function! AutoCenter#Off() "{{{ nunmap == xunmap = " Restore the mappings saved earlier. This requires the 'SaveMapping' plugin - " (https://github.com/Ace-Who/vim-SaveLoadMapping). + " (https://github.com/Ace-Who/vim-MappingMem). if exists(':LoadMapping') == 2 silent LoadMapping '=', 'n', 'global' silent LoadMapping '==', 'n', 'global'