LoginSignup
4

More than 5 years have passed since last update.

快適に開発を始めるためにやったこと

Last updated at Posted at 2018-06-18

tmuxの導入と使い方

Macに最初から入っているターミナルを使っているためまずは1つのターミナルで複数のプロセスを管理できるようにtmuxをいれました

# インストール
$ brew install tmux
# 起動
$ tmux

# デフォルトのshellがbashじゃない人は追加で以下を行う
$ vim ~/.tmux.conf
set-option -g default-shell /bin/zsh

$ killall tmux; tmux

ウインドウの操作

iTerm2のタブ的なやつ

<Ctrl-b> + 下のコマンドを実行する

c 新規作成
w 一覧選択
& 現在のウィンドウ破棄

ペインの操作

ウインドウを分割して1画面で複数のセッションを持てる

<Ctrl-b> + 下のコマンドを実行する

% 左右にペイン分割
" 上下にペイン分割
q ペイン番号を表示
カーソル 指定方向のペインへ移動 ※連続押しでプレフィックス継続
x ペインの破棄

Gitで管理しているリポジトリをvimでコマンド一発で開けるようにする

ghqのインストール
$ brew tap motemen/ghq
$ brew install ghq

$ git config --global ghq.root ~/your_repo_dir
pecoのインストール
$ brew tap peco/peco
$ brew install peco
zshrcにaliasの追加
$ vim ~/.zshrc
alias v='vim $(ghq root)/$(ghq list | peco)'

$ source ~/.zshrc

以下のaliasを仕込むことでv通しただけでgihubのローカルリポジトリ一覧が出て選択するとvimでひらくことができるようになる

[WIP]Vim

https://vim-bootstrap.com/
これからやってく

参考リンク

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
4