LoginSignup
9
10

More than 5 years have passed since last update.

viとvimの設定を分ける

Posted at

CLI から起動する vi は素のまま使いたいって場合に。

-u NONE --noplugin とオプションつけて起動するとなにも読み込まれない。
これを zshrc とか bashrc にエイリアス登録しておけば、使い分けが簡単。

.zshrc

# vi は素のまま使う
alias vi="vi -u NONE --noplugin"

# vim は MacVim として起動する
if [ -f /Applications/MacVim.app/Contents/MacOS/Vim ]; then
    alias vim='env LANG=ja_JP.UTF-8 /Applications/MacVim.app/Contents/MacOS/Vim "$@"'
fi
9
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
9
10