Archive for 2012-03-18

いい加減vimの環境を整えるよ part1


[目標]

  1. 設定ファイルをGithubで管理する
  2. vundleの導入
  3. 這い寄る債務者ゆるよろ(旧支配者)様のありがたい設定をパクる



[環境]


Mac OS X 10.7.3
Windows7 64bit
CentOS 5.5 32bit
Debianのよくわからない環境



[参考]
そろそろしっかりvimを使う。dotfilesのgithub管理とvundleの導入。
iTerm2 + zsh + tmux + vim で快適な256色ターミナル環境を構築する
Hack #215: Vundle で plugin をモダンに管理する
Hack #238: neobundle.vim で plugin をモダンに管理する




[手順]

1. 設定ファイルをGithubで管理する

mkdir ~/dotfiles

#Githubをブラウザで開く
dotfilesレポジトリを作成

#レポジトリ作っちゃう
cd ~/dotfiles
git init
touch README
git add README
git commit -m 'first_commit'


2. Vundleの導入



git submodule add http://github.com/gmarik/vundle.git ~/dotfiles/vimfiles/vundle.git
git commit -m 'add_vundle'
git push origin master

#pluginディレクトリのシンボリックリンクを作成する。
ln -s ~/dotfiles/vimfiles ~/.vim


#設定ファイル記述
=>.vimrc(~/dotfiles/_vimrc)に下記を追加

set nocompatible
filetype off

set rtp+=~/dotfiles/vimfiles/vundle.git
call vundle#rc()
Bundle 'Shougo/neocomplcache'
Bundle 'Shougo/unite.vim'
Bundle 'thinca/vim-ref'
Bundle 'thinca/vim-quickrun'
filetype plugin indent on     " required!

#vimを起動し、下記コマンドを実行
:BundleInstall

*memo*
・更新の場合は BundeInstall!
・下記のログが出れば成功
Installed bundles:
unite.vim
vim-ref
vim-quickrun
Helptags: done. 4 bundles processed    

#これらのplugingithubで管理しないため.gitignoreを作成する。
vi ~/dotfiles/.gitignore


##ファイルには1行だけ書いて保存する。
/vimfiles/bundle/


##複数PCで同期をとるため.gitignoreも管理する。
git add .gitignore
git commit -m 'add_gitignore'
git push origin master




3. 旧支配者色に染まる

#vimprocのインストール
cd ~/.vim/bundle/
git clone https://github.com/Shougo/vimproc.git
cd vimproc/
make -f make_mac.mak








Posted in , , | Leave a comment

ypcatコマンドのメモ


ypcat NISで提供されている設定ファイルを表示する

ypcat -x

ypcat hosts

ypcat passwd

Posted in , | Leave a comment

Search

Swedish Greys - a WordPress theme from Nordic Themepark. Converted by LiteThemes.com.