The options would include installing a VIM plugin for eclipse as answered in this question : What vim plugins are available for Eclipse?
OR,
A very simple AHK script would do this beautifully :
The code I just tested that would do this is :
#Persistent
#SingleInstance force
SetTitleMatchMode 2
Hotkey, IfWinActive,ahk_class SWT_Window0
Hotkey,#r,repeatchar
Hotkey,!+^r,repeatchar
return
repeatchar:
sendinput ^c ;copy the selected character
sendinput {%clipboard% 50}
return
This script would repeat the selected string 50 times in Eclipse on pressing Windows + R
or Alt + Ctrl + Shift + R
.
I have shared the script as well as an executable for it here. The executable was created by compiling the script. If you are uncomfortable executing it, you can download the portable version of AHK from here. With the portable version, you will have to manually associate the .ahk
files to Open with AutoHotkey.exe
.
Here is a (not-so-great) screen-cast showing this in action.