Help us understand the problem. What is going on with this article?

NeoBundleを用いたVimプラグイン管理と色設定メモ

More than 3 years have passed since last update.

PureなVim人間だったが今更ながらプラグイン使いたくなりNeoBundle導入したのでそのメモ

NeoBundleのダウンロードと設置

# 配置先のディレクトリを作成
$ mkdir -p ~/.vim/bundle
# NeoBundleをリポジトリから取得
$ git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim

NeoBundle導入

NeoBundleを設定する(.vimrc)

$ vim ~/.vimrc
# 以下を追記
set nocompatible
filetype plugin indent off

if has('vim_starting')
  set runtimepath+=~/.vim/bundle/neobundle.vim
  call neobundle#rc(expand('~/.vim/bundle'))
endif 

NeoBundleFetch 'Shougo/neobundle.vim'

# 以下は必要に応じて追加
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/neosnippet.vim'

filetype plugin indent on

プラグインインストール

.vimrcに追記したあとで以下を実行

:NeoBundleInstall

プラグインアップデート

:NeoBundleUpdate

プラグイン削除

.vimrcの記述を削除したあとで以下を実行

:NeoBundleClean

ColorSchema導入

NeoBundleを導入すればカラースキーマも簡単にインストールできちゃいます。

カラースキーマの選別

以下でよさ気なものを選別してきます。

Vim Color Scheme Advent Calendar

Vim Colorscheme Gallery

カラースキーマのインストール設定(.vimrc)

$ vim ~/.vimrc
" solarized
NeoBundle 'altercation/vim-colors-solarized'
" mustang
NeoBundle 'croaker/mustang-vim'
" jellybeans
NeoBundle 'nanotech/jellybeans.vim'
" molokai
NeoBundle 'tomasr/molokai'

NeoBundle 'Shougo/unite.vim'
NeoBundle 'ujihisa/unite-colorscheme'
:NeoBundleInstall 

カラースキーマ表示確認

:Unite colorscheme -auto-preview

カーソルを動かせばすぐにプレビューが見れるようになります

デフォルトカラースキーマの設定

$ vim ~/.vimrc
colorscheme <カラースキーマ名>
if &term =~ "xterm-256color" || "screen-256color"
  set t_Co=256
  set t_Sf=[3%dm
  set t_Sb=[4%dm
elseif &term =~ "xterm-color"
  set t_Co=8
  set t_Sf=[3%dm
  set t_Sb=[4%dm
endif

syntax enable
hi PmenuSel cterm=reverse ctermfg=33 ctermbg=222 gui=reverse guifg=#3399ff guibg=#f0e68c
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away