在Intellij Idea编辑器中的每个查找结果中获取多个游标(插入符号)?

时间:2016-10-19 22:06:36

标签: android-studio intellij-idea

我想同时选择包含单词“key”的所有字符串资源键。我很难搞清楚这一点,所以我想我会把这个发给别人。 multicursor documentation没有解决这个问题。

我想要选择的文件的摘录。

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- User Preferences -->    
    <string name="preference_key_pedigree_enable_offline_mode">Pref.OfflineMode</string>
    <string name="preference_title_pedigree_enable_offline_mode">Offline Mode</string>
    <string name="preference_summary_on_pedigree_enable_offline_mode">Scans work without an internet connection, don\'t require a VIN and can\'t be saved.</string>
    <string name="preference_summary_off_pedigree_enable_offline_mode">Scan results will be sent to the server.</string>
    <string name="preference_default_pedigree_enable_offline_mode">false</string>

    <string name="preference_key_pedigree_hide_cleared_dtcs">pref_pedigree_hide_cleared_dtcs</string>
    <string name="preference_title_pedigree_hide_cleared_dtcs">Hide Cleared DTCs</string>
    <string name="preference_summary_on_pedigree_hide_cleared_dtcs">DTC\'s are hidden after they\'ve been cleared</string>
    <string name="preference_summary_off_pedigree_hide_cleared_dtcs">DTC\'s are still shown after they\'ve been cleared</string>
    <string name="preference_default_pedigree_hide_cleared_dtcs">true</string>

    <string name="preference_key_analytics_global_opt_out">pref_analytics_global_opt_out</string>
    <string name="preference_title_analytics_global_opt_out">Analytics Opt-Out</string>
    <string name="preference_summary_on_analytics_global_opt_out">Analytics switched off.</string>
    <string name="preference_summary_off_analytics_global_opt_out">Crash reports and usage statistics are being used to improve this app.</string>
    <string name="preference_default_analytics_global_opt_out">false</string>
</resources>

2 个答案:

答案 0 :(得分:3)

Intellij Idea称之为multiselection

选择要使用光标搜索的术语。在我的例子中,单词 key
enter image description here
接下来,选择所有出现次数

screenshot of selection

现在你可以将你的选择( ctrl + W )扩展到整个键,然后复制并过去其他地方。

答案 1 :(得分:1)

使用多光标搜索术语 只需在Android studio中设置eclipse键盘即可。
只需选择条款并使用如下所示的快捷方式 新闻: Ctrl + Alt + Y