haibaraxx的个人博客分享 http://blog.sciencenet.cn/u/haibaraxx

博文

Linux:在终端上用Geany或Sublime Text打开文本文件

已有 5502 次阅读 2017-8-30 15:49 |个人分类:Linux|系统分类:科研笔记| text, 终端, Geany, sublime, 命令行

方法一:

在终端中输入: $ open [path of a text file] -a [path of the program]


Geany

$ open [path of a text file] -a /Applications/Geany.app


Sublime Text

$ open [path of a text file] -a /Applications/Sublime\ Text.app  注:空格的表示法为\空格


方法二:

1. 在.bashrc文件中添加如下路径并保存。


# Geany

export geany=/Applications/Geany.app/Contents/MacOS
export PATH=\$geany:\$PATH


# Sublime Text

export subl=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin
export PATH=\$subl:\$PATH


2. 重新打开一个终端,输入如下命令就可以用对应的编辑器打开文本文件了。

$ geany [path of a text file]
$ subl [path of a text file]



https://blog.sciencenet.cn/blog-3031432-1073428.html

上一篇:Python:Pandas之变长字典Series
下一篇:Linux:截屏
收藏 IP: 134.1.1.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-7 02:29

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部