LoginSignup
10
10

More than 5 years have passed since last update.

Mac Book Air (MBA) の初期設定メモ書き

Last updated at Posted at 2015-10-17

Mac Book Air (MBA) の初期設定メモ書き Part1

(2015.10.10, Yosemite)
もともと Windows を使っていて、Mac を使い始めて1年半くらい経つ、
英語を勉強したいと思っている Vim派の設定です


購入時

  • キーボードは、US配列を選択
  • 画面が見やすいように、13インチ版を購入
  • PC スペックなどは、特にカスタマイズしなかった (付属品も購入なし)

初起動時

  • Main Language -> English (英語の勉強用に、使用言語を英語にした)
  • Location -> Show All をチェック -> Japan
  • Keyboard Layout -> Japanese -> Romaji
  • AppleID Sign In -> サインインしない -> ホームディレクトリ名を設定

System Preferences

  • iCloud -> サインイン -> 同期させたいものにチェックを入れる

  • Users & Groups -> アイコンにカーソルを合わせて edit -> 好きなものに変更

  • Users & Groups -> Contacts card: Open -> Edit -> 名前やアイコンを変更

  • Keyboard -> Modifier Keys... -> Caps Lock を Control へ変更

  • Keyboard -> Use all F1, F2, etc. keys as standard function ... をチェック

  • Keyboard -> Input Sources -> Japanese -> "¥" key generates \ を選択

  • Trackpad -> Point & Click -> 全てチェック, Tracking speed を最速にした

  • Energy Saver -> prevent computer from sleeping automatically ... をチェック

  • Security & Privacy -> Require password immediately

  • Mission Control -> Hot Corners... -> 左下を Put Display to Spleep に設定

  • Mission Control -> Automatically rearrange spaces based on ... のチェックを外す


時刻表示方法の変更

  • 右上の時刻をクリック -> Open Date & Time Preferences -> Clock -> Use a 24-hour clock, Show date をチェック

Terminal

  • Control + Tab, Control + Shift + Tab でターミナルのタブ移動
    System Preferences -> Keyboard -> Shortcuts
    -> App shortcuts -> プラスマークをクリック
    -> 全てのアプリケーションとなっている場所を、Terminal へ変更
    -> メニュータイトルに "Show Next Tab" と入力して、ctrl + tab
    -> メニュータイトルに "Show Previous Tab" と入力して、ctrl + shift + tab

  • ショートカットを Dock に追加
    Command + F -> Terminal.app を検索して起動
    -> アイコンを右クリック -> Options -> Keep in Dock

  • 外観の変更
    Terminal の起動 -> メニューの Terminal を選択 -> Preferences
    -> Profiles を Pro に合わせて Default をクリック
    -> Font -> Change -> Menlo Regular 11pt にセット


Workspace

  • 4本指で上にスワイプ -> 右上にカーソルを移動させると + マークが出る -> + マークを押してワークスペースを増加させる

Messages ( local network への接続 )

  • メニュー -> Preferences -> Accounts -> Bonjour -> Enable Bonjour instant messaging をチェック -> メニュー -> Window -> Buddies をクリック

Web Browser

  • safari で google chrome をインストール -> chrome を起動して、デフォルトに設定 -> メインで使用する google アカウントにサインイン -> お気に入り設定を import -> google アカウントを全て追加 -> google chorome を Dock に追加

Dropbox

  • Dropbox ダウンロード & インストール -> サインインした

XtraFinder

  • XtraFinder をダウンロード & インストール -> Application フォルダから XtraFinder を起動して、以下をチェックした
  1. Features -> Cut & Paste, Hide dot files on Desktop
  2. Add items to Finder menus
    -> Copy Path, New Terminal Here, New File, Show Hidden Items

Xcode、Command Line Tools

  • Xcode をインストール(app store からダウンロードしてインストール) -> Xcode を起動 -> ライセンスを承諾 -> Terminal の起動 -> xcode-select --install と入力 -> ライセンスを承諾

Atom

  • Atom をダウンロード -> Applications へ移動させる -> 起動 -> Dock に追加

  • vim mode の導入
    Atom を起動 -> メニューから Atom を選択 -> Install Shell Commands
    -> Terminal の起動 -> apm install vim-mode と入力

  • Atom を .txt ファイル等のデフォルトのエディタにする
    テキストファイルを abc.txt のように適当に作成して、右クリック
    -> Get Info -> Open With -> Atom を選択 -> Change All...
    (同様にして、.py ファイルなどのデフォルトエディタにした)

  • Atom の設定
    メニュー -> Atom -> Preferences から以下を設定した

  1. Settings -> Scroll Past End, Show invisibles, Tab length 3
  2. markdown で、改行しやすいように文末のスペースを削除しない
    Packages -> whitespace, Settings -> Remove Trailing Whitespace のチェックを外す

