LoginSignup
0
0

More than 3 years have passed since last update.

bash_profileをSublimeText3で開く方法

Last updated at Posted at 2018-12-14
  • 環境
    • macOS Mojave バージョン10.14.1
    • Sublime Text Version 3.1.1
  • 補足: Windows10とCentOS7(GUI)でもできました。
# ただ開くと「テキストエディット」というもので開きますがSublimeTextがいいんです。
$ open .bash_profile

コマンドラインからSublimeTextを起動する - ゆずめも を参考にしました。

SublimeTextのコマンドを確認する

# コマンドを確認して
$ ls -l /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/
total 104
-rwxr-xr-x  1 mana  admin  50064  6  3  2018 subl
# 叩くとSublimeTextが起動した
$ /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
OS コマンド
macOS /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
Windows {インストールディレクトリ}/Sublime\ Text\ 3/subl
CentOS {インストールディレクトリ}/sublime_text/sublime_text

sublのエイリアスを.bash_profileに設定する

# 追記して
$ echo "alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'" >> ~/.bash_profile
# 反映する
$ source ~/.bash_profile

# PATHを通したわけじゃないから探せないけど
$ which subl
# sublでSublimeTextが起動できるようになった。
$ subl

sublで.bash_profileをSublimeTextで開けるようになる

$ subl .bash_profile
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0