如何在Eclipse中在所选文本周围添加引号 [英] How to add quotation marks around selected text in Eclipse

查看:379
本文介绍了如何在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?

推荐答案

在日食中

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

这篇关于如何在Eclipse中在所选文本周围添加引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