Last active
August 29, 2015 14:07
-
-
Save hilotech/ceb64bd83fb39606df8f to your computer and use it in GitHub Desktop.
vimのとりあえず設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ -f ~/.screenrc ] || touch ~/.screenrc | |
grep -Fxq '# screenrc::256color-term-setting' ~/.screenrc \ | |
|| cat >> ~/.screenrc <<_EOF_SCREENRC | |
# screenrc::256color-term-setting | |
attrcolor b ".I" | |
defbce on | |
termcapinfo xterm* 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | |
_EOF_SCREENRC | |
# neobundle | |
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh | |
UNAME=`uname` | |
cd ~/.vim/bundle/vimproc | |
MAKEFILE_NAME='Makefile' | |
[[ $UNAME == *CYGWIN* ]] && MAKEFILE_NAME='make_cygwin.mak' | |
make -f $MAKEFILE_NAME | |
( | |
[ ! -d ~/.vim/colors ] && mkdir -p ~/.vim/colors | |
mkdir -p /tmp/vim-color | |
cd /tmp/vim-color | |
git clone https://github.com/nanotech/jellybeans.vim.git | |
cp jellybeans.vim/colors/jellybeans.vim ~/.vim/colors/ | |
rm -rf /tmp/vim-color | |
) | |
[ -f ~/.vimrc ] && mv ~/.vimrc ~/.vimrc.old | |
cat > ~/.vimrc <<_EOF_VIMRC | |
" Note: Skip initialization for vim-tiny or vim-small. | |
if !1 | finish | endif | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
" Required: | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
set noeb vb t_vb= | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=4 | |
set wildmenu | |
set showcmd | |
set ruler | |
set laststatus=2 | |
set confirm | |
set title | |
set nobackup | |
set showmatch | |
set backspace=indent,eol,start | |
" for backspace key to be used | |
set backspace=2 | |
set autoindent | |
set cursorline | |
hi CursorLine term=none cterm=none ctermbg=17 guibg=236 | |
set number | |
set notimeout ttimeout ttimeoutlen=200 | |
augroup auto_comment_off | |
autocmd! | |
autocmd BufEnter * setlocal formatoptions-=r | |
autocmd BufEnter * setlocal formatoptions-=o | |
augroup END | |
" Enable 256 colors | |
set t_Co=256 | |
" Let fullWidthSpace visible http://qiita.com/jnchito/items/5141b3b01bced9f7f48f | |
function! ZenkakuSpace() | |
highlight ZenkakuSpace cterm=underline ctermfg=lightblue guibg=darkgray | |
endfunction | |
if has('syntax') | |
augroup ZenkakuSpace | |
autocmd! | |
autocmd ColorScheme * call ZenkakuSpace() | |
autocmd VimEnter,WinEnter,BufRead * let w:m1=matchadd('ZenkakuSpace', ' ') | |
augroup END | |
call ZenkakuSpace() | |
endif | |
" Required: | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
" Let NeoBundle manage NeoBundle | |
" Required: | |
NeoBundleFetch 'Shougo/neobundle.vim' | |
" My Bundles here: | |
" Refer to |:NeoBundle-examples|. | |
" Note: You don't set neobundle setting in .gvimrc! | |
NeoBundle 'Shougo/vimproc' | |
NeoBundle 'VimClojure' | |
NeoBundle 'Shougo/vimshell' | |
NeoBundle 'Shougo/unite.vim' | |
NeoBundle 'Shougo/neomru.vim' | |
NeoBundle 'Shougo/neocomplcache' | |
NeoBundle 'Shougo/neosnippet' | |
NeoBundle 'Shougo/neosnippet-snippets' | |
NeoBundle 'jpalardy/vim-slime' | |
NeoBundle 'scrooloose/syntastic' | |
NeoBundle 'scrooloose/nerdtree' | |
NeoBundle 'tomtom/tcomment_vim' " Toggle comment by Shift+V/CTRL+- | |
" Color Scheme | |
NeoBundle 'ujihisa/unite-colorscheme' | |
colorscheme jellybeans | |
syntax on | |
call neobundle#end() | |
" NERDTree, Use F3 for toggle NERDTree | |
nmap <silent> <F3> :NERDTreeToggle<CR> | |
" Required: | |
filetype plugin indent on | |
" If there are uninstalled bundles found on startup, | |
" this will conveniently prompt you to install them. | |
NeoBundleCheck | |
_EOF_VIMRC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment