Macを再インストールしてからやった事

初めまして。s3ij1nnと申します。よろしくお願いします。

 

まず最初にMacをクリーン再インストールしました。

今回はその後設定した事をメモします。

 

brewをインストールする。

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

docker, vagrant は環境汚染を防ぐ為に入れました。

brew install vim curl wget git tmux rclone python zsh
brew cask install iterm2 vagrant virtualbox docker docker-compose docker-machine

oh-my-zsh のインストール

oh-my-bash, bash_it, Prezto, fish 等の経験がありますが、テーマやプラグイン、普段使うショートカットキー等で不便と感じることがあったので人口が多いoh-my-zshに帰ります。

また使いたいと思ったら仮想コンテナ上で動かす予定です。

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

zshのテーマは適当でいいです。

tmux の powerline をインストールする。

pip3 install git+https://github.com/powerline/powerline -v

vim .tmux.conf

run-shell "powerline-daemon -q"
source /usr/local/lib/python3.7/site-packages/powerline/bindings/tmux/powerline.conf

vim のパッケージマネージャーと設定

vim には パッケージマネージャー dein とか nvim を使うとか色々ありますが、いろんなパッケージをインストールしたらどちらにしろ重いです。

パッケージマネージャのコマンド名が色々ありすぎてめんどくさくなりました。

コマンド名がシンプルな Vundle を使います。

その他の設定では

qiita.com

を参考にしました。

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

.vimrc

" Vundle

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

Plugin 'mattn/emmet-vim'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
" Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

" setting
"文字コードを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
" 折り返し時に表示行単位での移動できるようにする
nnoremap j gj
nnoremap k gk


" Tab系
" 不可視文字を可視化(タブが「▸-」と表示される)
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
" ESC連打でハイライト解除
nmap <Esc><Esc> :nohlsearch<CR><Esc>

" NERDTree
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

パッケージで入れたのは syntastic emmet NERDTreeのみです。

もっと他にインストールするならば、virtualboxかdockerで運用する予定です。

パスワードマネージャ

1password, lastpass, Password Store(GPG encrypt password manager), MasterPassword 等の経験があり、現在 1password に課金していますが、個人的には KeeWeb が無料の中では安定しているように感じます。

Androidスマートフォン, もう2台のMacと同期したいので、同期しやすく無料のKeeWebを選びました。

しばらくは 1password を使ってい KeeWeb に慣れてきたら切り替えようと思います。

Terminal 環境

Terminal のフォント, カラーもプログラミングをする上では重要なファクターの一つです。

そこで Ricty Diminished Powerline と japanesque を使います。

github.com

github.com

どーん

f:id:s3ij1nn:20181205150509p:plain
screenfetch