简体   繁体   English

intellij-每个模块/项目的按键映射/热键/快捷方式

[英]intellij - keymap / hotkey / shortcut per module / project

I have many projects 我有很多项目

I use a hotkey to deploy files built externally to my deploy folder, as intellij is not doing that or is doing that very very unreliably and slowly. 我使用热键将外部构建的文件部署到我的deploy文件夹中,因为intellij没有这样做或正在非常不可靠且缓慢地执行该操作。

so say in project AI have a shortcut CTRL + SHIFT + Z to deploy all files I need to the deploy folder with a shell script. 所以说在AI项目中有一个快捷键CTRL + SHIFT + Z可以将我需要的所有文件部署到带有shell脚本的deploy文件夹中。 In Project BI have a different shell script (obviously) to deploy all I need. 在Project BI中(显然)有一个不同的Shell脚本来部署我需要的所有脚本。 But I dont want to create a new shortcut, I want to reuse CTRL + SHIFT + Z but that doesn't seem to work 但是我不想创建一个新的快捷方式,我想重用CTRL + SHIFT + Z,但这似乎不起作用

Is there a way to define a shortcut / hotkey on module basis? 有没有一种方法可以基于模块定义快捷方式/热键? or a different solution? 或其他解决方案?

It is not possible at the moment, you can set several different keyboard layouts and switch them manually. 目前尚无法,您可以设置几种不同的键盘布局并手动进行切换。 Also there is a feature request to provide project level keymap: https://youtrack.jetbrains.com/issue/IDEA-127090 也有一项功能请求,以提供项目级别的键盘映射: https : //youtrack.jetbrains.com/issue/IDEA-127090

I just use always the similar ant build file in all projects doing a simple copy, and assign the shortcut to that ant build file: 我只是在执行简单复制的所有项目中始终使用相似的ant生成文件,并将快捷方式分配给该ant生成文件:

so in each project I have a build.xml in the root with this content 所以在每个项目中,我在根目录中都有一个内容为build.xml的内容

I guess it works because the "target name" is always the same in each build.xml 我猜它行得通,因为每个build.xml中的“目标名称”始终相同

<project name="joomlaPHC" default="copy-css" basedir=".">
    <target name="copy-css"
            description="copies css files" >
        <copydir src="/home/myuser/IdeaProjects/MYPROJECT/src/public" dest="/var/www/html/MYPROJECT.local/public"/>
    </target>
</project>

the shortcut seems to work 快捷方式似乎有效 在此处输入图片说明

在此处输入图片说明 don't forget to assign the jdk 别忘了分配jdk

hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM