Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何从终端直接打开webstorm #14

Open
fygethub opened this issue Jun 17, 2021 · 2 comments
Open

如何从终端直接打开webstorm #14

fygethub opened this issue Jun 17, 2021 · 2 comments

Comments

@fygethub
Copy link
Owner

如何从终端直接打开webstorm

  1. 先在Webstorm编辑器中配置终端命令行的打开命令。Tools => Create Command-line Launcher.

  2. 设置完成后在终端输入cd /usr/local/bin命令,可以看到在bin文件夹下面有webstorm.

  3. 此时只需要先切换到你想要打开项目的路径下,然后输入webstorm .,即可用Webstorm编辑器打开当前目录文件了。

设置webstorm别名快捷键

  1. 编辑 .zshrc 文件。vim .zshrc
  2. 为Webstorm添加别名。alias ws="webstorm"
  3. 然后source .zshrc即可生效。
cd /Users/username/XXX/project
// 然后直接执行 webstorm . 即可。
webstorm .
// 或者直接使用别名
ws .
@iDestin
Copy link

iDestin commented May 12, 2023

在WebStorm 2023.1.1中提示此方式为过时的方式,可以按如下方式更新

删除之前的路径

sudo rm -rf /usr/local/bin/webstorm

新版在 .zshrc 中配置PATH即可

export PATH=$PATH:/Applications/WebStorm.app/Contents/MacOS

@yourbusiness
Copy link

王德发?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants