Skip to content

Commit

Permalink
プラギン追加。補完まわりを変更
Browse files Browse the repository at this point in the history
  • Loading branch information
fujimogn committed Feb 29, 2012
1 parent bf29d52 commit fa9e945
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 63 deletions.
96 changes: 48 additions & 48 deletions vim/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,43 @@ if has('vim_starting')
call neobundle#rc(expand('~/.vim/bundle'))
endif

" github.com
NeoBundle 'Shougo/neobundle.vim'
NeoBundle 'Shougo/neocomplcache'
NeoBundle 'ujihisa/neco-ruby'
NeoBundle 'Shougo/vimproc'
NeoBundle 'Shougo/vimshell'
NeoBundle 'Shougo/unite.vim'
NeoBundle 'h1mesuke/unite-outline'
NeoBundle 'tsukkee/unite-help'
NeoBundle 'thinca/vim-quickrun'
NeoBundle 'thinca/vim-ref'
NeoBundle 'thinca/vim-quickrun'
NeoBundle 'tyru/open-browser.vim'
NeoBundle 'kana/vim-smartchr'
NeoBundle 'kana/vim-altr'
" NeoBundle 'kana/vim-fakeclip'
NeoBundle 'rhysd/my-endwise'
NeoBundle 'kana/vim-fakeclip'
NeoBundle 'kana/vim-textobj-user'
NeoBundle 'nelstrom/vim-textobj-rubyblock'
NeoBundle 'vim-ruby/vim-ruby'
NeoBundle 'tpope/vim-surround'
NeoBundle 'vim-jp/vimdoc-ja'
NeoBundle 'rhysd/my-endwise'
NeoBundle 'vim-scripts/matchit.zip'
NeoBundle 'vim-scripts/ruby-matchit'
NeoBundle 'bbommarito/vim-slim'
NeoBundle 'mattn/gist-vim'
NeoBundle 'vim-scripts/Markdown'
NeoBundle 'hail2u/vim-css3-syntax'
NeoBundle 'othree/html5.vim'
NeoBundle 'cakebaker/scss-syntax.vim'
NeoBundle 'skammer/vim-css-color'
NeoBundle 'kchmck/vim-coffee-script'
NeoBundle 'nathanaelkane/vim-indent-guides'
NeoBundle 'Lokaltog/vim-powerline'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'kchmck/vim-coffee-script'
NeoBundle 'banyan/recognize_charcode.vim'
NeoBundle 'scrooloose/nerdtree'


" vim.org
NeoBundle 'taglist.vim'
NeoBundle 'The-NERD-Commenter'
NeoBundle 'css_color.vim'

NeoBundle 'scrooloose/nerdcommenter'
NeoBundle 'mortice/taglist.vim'

" }}}
" Encording {{{
Expand Down Expand Up @@ -132,11 +134,11 @@ autocmd bufwritepre * :%s/\s\+$//ge

