LoginSignup
9
8

More than 5 years have passed since last update.

シェルから MacVim のタブで開いたりする

Posted at

mvim というスクリプトを使うと CLI からよしなに MacVim を起動できる。

さらに CLI からもっとよしなに MacVim でファイルを開いたりしたい。

具体的には:

  • 引数を指定しなければ MacVim のウィンドウを開く
  • 引数を渡すと既存の server のタブで開く

といったことをしたい。

macvim
function macvim () {
  local mvim="/Applications/MacVim.app/Contents/MacOS/mvim"

  if [[ ${#@} = 0 ]]; then
    $mvim
  else
    $mvim --remote-tab-silent $@
  fi
}
9
8
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
9
8