MacVim

  • MacVim-KaoriYa 20150707 より .dmg ファイルをダウンロード & インストール (初起動時に、System Preferences のセキュリティで MacVim を許可)
  • Atom と同様にして、MacVim を .tsv, ファイル等のデフォルトにした (ファイルサイズの大きなものは、MacVim で開く設定のため)

Karabiner

  • karabiner をダウンロード & インストール

  • Change Key の設定
    Karabiner を起動 -> 鍵をクリックして制御を許可して、以下を設定

  1. Command R -> Escape
  2. Change Semicolon(;) Key -> Swap Semicolon and Colon
  3. For Japanese -> Command L -> Command_L to Command_L (+ When you type Commnd_L only, send EISUU)
  • Atom で escape 等を押すと escape + EISUU キー となる設定
    Misc & Uninstall タブを選択 -> Open private.xml -> private.xml の編集 -> AtomのVim Modeを使いやすくする を参考に以下のように編集した
<?xml version="1.0"?>
<root>
    <appdef>
        <appname>ATOM</appname>
        <equal>com.github.atom</equal>
    </appdef>
    <item>
        <name>Leave InsertMode With Eisuu For Atom Vim Mode</name>
        <identifier>private.app_atom_esc_with_eisuu</identifier>
        <only>ATOM</only>
        <autogen>
            --KeyToKey--
            KeyCode::ESCAPE,
            KeyCode::ESCAPE, KeyCode::JIS_EISUU
        </autogen>
        <autogen>
            --KeyToKey--
            KeyCode::BRACKET_LEFT, VK_CONTROL,
            KeyCode::ESCAPE, KeyCode::JIS_EISUU
        </autogen>
        <autogen>
            --KeyToKey--
            KeyCode::C, VK_CONTROL,
            KeyCode::ESCAPE, KeyCode::JIS_EISUU
        </autogen>
        <autogen>
            --KeyToKey--
            KeyCode::COMMAND_R,
            KeyCode::ESCAPE, KeyCode::JIS_EISUU
        </autogen>
    </item>
</root>

-> Change Key タブを選択 -> Reload XML
-> Leave Insert Mode With Eisuu For Atom Vim Mode をチェック


Homebrew

  • terminal を起動 -> 以下を入力
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • wget, tree をインストール
  brew install wget
  brew install tree

ログインシェルを最新の zsh にした

  • Homebrew をアップデート & チェックをして、zsh をインストールした
brew update
brew doctor
brew install zsh
  • sudo vim /etc/shells として、末尾に以下を追記
/usr/local/bin/zsh
  • ログインシェルの変更
chsh -s /usr/local/bin/zsh
  • .zshrc の設定は、以下をコピペさせてもらった ( bindkey -v とだけ変更 )
    Zsh 入門者のための超速設定ガイド

  • 再起動して、シェルを確認 ( /usr/local/bin/zsh、zsh 5.1.1 となっていた )

echo $SHELL
zsh --version

Python3 環境の構築

  1. python3 のインストール
   brew install python3
  1. pip のインストールと、virtualenv, virtualenvwrapper の導入
   sudo easy_install pip
   sudo pip install virtualenv virtualenvwrapper
  1. 仮想環境のディレクトリを作成
   cd ~
   mkdir ~/.virtualenvs
  1. Zsh 入門者のための超速設定ガイド を参考にして、.zshenv に以下を追記
   export WORKON_HOME=$HOME/.virtualenvs
   source `which virtualenvwrapper.sh`
  1. Terminal を再起動して、e35 という名前の仮想環境を作る
   mkvirtualenv --no-site-package --python /usr/local/bin/python3 e35
  1. 仮想環境 e35 が Python 3.5.0 になっていることをチェック
   workon e35
   python -V

Numpy, Scipy, Matplotlib, Pandas

  • 仮想環境 e35 へ、良く使う python モジュールのインストール
   pip install --upgrade pip
   pip install numpy scipy matplotlib pandas
  • ローカルにインストールされているモジュールのチェック
   pip freeze -l

外部ディスプレイ(16:9)

  • Display Menu というアプリを App ストアからインストールして起動

  • モニターをつないで、メニューバーの Display Menu アイコンから、
    Display -> 16:9   1920 × 1080 (60.0 Hz)   を選択

  • 位置ズレ対策
    -> Mac は 16:10 で、アスペクト比が違うため水平方向の位置ズレが発生
    -> モニター本体のボタンを押して、水平方向の位置調整を行った
    (位置調整しても、アスペクト比が違うため完全には揃わない仕様らしい)

  • 外部ディスプレイをメインモニターにした
    System Preferences -> Display -> Arrangement
    -> Mac Book Air と外部ディスプレイの左右をドラッグ操作で入れ替えた
    -> 白い小さなバーをドラッグ操作で、外部ディスプレイの方に移動させた

10
10
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
10
10