Mac: Mac安装gedit

个人比较喜欢gedit,在从ubuntu转到MAC以后尝试安装了一下。以下是安装步骤:
1. 去官网下载DMG包https://gedit.en.softonic.com/mac,官方DMG的版本是2.30.2,gedit-2.30.2.dmg
2. 下载完毕以后安装。

  1. 如果喜欢已命令行方式执行可以使用以下方法:

    a. 跳转到根目录

    cd ~

    b. 打开环境配置文件 ,如果没有该文件先执行

    touch .bash_profile
    open -e .bash_profile

    c. 看到编辑窗口以后在其中加入如下行

    alias gedit="sudo open -a gedit"

    d. 更新环境配置文件

    source .bash_profile

    f. 完成以后即可以在命令行中使用 如:

    gedit a.txt

PS:

  1. 如果source .bash_profile以后无法在命令行中执行gedit请尝试注销用户再登入,或者重启机器。

  2. 如果出现打不开“gedit”,因为它来自身份不明的开发者。的问题:参考https://jingyan.baidu.com/article/f71d60377960651ab741d140.html

猜你喜欢

转载自blog.csdn.net/dinnerhowe/article/details/80783938
mac