Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add quotation marks around selected text in Eclipse

Countless times i have needed to put a quotation marks around text during programming. I remember awhile ago that i have seen someone selecting text and simply do magic with the keyboard shortcuts and putting quotation marks around it. How to do so?

like image 698
homerun Avatar asked Dec 25 '22 23:12

homerun


1 Answers

In eclipse

1. Window -> Preferences -> Java -> Editor -> Templates
2. Click on "New"
3. Type "quote" for name (you can name it whatever you want)
4. In the pattern box, enter "${word_selection}"${cursor}
5. Click ok
6. Click apply and close preferences
7. Select the string you want quoted, press CTRL + <space> and type quote
like image 89
usha Avatar answered Jan 14 '23 07:01

usha