Is there a shortcut for inserting a <%= %> in Rubymine?
I took a look in keymap and didn’t see anything.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The default shortcut is Ctrl+Shift+Period on Windows and Cmd+Shift+Period on Mac. It may not work on all the keyboards, in which case you can change it in
Settings(Preferenceson Mac) |Keymap:Main Menu,Tools,Erb,Insert <%= %>:You can also use code completion:
After accepting this choice you’ll get:
Another option is to define a live template:
Type
re, then Tab to expand.Finally, you can define a keyboard shortcut for any text/template using the following trick:
Edit|Macros|Start Macro Recordingre, then TabEdit|Macros|Stop Macro RecordingRubyExpressionnameNow go to
Keymapsettings and assign a shortcut toRubyExpressionunderEdit,Macros.