diff --git a/autoload/SpaceVim/layers/chinese.vim b/autoload/SpaceVim/layers/chinese.vim index 48e467795..e166653ef 100644 --- a/autoload/SpaceVim/layers/chinese.vim +++ b/autoload/SpaceVim/layers/chinese.vim @@ -40,6 +40,11 @@ function! SpaceVim#layers#chinese#plugins() abort endfunction function! SpaceVim#layers#chinese#config() abort + if has_key(g:_spacevim_mappings_space.x, 't') + let g:_spacevim_mappings_space.x.t.name = '+Transpose/Translate' + else + let g:_spacevim_mappings_space.x.t = {'name' : '+Translate'} + endif call SpaceVim#mapping#space#def('nnoremap', ['x', 't', 't'], 'Translate' , 'translate-current-word' , 1) if !SpaceVim#layers#isLoaded('edit') let g:_spacevim_mappings_space.x.g = {'name' : '+Grammarous'} diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim index 99298c70d..190fd7d06 100644 --- a/autoload/SpaceVim/layers/edit.vim +++ b/autoload/SpaceVim/layers/edit.vim @@ -353,7 +353,11 @@ function! SpaceVim#layers#edit#config() abort \ 'move-text-up(enter-transient-state)', 1) " transpose - let g:_spacevim_mappings_space.x.t = {'name' : '+Transpose/Translate'} + if has_key(g:_spacevim_mappings_space.x, 't') + let g:_spacevim_mappings_space.x.t.name = '+Transpose/Translate' + else + let g:_spacevim_mappings_space.x.t = {'name' : '+Transpose'} + endif call SpaceVim#mapping#space#def('nnoremap', ['x', 't', 'c'], 'call call(' \ . string(s:_function('s:transpose_with_previous')) . ', ["character"])', \ 'swap-current-character-with-previous-one', 1)