" vim:set ts=2 sts=2 sw=2 tw=0: "--------------------------------------------------------------------------- " Manual Install "--------------------------------------------------------------------------- " " - git " http://code.google.com/p/msysgit/downloads/list " " - ctags " http://hp.vector.co.jp/authors/VA025040/ " " - jvgrep " https://github.com/mattn/jvgrep/downloads " " - w3m " http://www.daionet.gr.jp/~knok/software/misc/ " " - diff " http://gnuwin32.sourceforge.net/packages/diffutils.htm " "--------------------------------------------------------------------------- " Vundle "--------------------------------------------------------------------------- " mkdir -p ~/.vim/bundle " git clone git://github.com/gmarik/vundle.git ~/.vim/bundle/vundle.git " cd ~/.vim/bundle " git clone git://github.com/yuratomo/dotfiles.git " " (win 7) " mklink ~\.ctags ~\.vim\bundle\dotfiles\.ctags " mklink ~\_vimrc ~\.vim\bundle\dotfiles\_vimrc " mklink ~\_gvimrc ~\.vim\bundle\dotfiles\_gvimrc " mklink c:\vim\vimrc_local.vim .vim\bundle\dotfiles\vimrc_local.vim " mklink c:\vim\gvimrc_local.vim .vim\bundle\dotfiles\gvimrc_local.vim " " (win xp) " cd ~ " fsutil hardlink create .ctags .vim/bundle/dotfiles/.ctags " fsutil hardlink create _vimrc .vim/bundle/dotfiles/_vimrc " fsutil hardlink create _gvimrc .vim/bundle/dotfiles/_gvimrc " fsutil hardlink create c:/vim/vimrc_local.vim .vim/bundle/dotfiles/vimrc_local.vim " fsutil hardlink create c:/vim/gvimrc_local.vim .vim/bundle/dotfiles/gvimrc_local.vim " fsutil hardlink create _nya .vim/bundle/dotfiles/_nya " set nocompatible try "filetype off set rtp+=~/.vim/vundle.git/ call vundle#rc() " Bundle 'git://github.com/vim-scripts/colorsel.vim.git' Bundle 'git://github.com/scrooloose/syntastic.git' Bundle 'git://github.com/majutsushi/tagbar.git' Bundle 'git://github.com/teramako/jscomplete-vim.git' Bundle 'git://github.com/mattn/calendar-vim.git' Bundle 'git://github.com/mattn/zencoding-vim.git' Bundle 'git://github.com/mattn/excitetranslate-vim.git' Bundle 'git://github.com/mattn/webapi-vim.git' Bundle 'git://github.com/mattn/httpstatus-vim.git' Bundle 'git://github.com/Shougo/vimproc.git' Bundle 'git://github.com/Shougo/vinarise.git' Bundle 'git://github.com/Shougo/neosnippet.git' Bundle 'git://github.com/basyura/TweetVim.git' Bundle 'git://github.com/basyura/twibill.vim.git' Bundle 'git://github.com/tyru/open-browser.vim.git' Bundle 'git://github.com/tyru/eskk.vim.git' Bundle 'git://github.com/vim-scripts/vimwiki.git' Bundle 'git://github.com:yuratomo/dotfiles.git' Bundle 'git://github.com:yuratomo/w3m.vim.git' Bundle 'git://github.com:yuratomo/weather.vim.git' Bundle 'git://github.com:yuratomo/vs.vim.git' Bundle 'git://github.com:yuratomo/dbg.vim.git' Bundle 'git://github.com:yuratomo/bg.vim.git' Bundle 'git://github.com:yuratomo/neon.vim.git' Bundle 'git://github.com:yuratomo/gmail.vim.git' Bundle 'git://github.com:yuratomo/gnews.vim.git' Bundle 'git://github.com:yuratomo/ltools.vim.git' Bundle 'git://github.com:yuratomo/winfiler.git' Bundle 'git://github.com:yuratomo/ildasm.vim.git' Bundle 'git://github.com:yuratomo/dotnet-complete.git' Bundle 'git://github.com:yuratomo/cpp-api-complete.git' Bundle 'git://github.com:yuratomo/java-api-complete.git' Bundle 'git://github.com:yuratomo/java-api-javax.git' Bundle 'git://github.com:yuratomo/java-api-org.git' Bundle 'git://github.com:yuratomo/java-api-sun.git' Bundle 'git://github.com:yuratomo/java-api-servlet2.3.git' Bundle 'git://github.com:yuratomo/java-api-android.git' Bundle 'git://github.com:yuratomo/flex-api-complete.git' Bundle 'git://github.com:yuratomo/phpapi-complete.git' Bundle 'git://github.com/nanotech/jellybeans.vim.git' Bundle 'git://github.com/tomasr/molokai.git' Bundle 'git://github.com/jonathanfilip/vim-lucius.git' Bundle 'git://github.com/vim-scripts/twilight.git' filetype plugin indent on catch /.*/ endtry if has('win32') && executable('jvgrep') set grepprg=jvgrep endif "--------------------------------------------------------------------------- " setting "--------------------------------------------------------------------------- set visualbell set number set list set nowrap set showcmd set noet ts=4 sw=4 set noscrollbind set listchars=tab:>\ ,extends:<,trail:_,eol:~ set smartindent set wildmenu set wildmode=list:longest set formatoptions+=mM set hidden set autoread set laststatus=2 set cmdheight=1 set nobackup set noswapfile set complete=.,w,b,u set tags+=tags; set concealcursor=n set completeopt=menuone set helplang=ja,en set shortmess& shortmess+=I set textwidth=0 "set cursorline set foldlevel=999 set foldcolumn=1 set foldmethod=indent "set foldmethod=expr "set foldexpr=DoxygenFoldExpr() "set foldtext=DoxygenFoldText() set statusline=%f%m%#S1#\ %<%{expand('%:p:h')}%=%#S2#\ %6{(&fenc!=''?&fenc:&enc)}\ %#S3#%6{&ff}\ %#S4#%6{&ft}%#S5#%4l-%-3c "--------------------------------------------------------------------------- " autocommand "--------------------------------------------------------------------------- au FileType vim set sw=2 ts=2 sts=2 et au FileType c,cpp set sw=4 ts=4 sts=4 noet au FileType java set sw=4 ts=4 sts=4 noet fmr={,} fdm=marker au FileType cs set sw=4 ts=4 sts=4 et fmr=#region,#endregion fdm=marker au FileType javascript set sw=2 ts=2 sts=2 et au FileType html set sw=2 ts=2 sts=2 et au FileType php setl omnifunc=phpapi#complete au FileType php inoremap phpapi#nextRef() au FileType php inoremap phpapi#prevRef() au BufNewFile,BufRead *.build setf ant au BufNewFile,BufRead *.targets setf xml au BufNewFile,BufRead *.config setf xml au BufNewFile,BufRead *.*proj setf xml au BufNewFile,BufRead *.xaml setf xml au BufNewFile,BufRead *.as setf java au BufNewFile,BufRead *.mxml setf xml au BufNewFile,BufRead *.xaml setl omnifunc=xaml#complete au BufNewFile,BufRead *.cs setl omnifunc=dotnet#complete au BufNewFile,BufRead *.cs inoremap dotnet#nextRef() au BufNewFile,BufRead *.cs inoremap dotnet#prevRef() au BufNewFile,BufRead *.java setl omnifunc=javaapi#complete au BufNewFile,BufRead *.java inoremap javaapi#nextRef() au BufNewFile,BufRead *.java inoremap javaapi#prevRef() au BufNewFile,BufRead *.as setl omnifunc=flexapi#complete au BufNewFile,BufRead *.as inoremap flexapi#nextRef() au BufNewFile,BufRead *.as inoremap flexapi#prevRef() au BufNewFile,BufRead *.mxml setl omnifunc=mxml#complete au BufNewFile,BufRead *.cpp setl omnifunc=cppapi#complete au BufNewFile,BufRead *.c setl omnifunc=cppapi#complete au BufNewFile,BufRead *.h setl omnifunc=cppapi#complete au CompleteDone *.php call phpapi#showRef() au CompleteDone *.cs call dotnet#showRef() au CompleteDone *.java call javaapi#showRef() au CompleteDone *.as call flexapi#showRef() if has("balloon_eval") && has("balloon_multiline") au BufNewFile,BufRead *.cs setl bexpr=dotnet#balloon() au BufNewFile,BufRead *.java setl bexpr=javaapi#balloon() au BufNewFile,BufRead *.cpp setl bexpr=cppapi#balloon() au BufNewFile,BufRead *.c setl bexpr=cppapi#balloon() au BufNewFile,BufRead *.h setl bexpr=cppapi#balloon() au BufNewFile,BufRead *.cs setl ballooneval au BufNewFile,BufRead *.java setl ballooneval au BufNewFile,BufRead *.cpp setl ballooneval au BufNewFile,BufRead *.c setl ballooneval au BufNewFile,BufRead *.h setl ballooneval endif "--------------------------------------------------------------------------- " keymaps "--------------------------------------------------------------------------- " like a emacs inoremap inoremap inoremap inoremap inoremap cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap estrpart(getcmdline(), 0, getcmdpos()-1) cnoremap " turn off IME when leave insert mode inoremap inoremap " quick nohlsearch noremap :nohlsearch " like a browser nnoremap M nnoremap M " like a visual studio inoremap pumvisible()?"\":"\\\" inoremap pumvisible()?"\":"\u\" inoremap pumvisible()?"\":"\" inoremap pumvisible()?"\":"\" inoremap if has('gui') " resize window nnoremap :execute 'set lines=' . (&lines + 1) nnoremap :execute 'set lines=' . (&lines - 1) nnoremap :execute 'set columns=' . (&columns + 5) nnoremap :execute 'set columns=' . (&columns - 5) " move window nnoremap MoveWindow(0,20) nnoremap MoveWindow(0,-20) nnoremap MoveWindow(-20,0) nnoremap MoveWindow(20,0) function! MoveWindow(w,h) silent redir => pos winpos redir end let parts = split(pos, "[: ,]") let w = parts[-4] let h = parts[-1] silent exec ':winpos ' . (w+a:w) . ' ' . (h+a:h) endfunction endif " like a windows clipboard ( and ) vnoremap "*y if has("virtualedit") nnoremap Paste :call Paste() func! Paste() let ove = &ve set ve=all normal `^"+gPi let &ve = ove endfunc inoremap