Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac ターミナルの設定色々

Posted at

Summary

Markdownの練習がてらQiitaに初投稿してみる。
ターミナルの設定変更を行うにあたり参考にさせていただいた素晴らしい記事。
https://qiita.com/kinchiki/items/57e9391128d07819c321

その他引用元は各項ごとに。

Index

Ⅰ. 事前設定
Ⅱ. テーマ
Ⅲ. フォント
Ⅳ. vim
Ⅴ. プロンプト

事前設定

  1. Macの購入 ()
  2. GitHubへの登録、sign-in

テーマ

脳死でICEBERG

  1. 公式サイトからDL
    (一番下にDownloadボタンがあります)
  2. 作成者様のブログの手順をなぞって設定
  3. 最後は[デフォルト]をクリックして完了

フォント

デフォルトはイケテナイらしいので変える。
rictyとricty diminished、どっちでもいいっぽい。
App開発ならricty、Linuxならdiminished、とかなんとか。
rictyにしとけば安牌か。

ricty diminishedの場合

brew tap caskroom/fonts
brew cask install font-ricty-diminished

rictyの場合

brew tap sanemat/font
brew install ricty

# 下記2行は上記のコマンド実行後に表示されるのでそっちをコピぺ実行でもおk
cp -f /usr/local/opt/ricty/share/fonts/Ricty*.ttf ~/Library/Fonts/
fc-cache -vf

設定

  1. ターミナルを開く
  2. ディスプレイ左上🍏マークの横の[ターミナル]>[環境設定]を選択
  3. ↓の通り[変更]>フォントの編集窓が上がるのでrictyを選択>[デフォルト]
    image.png

参考
https://qiita.com/mochizukikotaro/items/def041700846adb903fe
https://qiita.com/segur/items/50ae2697212a7bdb7c7f
https://www.konosumi.net/entry/2018/03/07/011920

vim

Hybridが見やすいらしい。

# ~/vim/colorsのdirectoryを作る *既にあれば不要
cd ~
mkdir -p ~/.vim/colors

# gitからDLしてくる
cd ~
git clone https://github.com/w0ng/vim-hybrid

# DLしたファイルを作成した/colorsに移動
mv vim-hybrid/colors/hybrid.vim ~/.vim/colors

# home下に.vimrcファイルを作成
vi ~/.vimrc
.vimrc
syntax enable
colorscheme hybrid
set background=dark
 
set number
set cursorline
set virtualedit=onemore
set showmatch

中身の設定の詳細は参考のリンク先に。

参考
https://qiita.com/mochizukikotaro/items/def041700846adb903fe
https://qiita.com/morikooooo/items/9fd41bcd8d1ce9170301
https://pc.tokuvin.net/vim-hybrid/

プロンプト

[xxxnoMacBook:user]とかダサくなっているのを変える。
そのためにbash_profileとbashrcに追記する。

bash_profileの編集

cd ~
vi .bash_profile
.bash_profile
# read bashrc
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

bashrcの編集

cd ~
vi .bashrc
.bashrc
# prompt param
PS1='[\h:\W] $ '

あとはこのサイトの手順を踏んでコンピュータ名を変えましょう
(\hの部分、xxxnoMacを適当な文字に)
↓こんな感じになりました?
image.png

参考
https://tech.qookie.jp/posts/terminal-turn-off-prompt/
https://qiita.com/dark-space/items/cf25001f89c41341a9fd

3
4
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?