个人比较喜欢gedit,在从ubuntu转到MAC以后尝试安装了一下。以下是安装步骤:
1. 去官网下载DMG包https://gedit.en.softonic.com/mac,官方DMG的版本是2.30.2,gedit-2.30.2.dmg
2. 下载完毕以后安装。
如果喜欢已命令行方式执行可以使用以下方法:
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
:
如果
source .bash_profile
以后无法在命令行
中执行gedit请尝试注销用户再登入,或者重启机器。如果出现
打不开“gedit”,因为它来自身份不明的开发者。
的问题:参考https://jingyan.baidu.com/article/f71d60377960651ab741d140.html