Skip to content

Commit 8002564

Browse files
committed
Enable im, am, iM, and aM in visual mode.
1 parent f94575d commit 8002564

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ftplugin/ruby.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,21 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
134134
if maparg('im','n') == ''
135135
onoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
136136
onoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR>
137+
xnoremap <silent> <buffer> im :<C-U>call <SID>wrap_i('[m',']M')<CR>
138+
xnoremap <silent> <buffer> am :<C-U>call <SID>wrap_a('[m',']M')<CR>
137139
let b:undo_ftplugin = b:undo_ftplugin
138140
\."| sil! exe 'ounmap <buffer> im' | sil! exe 'ounmap <buffer> am'"
141+
\."| sil! exe 'xunmap <buffer> im' | sil! exe 'xunmap <buffer> am'"
139142
endif
140143

141144
if maparg('iM','n') == ''
142145
onoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR>
143146
onoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR>
147+
xnoremap <silent> <buffer> iM :<C-U>call <SID>wrap_i('[[','][')<CR>
148+
xnoremap <silent> <buffer> aM :<C-U>call <SID>wrap_a('[[','][')<CR>
144149
let b:undo_ftplugin = b:undo_ftplugin
145150
\."| sil! exe 'ounmap <buffer> iM' | sil! exe 'ounmap <buffer> aM'"
151+
\."| sil! exe 'xunmap <buffer> iM' | sil! exe 'xunmap <buffer> aM'"
146152
endif
147153

148154
if maparg("\<C-]>",'n') == ''

0 commit comments

Comments
 (0)