CentOS7にSublimeText3をインストールする方法

- 環境
 - Dockerで作ったコンテナ環境
 - CentOS Linux release 7.6.1810 (Core) 
 - RPM version 4.11.3
 - xfc4-terminal 0.8.7.4

[公式のやり方](https://www.sublimetext.com/docs/3/linux_repositories.html#yum)でインストールします。

# 1.SublimeTextのPGP公開鍵をインポートする

```bash
$ sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
```

# 2.yumにSublimeTextのリポジトリを追加する

```bash
$ sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
Loaded plugins: fastestmirror, ovl
Repository google-chrome is listed more than once in the configuration
adding repo from: https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
grabbing file https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo to /etc/yum.repos.d/sublime-text.repo
repo saved to /etc/yum.repos.d/sublime-text.repo
```

# 3.インストールする

```bash
$ sudo yum install -y sublime-text
Loaded plugins: fastestmirror, ovl
Repository google-chrome is listed more than once in the configuration
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                  | 8.5 kB  00:00:00     
 * base: ty1.mirror.newmediaexpress.com
 * epel: ftp.riken.jp
 * extras: ty1.mirror.newmediaexpress.com
 * updates: ty1.mirror.newmediaexpress.com
base                                                                  | 3.6 kB  00:00:00  
extras                                                                | 3.4 kB  00:00:00  
google-chrome                                                         | 1.3 kB  00:00:00  
sublime-text                                                          | 2.9 kB  00:00:00  
updates                                                               | 3.4 kB  00:00:00  
(1/3): google-chrome/primary                                          | 1.7 kB  00:00:00  
(2/3): updates/7/x86_64/primary_db                                    | 5.7 MB  00:00:00  
(3/3): sublime-text/primary_db                                        | 2.1 kB  00:00:00
google-chrome                                           3/3
Resolving Dependencies
--> Running transaction check
---> Package sublime-text.x86_64 0:3207-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================
 Package                          Arch    Version  Repository    Size
======================================================================
Installing:
 sublime-text                     x86_64  3207-1   sublime-text  13 M

Transaction Summary
======================================================================
Install  1 Package

Total download size: 13 M
Installed size: 33 M
Is this ok [y/d/N]: y
Downloading packages:
sublime-text-3207-1.x86_64.rpm                                        |  13 MB  00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : sublime-text-3207-1.x86_64               1/1 
  Verifying  : sublime-text-3207-1.x86_64               1/1 

Installed:
  sublime-text.x86_64 0:3207-1

Complete!
```

# 5.起動する
方法は3種類あります。

1. `[アプリケーション] > [開発] > [Sublime Text]`から起動
1. `/opt/`配下にインストールされているのでそこにある`sublime_text`をクリックして起動
1. ターミナルで`subl`と打って起動

# 6.やりたいことをやる
[Sublime Text でやりたいことをやるためのリンク集 - Qiita](https://qiita.com/ponsuke0531/items/781d38b4a7cbc8075ac2)