とりあえず、Yosemiteのmacの下記を開き、各種設定項目を追加した。
$ sudo vim /usr/share/vim/vimrc
" Configuration file for vim set modelines=0 " CVE-2007-2438 " Normally we use vim-extensions. If you want true vi-compatibility " remove change the following statements set nocompatible " Use Vim defaults instead of 100% vi compatibility set backspace=2 " more powerful backspacing " Don't write backup file if vim is being called by "crontab -e" au BufWrite /private/tmp/crontab.* set nowritebackup nobackup " Don't write backup file if vim is being called by "chpass" au BufWrite /private/etc/pw.* set nowritebackup nobackup "colorscheme slate "colorscheme ron "colorscheme rdark colorscheme molokai "colorscheme hybrid syntax on set number set title set ambiwidth=double set tabstop=4 set expandtab set shiftwidth=4 set smartindent "set list "set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:% set nrformats-=octal set hidden set history=50 set virtualedit=block set whichwrap=b,s,[,],<,> set backspace=indent,eol,start set wildmenu
色のテーマは、/usr/share/vim/vim73/colors内に設定ファイルを入れればいいのかなと思ってるけど、正しくないのかも。今度調べる。
CentOSでのVimの設定
参考:http://www.server-world.info/query?os=CentOS_6&p=initial_conf&f=7
/etc/vimrcを設定すればできた。