summaryrefslogtreecommitdiffstats
path: root/ftplugin/ruby.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/ruby.vim')
-rw-r--r--ftplugin/ruby.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim
index 9a2283ef..786bb7c8 100644
--- a/ftplugin/ruby.vim
+++ b/ftplugin/ruby.vim
@@ -186,7 +186,7 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
\."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['"
\."| sil! exe 'unmap <buffer> [m' | sil! exe 'unmap <buffer> ]m' | sil! exe 'unmap <buffer> [M' | sil! exe 'unmap <buffer> ]M'"
- if maparg('im','n') == ''
+ if maparg('im','x') == '' && maparg('im','o') == '' && maparg('am','x') == '' && maparg('am','o') == ''
onoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
onoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR>
xnoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
@@ -196,7 +196,7 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
\."| sil! exe 'xunmap <buffer> im' | sil! exe 'xunmap <buffer> am'"
endif
- if maparg('iM','n') == ''
+ if maparg('iM','x') == '' && maparg('iM','o') == '' && maparg('aM','x') == '' && maparg('aM','o') == ''
onoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR>
onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR>
xnoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR>