LoginSignup
0
2

More than 3 years have passed since last update.

【必須アプリ13選】Macを初期化したらすること

Last updated at Posted at 2020-04-28

自分は、半年に一回、大掃除感覚でMacを初期化します。
毎回、調べてアプリを入れ直すのはとても面倒なため、自分用メモも兼ねて初期化した際のセットアップマニュアルを作りました。
質問・誤字などありましたら、コメントや編集リクエストお願いします_ _

アプリ

最低限のアプリをまとめました。

必須アプリ

Google Chrome

ダウンロード
ブラウザ
テーマはdracula
公式ページ
chrome web store

Resolutionator

ダウンロード
Macの解像度の上限を引き上げるアプリ。
設定だと、1680x1050までしか出ない解像度を、3880x2425まで引き上げる。
2880x1800が作業に最適だと思う。

MEGASync

ダウンロード
無料で50GB使えるストレージサービス
データを全てクラウドにあげているため、必須。

Alfred 4

ダウンロード
Spotlightのようなもの。

Copy Clip

ダウンロード
クリップボードマネージャー
コピー履歴が全て記録され、一つ前のコピーを貼り付けなどができる。

HotSpot Shield

ダウンロード
VPNアプリ
IPアドレスを変更してウェブページにアクセスすることができる。

Karabinder Elements

ダウンロード
キー配置を変更するアプリ。

Skitch

ダウンロード
画像に簡単に注釈を入れられる。

SNS

Discord

ダウンロード
個人的に使う。

LINE

ダウンロード
個人的に使う。

Franz

ダウンロード
複数のSNSをまとめて管理できる。
少々重いのがネック。
複数アカウントの登録もセッションを保って利用できる。

Slack

ダウンロード
テーマは、dracula theme。
公式ページ

zoom.us

ダウンロード

Development

Fluid

ダウンロード
ウェブページをアプリ化できる。
twitter公式クライアントは不安定なため、fluidでtwitterアプリを作成している。

iTerm

ダウンロード
ターミナルアプリ
テーマはdracula theme。
公式ページ
セットアップは後に記載。

Visual Studio Code

ダウンロード
エディター。
Atom&Vim派で使い分けていたが、VSCode&Vimに乗り換えた。
基本はVim派。
VimとVSCodeのセットアップは後に記載。

Xcode

ダウンロード
XCode Command Line Toolを使用するため。

SimpleNote

ダウンロード
ノートアプリ。

Docker desktop

ダウンロード

環境構築

インストール

homebrew・vim・python・ruby・tmux・fish&powerline-shellを使えるようにします。

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

exa, bat

brew install exa bat

fish&powerline-shell

brew install fish python3 go
go get github.com/motemen/ghq

~/go/bin/をPATHに追加。

pip3 install powerline-shell
ghq get https://github.com/powerline/fonts.git
cd ~/ghq/github.com/powerline/fonts/
open .

SourceCodeProをインストール
iTermの設定からProfiles→Default→Text→FontよりSource Code Pro for powerlineを選択。

fishを標準shellへ設定するため、/etc/shells/usr/local/bin/fishを追記

chsh -s /usr/local/bin/fish

テーマは、dracula theme。
公式ページ

rbenv

brew install rbenv ruby-build

rbenv initと実行し表示される文字列を.zshrcconfig.fishなどに記入。

rbenv install 2.7.1 #その時の安定版をインストール
rbenv versions
rbenv global 2.7.1
rbenv versions
ruby --version
brew install python3

tmux

brew install tmux

テーマは、dracula theme。
公式ページ

設定ファイル

tmux

brew install tmux
tmux.conf
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "left"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/tmux-powerline/powerline.sh right)"
set -g status-bg colour235
set-option -g status-left-length 100
set-option -g status-right-length 120
set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"
PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
set -g prefix C-a
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
setw -g mouse on
set -g default-terminal "screen-256color"
set -g @plugin 'dracula/tmux'

vim

if has('vim_starting')
  set rtp+=~/.vim/plugged/vim-plug
  if !isdirectory(expand('~/.vim/plugged/vim-plug'))
    echo 'install vim-plug...'
    call system('mkdir -p ~/.vim/plugged/vim-plug')
    call system('git clone https://github.com/junegunn/vim-plug.git ~/.vim/plugged/vim-plug/autoload')
  end
endif
call plug#begin('~/.vim/plugged')

" ペーストの時のインデントを無効化
Plug 'ConradIrwin/vim-bracketed-paste'

" パワーラインステータスバー
Plug 'itchyny/lightline.vim'

" Draculaテーマ
Plug 'dracula/vim'

" ファイルをツリー表示
Plug 'scrooloose/nerdtree'

" endの自動挿入
Plug 'tpope/vim-endwise'

" vimで画面サイズ調整などができるように
Plug 'kana/vim-submode'

" インデントを分かりやすくする
Plug 'Yggdroot/indentLine'
set laststatus=2 " ステータスラインを常に表示
set showmode " 現在のモードを表示
set showcmd " 打ったコマンドをステータスラインの下に表示
set ruler " ステータスラインの右側にカーソルの現在位置を表示する