set backup
set backupdir=~/.tmp/vim/backup
set backupskip=/tmp/*,/private/tmp/*",~/.tmp/*
set backupskip=/tmp/*,/private/tmp/*"
set swapfile
set directory=~/.tmp/vim/swap
set undofile
set undodir=~/.tmp/vim/swap
set undodir=~/.tmp/vim/undo
set undolevels=1000
set viminfo='50,<1000,s100,:100
set viminfo+=n~/.tmp/vim/viminfo
Expand Down Expand Up @@ -504,10 +506,11 @@ vmap <Space>cb <Plug>NERDCommenterMinimal
" }}}
" Plugin/quickrun {{{

let g:quickrun_direction = 'rightbelow vertical'
" keymap {{{
let g:quickrun_no_default_key_mappings = 0
nnoremap <Space>r :<C-u>call <SID>quickrun_of_buffer()<Cr>

let g:quickrun_no_default_key_mappings = 1
nmap <Space>r <Plug>(quickrun)
function! s:quickrun_of_buffer()
if !exists('b:quickrun_of_buffer')
let b:quickrun_of_buffer = ''
Expand All @@ -521,10 +524,16 @@ autocmd FileType quickrun inoremap <silent> <buffer> <ESC><ESC> :q<CR>
" config {{{

let g:quickrun_config = {}
let g:quickrun_config._ = {'runner': 'vimproc', 'split': 'below'}
let g:quickrun_config._ = {'runner': 'vimproc', 'split': 'below10'}
" markdown
let g:quickrun_config['markdown'] = {
\ 'type': 'markdown/pandoc',
\ 'cmdopt': '-s',
\ 'outputter': 'browser'
\ }

" coffee
let g:quickrun_config.coffee = {'command': 'coffee', 'exec': '%c -cpb %s'}
let g:quickrun_config['coffee'] = {'command': 'coffee', 'exec': '%c -cpb %s'}

" ruby
let g:quickrun_config['ruby'] = {'command': 'ruby'}
Expand All @@ -534,24 +543,17 @@ let g:quickrun_config['rspec/bundle'] = {
\ 'type': 'rspec/bundle',
\ 'command': 'rspec',
\ 'exec': 'bundle exec %c %s'
\ }
\}
let g:quickrun_config['rspec/normal'] = {
\ 'type': 'rspec/normal',
\ 'command': 'rspec',
\ 'exec': '%c %s'
\ }
\}
function! RSpecQuickrun()
let b:quickrun_config = {'type' : 'rspec/bundle'}
endfunction
autocmd BufReadPost *_spec.rb call RSpecQuickrun()

" markdown
let g:quickrun_config['markdown'] = {
\ 'type': 'markdown/pandoc',
\ 'cmdopt': '-s',
\ 'outputter': 'browser'
\ }

" }}}

" }}}
Expand Down Expand Up @@ -598,7 +600,7 @@ let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
let g:neocomplcache_ctags_program = '/usr/local/bin/ctags'

" cache dir
let g:neocomplcache_temporary_dir = '~/.tmp/vim/neocon'
let g:neocomplcache_temporary_dir = $HOME.'/.tmp/vim/neocon/'

" }}}
" 辞書補完 {{{
Expand All @@ -613,28 +615,27 @@ let g:neocomplcache_dictionary_filetype_lists = {
\ 'objc' : $HOME . '/.vim/dict/objc.dict',
\ 'perl' : $HOME . '/.vim/dict/perl.dict',
\ 'php' : $HOME . '/.vim/dict/php.dict',
\ 'ruby' : $HOME . '/.vim/dict/ruby.dict',
\ 'scheme' : $HOME . '/.vim/dict/scheme.dict',
\ 'vim' : $HOME . '/.vim/dict/vim.dict',
\ 'vimshell' : $HOME . '/.tmp/vim/vimshell/int_hist',
\ }
"}}}
" インクルード補完 {{{

" インクルードパスの指定
let g:neocomplcache_include_paths = {
\ 'ruby' : '.,'.$HOME.'/.rbenv/versions/1.9.2-p290/lib/ruby/*'
\ }
" " インクルードパスの指定
" let g:neocomplcache_include_paths = {
" \ 'ruby' : '.,'.$HOME.'/.rbenv/versions/1.9.2-p290/lib/ruby/*'
" \ }

" インクルード文のパターンを指定
let g:neocomplcache_include_patterns = {
\ 'ruby' : '^\s*require',
\ }
" " インクルード文のパターンを指定
" let g:neocomplcache_include_patterns = {
" \ 'ruby' : '^\s*require',
" \ }

" インクルード先のファイル名の解析パターン
let g:neocomplcache_include_exprs = {
\ 'ruby' : substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
\ }
" " インクルード先のファイル名の解析パターン
" let g:neocomplcache_include_exprs = {
" \ 'ruby' : substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
" \ }

" " ファイルを探す際に、この値を末尾に追加したファイルも探す。
" let g:neocomplcache_include_suffixes = {
Expand All @@ -645,11 +646,10 @@ let g:neocomplcache_include_exprs = {
" タグ補完 {{{

" タグファイルの場所
augroup SetTagsFile
autocmd!
autocmd FileType php set tags=$HOME/tags/php.tags
autocmd FileType php set tags=$HOME/tags/ruby.tags
augroup END
" augroup SetTagsFile
" autocmd!
" autocmd FileType php set tags=$HOME/tags/php.tags
" augroup END

" " タグ補完の呼び出しパターン
" if !exists('g:neocomplcache_member_prefix_patterns')
Expand Down Expand Up @@ -743,7 +743,7 @@ nnoremap es :<C-u>vertical NeoComplCacheEditSnippets<CR>
" }}}
" Plugin/my-endwise {{{

" autocmd FileType ruby imap <buffer> <expr><CR> pumvisible() ? neocomplcache#smart_close_popup() . "\<CR>\<Plug>DiscretionaryEnd" : "\<CR>\<Plug>DiscretionaryEnd"
autocmd FileType ruby imap <buffer> <expr><CR> pumvisible() ? neocomplcache#smart_close_popup() . "\<CR>\<Plug>DiscretionaryEnd" : "\<CR>\<Plug>DiscretionaryEnd"
" }}}
" Plugin/vimfiler {{{
Expand Down
8 changes: 5 additions & 3 deletions vim/vim.darwin.zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/zsh
#
# $File: ${DOTDIR}/vim/vim.darwin.zsh
# $Date: 2012-02-23T21:32:15+0900$
# $Date: 2012-02-27T09:18:36+0900$
# vim:filetype=zsh:tabstop=2:shiftwidth=2:fdm=marker:

# for MacVim Kaoriya
Expand All @@ -13,13 +13,15 @@ if which vim >/dev/null 2>&1 ; then
MACVIM="/Applications/MacVim.app/Contents/MacOS/Vim"

if [ -e "${MACVIM}" ]; then
alias vim=${MACVIM}
alias {v,vi,vim}=${MACVIM}
export EDITOR=${MACVIM}
compdef _vim vim
compdef _vim vi
compdef _vim v
fi

if which mvim >/dev/null 2>&1 ; then
alias gvim=mvim
alias {gv,gvim}=mvim
compdef _vim gvim
fi
fi
13 changes: 1 addition & 12 deletions vim/vim.zsh
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
#!/bin/zsh
#
# $file: ${DOTDIR}/vim/vim.zsh
# $date: 2012-02-23T21:29:44+0900$
# $date: 2012-02-27T09:19:12+0900$
# vim:filetype=zsh:tabstop=2:shiftwidth=2:fdm=marker:

if which vim >/dev/null 2>&1 ; then

# set export
[ -z ${EDITOR} ] && export EDITOR=vim

# alias
alias v=vim
alias gv=gvim

# command completion
compdef _vim v
compdef _vim gv

# Edit rcfile function
function vim-edit-rc {
${EDITOR} ${DOTDIR}/vim/.vimrc
Expand Down

0 comments on commit fa9e945

Please sign in to comment.