【问题标题】:Ranger - file manager open_with WebStormRanger - 文件管理器 open_with WebStorm
【发布时间】:2015-02-02 18:25:07
【问题描述】:

我想知道是否可以在 ranger 中使用 open_with 选项,以便在 WebStorm 中打开文件或目录。现在它已设置为在 Vim 中打开,但也希望可以选择使用 WebStorm。

【问题讨论】:

    标签: unix terminal console webstorm


    【解决方案1】:

    当我在 WebStorm 中时,我所做的是对我的 bashrc 进行编程以更改我的默认 $EDITOR。如果我从 WebStorm 终端调用 ranger,它会在 WebStorm 中打开我的文件,但是当我在常规终端中时,它会在我的默认 $EDITOR (vim) 中打开我的文件。

    我刚刚在我的 bashrc/zshrc 中添加了这些行(我使用的是 Ubuntu):

    # Check if we are in webstorm
    if [[ $(env | grep -i storm | wc -l) > 1 ]]; then
        EDITOR=wstorm
    else
        EDITOR=vim
    fi
    

    【讨论】:

      【解决方案2】:

      我认为您可以生成 WebStorm 命令行可执行文件并将 open_with 设置为它。请参阅问题的答案How to open webstorm from terminal

      【讨论】:

        猜你喜欢
        • 2022-08-15
        • 1970-01-01
        • 2022-01-04
        • 2012-06-30
        • 1970-01-01
        • 1970-01-01
        • 2022-06-30
        • 1970-01-01
        • 2017-01-13
        相关资源
        最近更新 更多