" 自動保存
Plug 'vim-scripts/vim-auto-save'
" デフォルトで有効にする
let g:auto_save = 1

" Unite.vim
Plug 'Shougo/unite.vim'
Plug 'Shougo/neomru.vim'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" insert modeで開始
let g:unite_enable_start_insert = 1
" 大文字小文字を区別しない
let g:unite_enable_ignore_case = 1
let g:unite_enable_smart_case = 1
" grep検索
nnoremap <silent> ,g  :<C-u>Unite grep:. -buffer-name=search-buffer<CR>
" カーソル位置の単語をgrep検索
nnoremap <silent> ,cg :<C-u>Unite grep:. -buffer-name=search-buffer<CR><C-R><C-W>
" grep検索結果の再呼出
nnoremap <silent> ,r  :<C-u>UniteResume search-buffer<CR>
nnoremap ,uc :<C-u>Unite file<CR>
nnoremap ,uh :<C-u>Unite file_mru<CR>
" unite grep に ag(The Silver Searcher) を使う
if executable('ag')
  let g:unite_source_grep_command = 'ag'
  let g:unite_source_grep_default_opts = '--nogroup --nocolor --column'
  let g:unite_source_grep_recursive_opt = ''
endif

Plug 'dracula/vim', { 'as': 'dracula' }

call plug#end()

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" マップ
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap j gj
nnoremap k gk
nnoremap p P
nnoremap P p
nnoremap q :q<CR>
" 行を移動
nnoremap <C-S-Up> "zdd<Up>"zP
nnoremap <C-S-Down> "zdd"zp
" 複数行を移動
vnoremap <C-S-Up> "zx<Up>"zP`[V`]
vnoremap <C-S-Down> "zx"zp`[V`]
imap <C-h> <Del>
" Window分割
nnoremap \| :vsplit<CR>
nnoremap - :split<CR>
nnoremap s <Nop>
nnoremap sj <C-w>j
nnoremap sk <C-w>k
nnoremap sl <C-w>l
nnoremap sh <C-w>h
nnoremap sJ <C-w>J
nnoremap sK <C-w>K
nnoremap sL <C-w>L
nnoremap sH <C-w>H
nnoremap sn gt
nnoremap sp gT
nnoremap sr <C-w>r
nnoremap s= <C-w>=
nnoremap sw <C-w>w
nnoremap so <C-w>_<C-w>|
nnoremap sO <C-w>=
nnoremap sN :<C-u>bn<CR>
nnoremap sP :<C-u>bp<CR>
nnoremap st :<C-u>tabnew<CR>
nnoremap ss :<C-u>sp<CR>
nnoremap sv :<C-u>vs<CR>
nnoremap sq :<C-u>q<CR>
nnoremap sQ :<C-u>bd<CR>
nnoremap <silent><C-e> :NERDTreeToggle<CR>
nnoremap <silent><C-t> :terminal<CR>

nmap / /\v

call submode#enter_with('bufmove', 'n', '', 's>', '<C-w>>')
call submode#enter_with('bufmove', 'n', '', 's<', '<C-w><')
call submode#enter_with('bufmove', 'n', '', 's+', '<C-w>+')
call submode#enter_with('bufmove', 'n', '', 's-', '<C-w>-')
call submode#map('bufmove', 'n', '', '>', '<C-w>>')
call submode#map('bufmove', 'n', '', '<', '<C-w><')
call submode#map('bufmove', 'n', '', '+', '<C-w>+')
call submode#map('bufmove', 'n', '', '-', '<C-w>-')
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"文字コードをUFT-8に設定
set fenc=utf-8
" バックアップファイルを作らない
set nobackup
" スワップファイルを作らない
set noswapfile
" 編集中のファイルが変更されたら自動で読み直す
set autoread
" バッファが編集中でもその他のファイルを開けるように
set hidden
" 入力中のコマンドをステータスに表示する
set showcmd
" 行番号を表示
set number
" 現在の行を強調表示
set cursorline
" 現在の行を強調表示(縦)
set cursorcolumn
" 行末の1文字先までカーソルを移動できるように
set virtualedit=onemore
" インデントはスマートインデント
set smartindent
" ビープ音を可視化
set visualbell
" 括弧入力時の対応する括弧を表示
set showmatch
" ステータスラインを常に表示
set laststatus=2
" コマンドラインの補完
set wildmode=list:longest
" 行番号を表示
set number
" 現在の行を強調表示
set cursorline
" 現在の行を強調表示(縦)
set cursorcolumn
" 行末の1文字先までカーソルを移動できるように
set virtualedit=onemore
" インデントはスマートインデント
set smartindent
" ビープ音を可視化
set visualbell
" 括弧入力時の対応する括弧を表示
set showmatch
" ステータスラインを常に表示
set laststatus=2
" コマンドラインの補完
set wildmode=list:longest
" 不可視文字を可視化(タブが「▸-」と表示される)
set list listchars=tab:\▸\-
" Tab文字を半角スペースにする
set expandtab
" 行頭以外のTab文字の表示幅(スペースいくつ分)
set tabstop=2
" 行頭でのTab文字の表示幅
set shiftwidth=2
" 検索文字列が小文字の場合は大文字小文字を区別なく検索する
set ignorecase
" 検索文字列に大文字が含まれている場合は区別して検索する
set smartcase
" 検索文字列入力時に順次対象文字列にヒットさせる
set incsearch
" 検索時に最後まで行ったら最初に戻る
set wrapscan
" 検索語をハイライト表示
set hlsearch
" クリップボードの共有
set clipboard=unnamed,autoselect
" カラースキーム
autocmd VimEnter,ColorScheme * highlight Comment ctermfg=22 guifg=#ffebcd
autocmd VimEnter,ColorScheme * highlight LineNr ctermbg=1 guibg=#ffebcd
colorscheme dracula
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" scripts
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has('mouse')
  set mouse=a
  if has('mouse_sgr')
    set ttymouse=sgr
  elseif v:version > 703 || v:version is 703 && has('patch632')
    set ttymouse=sgr
  else
    set ttymouse=xterm2
  endif
endif
if &term =~ "xterm"
  let &t_SI .= "\e[?2004h"
  let &t_EI .= "\e[?2004l"
  let &pastetoggle = "\e[201~"

  function XTermPasteBegin(ret)
    set paste
    return a:ret
  endfunction

  inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
endif

.vimrcを作成後、vimを実行して:PlugInstall

fish

config.fish
set fish_plugins theme git rbenv rails brew bundler gem osx pbcopy better-alias gi peco z 
set -gx OMF_PATH $HOME/.local/share/omf

# Customize Oh My Fish configuration path.
# set -gx OMF_CONFIG $HOME/.config/omf
function fish_prompt
  powerline-shell --shell bare $status
end
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
set SHELL fish
set fish_theme agnoster
function fish_user_key_bindings
  bind \cr peco_select_history # Bind for peco select history to Ctrl+R
  bind \cf peco_change_directory # Bind for peco change directory to Ctrl+F
end
alias vim="vim"
alias ls="exa -a"
alias cat="bat"
alias make_gitignore="wget https://www.gitignore.io/api/c,vim,ruby,macos -o .gitignore"
alias rm="rm -rf"
alias cp="cp -r"
alias e="exit"
alias edit_config="vim ~/.config/fish/config.fish"
alias editcnf="vim ~/.config/fish/config.fish"
alias sourcecnf=". ~/.config/fish/config.fish"
alias シーザー暗号="ruby main.rb"
alias wget="axel"
alias c="clear"
alias l="lazygit"
alias sl="ls"
alias cl="clear"
alias wget="axel -a -n 10"
alias dgxssh="ssh rihito_ninokata@0.tcp.ngrok.io -p 17809"
alias raspissh="ssh reetoknino@reetok-raspi.local"
alias raspisshremote="ssh reetoknino@0.tcp.ngrok.io -p 12532"
alias bitdir="cd ~/.ghq/github.com/bittn/bittn/;c"
alias ff="env EDITOR=vim ff"
alias f="env EDITOR=vim ff"
alias cls="clear;ls"
alias emacs="emacs -nw"
export LC_CTYPE=en_US.UTF-8
export TERM=xterm-256color
set EDITOR "vim"
set PS1 "$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
#------------------------------------------------
# FISH PATH SETTING
# set -U fish_user_paths /usr/local/bin $fish_user_paths
#------------------------------------------------
set PATH ~/go/bin/ $PATH
set PATH /usr/local/bin $PATH
set PATH /usr/bin $PATH
set JAVA_HOME '"/usr/libexec/java_home -v 12.0.2"'
set CPATH /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include $CPATH
set -x BITTNDIR /Users/reetoknino/Downloads/bittn-3.0.0
set PATH /usr/local/bin $PATH
set -g fish_user_paths "/usr/local/opt/ncurses/bin" $fish_user_paths
set -gx LDFLAGS "-L/usr/local/opt/ncurses/lib"
set -gx CPPFLAGS "-I/usr/local/opt/ncurses/include"
set PATH /usr/local/opt/binutils/bin $PATH

# tmux の自動起動
if test -z $TMUX
  tmux new-session
else
  cls
end

vscode

Japanese Language Pack

日本語化

vscode-icons

アイコンがついて見やすくなる

GitLens

git管理

Bracket Pair Colorizer

対応しているカッコを見ることができる

Path Autocomplete

path補完

Rainbow CSV

csvが見やすくなる

dracula official

ドラキュラテーマ

Duplicate action

エクスプローラーで複製ができるようになる

Output Colorizer

出力を色付けしてくれる

ruby

ruby用の拡張機能

python

python用の拡張機能

thrift

thrift用の拡張機能

Trailing Spaces

行末の空白を強調してくれる

zenkaku

全角スペースを強調表示してくれる

0
2
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
2