"--------------------------------------------------------------------------- " __ _ _ _ " ____/ /___ _____ (_)_____( )_____ _ __ (_)____ ___ _____ _____ " / __ // _ \ / ___// // ___/|// ___/ | | / // // __ `__ \ / ___// ___/ " / /_/ // __// / / /(__ ) (__ ) | |/ // // / / / / // / / /__ " \__,_/ \___//_/ /_//____/ /____/ |___//_//_/ /_/ /_//_/ \___/ " "--------------------------------------------------------------------------- "--------------------------------------------------------------------------- " basic settings {{{1 if has('unix') let $DOTVIM=expand('~/.vim') else let $DOTVIM=expand('~/vimfiles') endif let $VIMBUNDLE=$DOTVIM.'/bundle' let $NEOBUNDLEPATH=$VIMBUNDLE.'/neobundle.vim' function! s:bundled(bundle) if !isdirectory($VIMBUNDLE) return 0 endif if stridx(&runtimepath, $NEOBUNDLEPATH) == -1 return 0 endif if a:bundle ==# 'neobundle.vim' return 1 else return neobundle#is_installed(a:bundle) endif endfunction "--------------------------------------------------------------------------- " NeoBundle {{{2 set nocompatible filetype off if has('vim_starting') && isdirectory($NEOBUNDLEPATH) set runtimepath+=$NEOBUNDLEPATH endif if s:bundled('neobundle.vim') call neobundle#rc($VIMBUNDLE) let g:neobundle_default_git_protocol = 'https' " original repos on github NeoBundle 'Shougo/neobundle.vim' "NeoBundle 'gmarik/vundle' "NeoBundleLazy 'AndrewRadev/switch.vim', { 'autoload' : { "\ 'commands' : 'Switch', "\ }} "NeoBundleLazy 'Lokaltog/vim-easymotion' NeoBundle 'Lokaltog/vim-powerline' "NeoBundleLazy 'Rip-Rip/clang_complete', { 'autoload' : { "\ 'filetypes' : ['c', 'cpp'], "\ }} NeoBundle 'Shougo/neocomplcache', '', 'default' "call neobundle#config('neocomplcache', { "\ 'lazy' : 1, "\ 'autoload' : { "\ 'insert' : 1, "\ }}) NeoBundle 'Shougo/neosnippet', '', 'default' call neobundle#config('neosnippet', { \ 'lazy' : 1, \ 'autoload' : { \ 'insert' : 1, \ 'filetypes' : 'snippet', \ 'commands' : ['NeoSnippetEdit'], \ 'unite_sources' : ['snippet', 'neosnippet/user', 'neosnippet/runtime'], \ }}) NeoBundle 'Shougo/unite.vim', '', 'default' call neobundle#config('unite.vim',{ \ 'lazy' : 1, \ 'autoload' : { \ 'commands' : [{ 'name' : 'Unite', \ 'complete' : 'customlist,unite#complete_source'}, \ 'UniteWithCursorWord', 'UniteWithInput'] \ }}) NeoBundleLazy 'Shougo/unite-help', { 'autoload' : { \ 'unite_sources' : 'help', \ }} NeoBundle 'Shougo/unite-outline', '', 'default' call neobundle#config('unite-outline', { \ 'lazy' : 1, \ 'autoload' : { \ 'unite_sources' : 'outline', \ }}) NeoBundle 'Shougo/vimfiler', '', 'default' call neobundle#config('vimfiler', { \ 'lazy' : 1, \ 'depends' : 'Shougo/unite.vim', \ 'autoload' : { \ 'commands' : [ \ { 'name' : 'VimFiler', \ 'complete' : 'customlist,vimfiler#complete' }, \ { 'name' : 'VimFilerTab', \ 'complete' : 'customlist,vimfiler#complete' }, \ { 'name' : 'VimFilerExplorer', \ 'complete' : 'customlist,vimfiler#complete' }, \ { 'name' : 'Edit', \ 'complete' : 'customlist,vimfiler#complete' }, \ { 'name' : 'Write', \ 'complete' : 'customlist,vimfiler#complete' }, \ 'Read', 'Source'], \ 'mappings' : ['(vimfiler_switch)'], \ 'explorer' : 1, \ }}) NeoBundle 'Shougo/vimproc', '', 'default' call neobundle#config('vimproc', { \ 'build' : { \ 'windows' : 'make -f make_mingw32.mak', \ 'cygwin' : 'make -f make_cygwin.mak', \ 'mac' : 'make -f make_mac.mak', \ 'unix' : 'make -f make_unix.mak', \ }, \ }) NeoBundle 'Shougo/vimshell', '', 'default' call neobundle#config('vimshell', { \ 'lazy' : 1, \ 'autoload' : { \ 'commands' : [{ 'name' : 'VimShell', \ 'complete' : 'customlist,vimshell#complete'}, \ 'VimShellExecute', 'VimShellInteractive', \ 'VimShellTerminal', 'VimShellPop'], \ 'mappings' : ['(vimshell_switch)'] \ }}) NeoBundle 'airblade/vim-rooter' NeoBundle 'airblade/vim-gitgutter' "NeoBundle 'akiomik/git-gutter-vim' "NeoBundle 'benmills/vimux' NeoBundle 'bitc/vim-bad-whitespace' "NeoBundleLazy 'bkad/CamelCaseMotion', { 'autoload' : { "\ 'mappings' : ['CamelCaseMotion_w', "\ 'CamelCaseMotion_b'], "\ }} "NeoBundle 'bootleq/ShowMarks' NeoBundleLazy 'chrisbra/SudoEdit.vim', { \ 'autoload' : { \ 'commands' : [ \ 'SudoRead', \ 'SudoWrite', \ ]}, \ } NeoBundleLazy 'c9s/perlomni.vim', { 'autoload' : { \ 'filetypes' : ['perl'] \ }} "NeoBundleLazy 'daisuzu/rainbowcyclone.vim' "NeoBundleLazy 'davidhalter/jedi-vim', { 'autoload' : { "\ 'filetypes' : ['python', 'python3'], "\ }} NeoBundleLazy 'derekwyatt/vim-scala', { 'autoload' : { \ 'filetypes' : ['scala'] \ }} "NeoBundleLazy 'deton/jasegment.vim' "NeoBundle 'emonkak/vim-operator-comment', "\ { 'depends' : 'kana/vim-operator-user' } "NeoBundle 'emonkak/vim-operator-sort', "\ { 'depends' : 'kana/vim-operator-user' } "NeoBundle 'fholgado/minibufexpl.vim' "NeoBundle 'fkfk/rbpit.vim' "NeoBundle 'fuenor/qfixgrep' "NeoBundle 'fuenor/qfixhowm' "NeoBundle 'godlygeek/tabular' "NeoBundle 'goldfeld/vim-seek' NeoBundleLazy 'h1mesuke/vim-alignta', { \ 'autoload' : { \ 'commands' : [ \ 'Alignta', \ ]}, \ } "NeoBundle 'h1mesuke/vim-benchmark' "NeoBundle 'h1mesuke/textobj-wiw' "\ { 'depends' : 'kana/vim-textobj-user' } "NeoBundle 'hekyou/vim-rectinsert' "NeoBundle 'houtsnip/vim-emacscommandline' NeoBundleLazy 'itchyny/thumbnail.vim', { \ 'autoload' : { \ 'commands' : [ \ 'Thumbnail', \ ]}, \ } "NeoBundle 'jceb/vim-orgmode' "NeoBundleLazy 'jceb/vim-hier' "NeoBundleLazy 'jelera/vim-javascript-syntax', { 'autoload' : { "\ 'filetypes' : 'javascript', "\ }} "NeoBundleLazy 'jerrymarino/xcodebuild.vim' "NeoBundleLazy 'jiangmiao/simple-javascript-indenter', { 'autoload' : { "\ 'filetypes' : 'javascript', "\ }} "NeoBundle 'jpalardy/vim-slime' "NeoBundle 'kana/vim-advice' NeoBundleLazy 'kana/vim-altr', { \ 'autoload' : { \ 'functions' : [ \ 'altr#forward', \ 'altr#back', \ ]}, \ } NeoBundle 'kana/vim-arpeggio' NeoBundleLazy 'kana/vim-fakeclip' "NeoBundle 'kana/vim-gf-user' "NeoBundle 'kana/vim-grex' "NeoBundle 'kana/vim-metarw' "NeoBundle 'kana/vim-narrow' NeoBundle 'kana/vim-niceblock' NeoBundle 'kana/vim-operator-user' NeoBundle 'kana/vim-operator-replace', \ { 'depends' : 'kana/vim-operator-user' } NeoBundleLazy 'kana/vim-scratch', { \ 'autoload' : { \ 'commands' : [ \ 'ScratchOpen', \ 'ScratchClose', \ ]}, \ } "NeoBundleLazy 'kana/vim-smartchr', { 'autoload' : { "\ 'insert' : 1, "\ }} NeoBundle 'kana/vim-smartinput' NeoBundle 'kana/vim-smarttill' NeoBundle 'kana/vim-smartword' NeoBundle 'kana/vim-submode' "NeoBundleLazy 'kana/vim-tabpagecd' NeoBundle 'kana/vim-textobj-user' NeoBundle 'kana/vim-textobj-entire', \ { 'depends' : 'kana/vim-textobj-user' } NeoBundle 'kana/vim-textobj-function', \ { 'depends' : 'kana/vim-textobj-user' } NeoBundle 'kana/vim-textobj-indent', \ { 'depends' : 'kana/vim-textobj-user' } "NeoBundle 'kana/vim-textobj-jabraces', "\ { 'depends' : 'kana/vim-textobj-user' } "NeoBundle 'kana/vim-textobj-lastpat', "\ { 'depends' : 'kana/vim-textobj-user' } NeoBundle 'kana/vim-textobj-line', \ { 'depends' : 'kana/vim-textobj-user' } "NeoBundle 'kana/vim-textobj-syntax', "\ { 'depends' : 'kana/vim-textobj-user' } NeoBundle 'kana/vim-vspec' NeoBundleLazy 'kien/ctrlp.vim', { \ 'autoload' : { \ 'commands' : [ \ 'CtrlPBuffer', \ 'CtrlPMRUFiles', \ 'CtrlPCurFile', \ ]}, \ } "NeoBundle 'vexxor/kwbd.vim' "NeoBundle 'majutsushi/tagbar' "NeoBundle 'mattn/asyncgrep-vim' NeoBundleLazy 'mattn/benchvimrc-vim', { \ 'autoload' : { \ 'commands' : [ \ 'BenchVimrc' \ ]}, \ } "NeoBundle 'mattn/excitetranslate-vim' NeoBundleLazy 'mattn/gist-vim', { \ 'autoload' : { \ 'commands' : [ \ 'Gist' \ ]}, \ } NeoBundleLazy 'mattn/httpstatus-vim', { \ 'autoload' : { \ 'commands' : [ \ 'HttpStatus', \ 'CtrlPHttpStatus', \ ], \ 'unite_sources' : 'httpstatus', \ }} NeoBundle 'mattn/learn-vimscript' "NeoBundle 'mattn/sonictemplate-vim' "NeoBundle 'mattn/vdbi-vim' "NeoBundleLazy 'mattn/vim-metarw-simplenote' NeoBundle 'mattn/vim-textobj-url', \ { 'depends' : 'kana/vim-textobj-user' } NeoBundle 'mattn/webapi-vim' NeoBundle 'mattn/zencoding-vim' "NeoBundle 'mileszs/ack.vim' NeoBundle 'motemen/git-vim' "NeoBundle 'motemen/hatena-vim' NeoBundleLazy 'msanders/cocoa.vim' "NeoBundle 'msanders/snipmate.vim' NeoBundle 'nathanaelkane/vim-indent-guides' NeoBundle 'osyo-manga/vim-reanimate' "NeoBundle 'osyo-manga/vim-textobj-multiblock', "\ { 'depends' : 'kana/vim-textobj-user' } NeoBundleLazy 'osyo-manga/unite-quickfix', { 'autoload' : { \ 'unite_sources' : 'quickfix', \ }} NeoBundleLazy 'osyo-manga/unite-filetype', { 'autoload' : { \ 'unite_sources' : 'filetype', \ }} "NeoBundle 'othree/eregex.vim' NeoBundleLazy 'pasela/unite-webcolorname', { 'autoload' : { \ 'unite_sources' : 'webcolorname', \ }} NeoBundleLazy 'plasticboy/vim-markdown', { 'autoload' : { \ 'filetypes' : ['markdown'] \ }} "NeoBundle 'reinh/vim-makegreen' "NeoBundle 'rhysd/accelerated-jk' "NeoBundle 'rhysd/clever-f.vim', 'm@ster' NeoBundleLazy 'rking/ag.vim' NeoBundle 'rphillips/vim-zoomwin' NeoBundle 'scrooloose/nerdcommenter' NeoBundleLazy 'scrooloose/nerdtree', { \ 'autoload' : { \ 'commands' : [ \ 'NERDTreeToggle', \ ]}, \ } NeoBundle 'scrooloose/syntastic' NeoBundle 'sgur/vim-textobj-parameter', \ { 'depends' : 'kana/vim-textobj-user' } NeoBundleLazy 'sgur/unite-everything', { 'autoload' : { \ 'unite_sources' : 'everything', \ }} NeoBundleLazy 'sgur/unite-qf', { 'autoload' : { \ 'unite_sources' : 'qf', \ }} "NeoBundle 'sjl/clam.vim' NeoBundleLazy 'sjl/gundo.vim', { \ 'autoload' : { \ 'commands' : [ \ 'GundoToggle', \ ]}, \ } "NeoBundle 'sjl/splice.vim' "NeoBundle 'sjl/vitality.vim' NeoBundle 'skammer/vim-css-color' "NeoBundle 'spolu/dwm.vim' NeoBundle 't9md/vim-quickhl' NeoBundle 't9md/vim-surround_custom_mapping' "NeoBundle 't9md/vim-textmanip' "NeoBundle 't9md/vim-underlinetag' "NeoBundleLazy 't9md/vim-unite-ack', "\ { 'depends' : 'Shougo/unite.vim' } "NeoBundle 'taku-o/vim-toggle' "NeoBundle 'taku-o/vis-vim' "NeoBundle 'tejr/nextag' NeoBundleLazy 'teramako/jscomplete-vim', { 'autoload' : { \ 'filetypes' : ['javascript'] \ }} NeoBundle 'thinca/vim-ambicmd' NeoBundleLazy 'thinca/vim-fontzoom', { \ 'gui' : 1, \ 'autoload' : { \ 'mappings' : [ \ ['n', '(fontzoom-larger)'], \ ['n', '(fontzoom-smaller)']] \ }} NeoBundleLazy 'thinca/vim-github', { \ 'autoload' : { \ 'commands' : [ \ 'Github', \ ]}, \ } NeoBundle 'thinca/vim-openbuf' NeoBundle 'thinca/vim-poslist' NeoBundleLazy 'thinca/vim-prettyprint', { \ 'autoload' : { \ 'commands' : [ \ 'PP', \ ]}, \ } NeoBundleLazy 'thinca/vim-qfreplace', { 'autoload' : { \ 'filetypes' : ['unite', 'quickfix'], \ }} NeoBundleLazy 'thinca/vim-quickrun', { \ 'autoload' : { \ 'mappings' : [ \ ['nxo', '(quickrun)'] \ ], \ 'commands' : [ \ 'QuickRun', \ ]}, \ } NeoBundle 'thinca/vim-ref', '', 'default' call neobundle#config('vim-ref',{ \ 'lazy' : 1, \ 'autoload' : { \ 'commands' : [{ 'name' : 'Ref', \ 'complete' : 'customlist,ref#complete'}], \ 'unite_sources' : ['ref'], \ }}) NeoBundleLazy 'thinca/vim-scouter', { \ 'autoload' : { \ 'commands' : [ \ 'Scouter', \ ]}, \ } NeoBundle 'thinca/vim-singleton' "NeoBundle 'thinca/vim-template' "NeoBundle 'thinca/vim-textobj-comment', "\ { 'depends' : 'kana/vim-textobj-user' } NeoBundle 'thinca/vim-textobj-between', \ { 'depends' : 'kana/vim-textobj-user' } NeoBundleLazy 'thinca/vim-unite-history', { 'autoload' : { \ 'unite_sources' : ['history/command', 'history/search'], \ }} NeoBundle 'thinca/vim-visualstar' "NeoBundle 'tpope/vim-abolish' "NeoBundle 'tpope/vim-eunuch' NeoBundleLazy 'tpope/vim-endwise', { 'autoload' : { \ 'insert' : 1, \ }} "NeoBundle 'tpope/vim-fugitive' "NeoBundle 'tpope/vim-markdown' "NeoBundle 'tpope/vim-rails' NeoBundle 'tpope/vim-repeat' NeoBundle 'tpope/vim-surround' "NeoBundle 'tpope/vim-speeddating' "NeoBundle 'tpope/vim-unimpaired' NeoBundleLazy 'tsukkee/lingr-vim', { \ 'autoload' : { \ 'commands' : [ \ 'LingrLaunch', \ ]}, \ } NeoBundleLazy 'tsukkee/unite-tag', { 'autoload' : { \ 'unite_sources' : 'tag', \ }} NeoBundleLazy 'tyru/capture.vim', { \ 'autoload' : { \ 'commands' : [ \ 'Capture', \ ]}, \ } "NeoBundle 'tyru/caw.vim' "NeoBundle 'tyru/current-func-info.vim' "NeoBundle 'tyru/emap.vim' "NeoBundle 'tyru/eskk.vim' NeoBundleLazy 'tyru/nextfile.vim', { \ 'autoload' : { \ 'mappings' : [ \ ['n', '(nextfile-next)'], \ ['n', '(nextfile-previous)'], \ ]}, \ } "NeoBundle 'tyru/operator-camelize.vim' "\ { 'depends' : 'kana/vim-operator-user' } NeoBundle 'tyru/open-browser.vim', { \ 'autoload' : { \ 'mappings' : '(openbrowser-smart-search)', \ 'commands' : [ \ 'OpenBrowserSmartSearch', \ 'OpenBrowser', \ ]}, \ } NeoBundleLazy 'tyru/operator-html-escape.vim', \ { 'depends' : 'kana/vim-operator-user' } "NeoBundleLazy 'tyru/operator-reverse.vim', "\ { 'depends' : 'kana/vim-operator-user' } "NeoBundleLazy 'tyru/operator-star.vim', "\ { 'depends' : 'kana/vim-operator-user' } NeoBundleLazy 'tyru/restart.vim', { \ 'gui' : 1, \ 'autoload' : { \ 'commands' : [ \ 'Restart', \ ]}, \ } "NeoBundle 'tyru/vim-altercmd' NeoBundleLazy 'tyru/winmove.vim', { 'autoload' : { \ 'gui' : 1, \ 'mappings' : [ \ ['n', '(winmove-up)'], \ ['n', '(winmove-down)'], \ ['n', '(winmove-left)'], \ ['n', '(winmove-right)']], \ }} NeoBundle 'ujihisa/neco-look', \ { 'depends' : 'Shougo/neocomplcache' } NeoBundleLazy 'ujihisa/unite-colorscheme', { 'autoload' : { \ 'unite_sources' : 'colorscheme', \ }} NeoBundleLazy 'ujihisa/unite-font', { 'autoload' : { \ 'unite_sources' : 'font', \ }} NeoBundleLazy 'ujihisa/unite-locate', { 'autoload' : { \ 'unite_sources' : 'locate', \ }} "NeoBundleLazy 'vim-jp/autofmt', { 'autoload' : { "\ 'mappings' : [['x', 'gq']], "\ }} NeoBundle 'vim-jp/vital.vim' NeoBundleLazy 'vim-ruby/vim-ruby', { 'autoload' : { \ 'mappings' : '(ref-keyword)', \ 'filetypes' : 'ruby', \ }} NeoBundleLazy 'vimtaku/vim-textobj-sigil', { \ 'depends' : 'kana/vim-textobj-user', \ 'autoload' : { \ 'filetypes' : 'perl', \ }} "NeoBundle 'vimtaku/vim-textobj-keyvalue', "\ { 'depends' : 'kana/vim-textobj-user' } "NeoBundle 'xolox/vim-easytags' "NeoBundle 'xolox/vim-notes' "NeoBundle 'xolox/vim-session' NeoBundleLazy 'yko/mojo.vim', { 'autoload' : { \ 'filetypes' : 'perl', \ }} "NeoBundle 'ynkdir/vim-remote' "NeoBundle 'yuratomo/w3m.vim' NeoBundle 'deris/columnjump' NeoBundle 'deris/parajump' NeoBundle 'deris/vim-textobj-enclosedsyntax', \ { 'depends' : 'kana/vim-textobj-user' } "NeoBundle 'deris/vim-loadafterft' NeoBundle 'deris/vim-textobj-headwordofline', \ { 'depends' : 'kana/vim-textobj-user' } " vim-scripts repos "NeoBundle 'Align' "NeoBundle 'CD.vim' "NeoBundle 'Conque-Shell' "NeoBundle 'DirDiff.vim' "NeoBundle 'DrawIt' "NeoBundle 'FuzzyFinder' NeoBundleLazy 'HybridText', { 'autoload' : { \ 'filetypes' : 'hybrid', \ }} "NeoBundle 'JSON.vim' NeoBundle 'L9' "NeoBundle 'Mark' "NeoBundle 'QuickBuf' "NeoBundle 'QFixHowm' "NeoBundle 'Source-Explorer-srcexpl.vim' "NeoBundle 'Toggle' NeoBundleLazy 'UnconditionalPaste' "NeoBundle 'ViewOutput' "NeoBundle 'YankRing.vim' "あまり使わないのとkeymap設定で悪さをするので削除 "NeoBundle 'a.vim' "NeoBundle 'bufexplorer.zip' "NeoBundle 'closetag.vim' "NeoBundleLazy 'copypath.vim' NeoBundleLazy 'dbext.vim' "NeoBundle 'errormarker.vim' "NeoBundle 'grep.vim' NeoBundle 'matchit.zip' "NeoBundle 'monday' "NeoBundle 'perl-support.vim' NeoBundleLazy 'project.tar.gz' "NeoBundle 'qtmplsel.vim' "NeoBundleLazy 'renamer.vim' "NeoBundle 'statusline.vim' NeoBundleLazy 'taglist.vim', { \ 'autoload' : { \ 'commands' : [ \ 'TlistToggle', \ ]}, \ } "NeoBundle 'toggle_words.vim' "NeoBundle 'trinity.vim' "NeoBundle 'vcscommand.vim' NeoBundleLazy 'vimwiki' " color scheme NeoBundleLazy 'altercation/vim-colors-solarized' NeoBundle 'deris/molokai' NeoBundle 'deris/vim-wombat' NeoBundleLazy 'jnurmine/Zenburn' NeoBundleLazy 'newspaper.vim' " 日本語help NeoBundle 'vim-jp/vimdoc-ja' " Installation check. NeoBundleCheck endif " }}} filetype plugin indent on if s:bundled('vim-singleton') if has('clientserver') call singleton#enable() endif endif "--------------------------------------------------------------------------- " オプションの設定:{{{2 " 構文ハイライト有効化 syntax enable set ignorecase set smartcase set incsearch set hlsearch set tabstop=4 set expandtab set autoindent set backspace=indent,eol,start set nowrapscan set showmatch set wildmenu set wildmode=longest,full set wildignore=.git,.hg,.svn set wildignore+=*.jpg,*.jpeg,*.bmp,*.gif,*.png set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest,*.so,*.out,*.class set wildignore+=*.swp,*.swo,*.swn set wildignore+=*.DS_Store " 日本語整形スクリプト(by. 西岡拓洋さん)用の設定 let format_allow_over_tw = 1 " ぶら下り可能幅 set shiftwidth=4 set smartindent set smarttab set whichwrap=b,s,h,l,<,>,[,] set hidden set textwidth=0 set formatoptions-=t set formatoptions-=c set formatoptions-=r set formatoptions-=o set formatoptions-=v set formatoptions+=l set number set ruler set list set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:< set t_Co=256 set nrformats=hex set winaltkeys=no set visualbell set noequalalways set nowrap set laststatus=2 set cmdheight=2 set showcmd set title set lines=50 set showtabline=2 "set statusline=%t\ %y\ [%{&fenc}][%{&ff}]\ %m%r%w%h%=%l/%L\ %v\ %P set previewheight=10 set helpheight=12 set virtualedit=block set scrolloff=5 set backup function! s:LetAndMkdir(variable, path) "{{{ try if !isdirectory(a:path) call mkdir(a:path, 'p') endif catch echohl WarningMsg echom '[error]' . a:path . 'is exist and is not directory, but is file or something.' echohl None endtry execute printf("let %s = '%s'", a:variable, a:path) endfunction "}}} call s:LetAndMkdir('&backupdir', $DOTVIM.'/backup') if has('unix') set backupskip=/tmp/*,/private/tmp/* endif set swapfile call s:LetAndMkdir('&directory', $DOTVIM.'/swap') set history=2000 let &showbreak = '+++ ' set ttyfast if has('persistent_undo') set undofile call s:LetAndMkdir('&undodir', $DOTVIM.'/undo') endif set tags=./tags,../tags,./*/tags,../../tags,../../../tags,../../../../tags let &termencoding = &encoding set encoding=utf-8 set fileencoding=utf-8 set fileencodings=utf-8,ucs-bom,iso-2022-jp-3,iso-2022-jp,eucjp-ms,euc-jisx0213,euc-jp,sjis,cp932 set fileformats=unix,dos,mac if exists('&ambiwidth') set ambiwidth=double endif if s:bundled('vim-wombat') colorscheme wombat else colorscheme desert endif scriptencoding utf-8 if has('vim_starting') && has('unix') let $PATH=$PERLBREW_ROOT.'/bin:'.$PATH let s:my_perl_path = split(system('which perl'), '[\r\n]')[0] let s:my_perl_path = fnamemodify(s:my_perl_path, ':p:h') if s:my_perl_path =~ '^/' let $PATH=s:my_perl_path.':'.$PATH endif let $PATH=$HOME."/.cabal/bin:".$PATH endif if has('win32') let g:my_win32_grep_path = 'C:/usr/local/bin/jvgrep.exe' if executable(g:my_win32_grep_path) let &grepprg = g:my_win32_grep_path . ' -n8 --enc utf-8,cp932,euc-jp' endif elseif has('unix') if executable('ag') set grepprg=ag\ -a\ $*\ /dev/null endif "if executable('ack') "set grepprg=ack\ -a\ $*\ /dev/null "endif endif " 全角スペースを表示 augroup hilightIdegraphicSpace autocmd! autocmd VimEnter,ColorScheme * highlight IdeographicSpace term=underline ctermbg=DarkGreen guibg=DarkGreen autocmd WinEnter * match IdeographicSpace / / augroup END " vimdiff時のハイライト augroup diffcolor autocmd ColorScheme * hi DiffAdd ctermfg=black ctermbg=2 autocmd ColorScheme * hi DiffChange ctermfg=black ctermbg=3 autocmd ColorScheme * hi DiffDelete ctermfg=black ctermbg=6 autocmd ColorScheme * hi DiffText ctermfg=black ctermbg=7 augroup END " カーソルラインと行ラインを表示 augroup cursorsetting autocmd! autocmd BufWinEnter,WinEnter * setlocal cursorline cursorcolumn autocmd BufWinLeave,WinLeave * setlocal nocursorline nocursorcolumn augroup END " 自動的に現在編集中のファイルのカレントディレクトリに移動 augroup grlcd autocmd! autocmd BufRead,BufEnter * lcd %:p:h augroup END " 親ディレクトリが存在していなければ作成するかどうか確認 augroup AutoMkdir autocmd! autocmd BufNewFile * call PromptAndMakeDirectory() augroup END function! PromptAndMakeDirectory() let dir = expand(":p:h") if !isdirectory(dir) && confirm("Create a new directory [".dir."]?", "&Yes\n&No") == 1 call mkdir(dir, "p") " Reset fullpath of the buffer in order to avoid problems when using autochdir. file % endif endfunction " kaoriya版に添付されているプラグインの無効化 let plugin_autodate_disable = 1 let plugin_cmdex_disable = 1 let plugin_dicwin_disable = 1 let plugin_format_disable = 1 let plugin_hz_ja_disable = 1 let plugin_scrnmode_disable = 1 let plugin_verifyenc_disable = 1 " }}} "--------------------------------------------------------------------------- " key map:{{{2 let mapleader = "," let maplocalleader = "," nnoremap \ , if has('mac') noremap ¥ \ noremap \ ¥ endif " Escのkeymap noremap noremap! noremap noremap! noremap noremap! inoremap jk if has('mac') " 誤タイプ防止の為 inoremap k inoremap endif " switch j,k and gj,gk nnoremap j gj nnoremap k gk vnoremap j gj vnoremap k gk nnoremap gj j nnoremap gk k vnoremap gj j vnoremap gk k " key map ^,$ to h,l. Because ^ and $ is difficult to type and damage little finger!!! noremap h ^ noremap l $ " same as above. but don't use noremap because want to map to matchit plugin map n % " move middle of current line.(not middle of screen) nnoremap gm :call MoveMiddleOfLine() function! s:MoveMiddleOfLine() let strwidth = strdisplaywidth(getline('.')) let winwidth = winwidth(0) if strwidth < winwidth call cursor(0, col('$') / 2) else normal! gm endif endfunction " vimrc編集 if has('gui_running') nnoremap . :execute 'tab drop ' . resolve($MYVIMRC) nnoremap g. :execute 'tab drop ' . resolve($MYGVIMRC) else nnoremap . :execute 'tabe ' . resolve($MYVIMRC) nnoremap g. :execute 'tabe ' . resolve($MYGVIMRC) endif nnoremap s. :source $MYVIMRC \| if has('gui_running') \| source $MYGVIMRC \| endif " helpショートカット nnoremap :help nnoremap :help " 最後に選択したテキストをOperator-pending modeで使用可能に onoremap gv :normal! gv " 最後に変更されたテキストを選択する nnoremap gc `[v`] vnoremap gc :normal gc onoremap gc :normal gc " 最後に変更されたテキストに移動する nnoremap gI `.zz " Use more logical mapping (see :h Y) nnoremap Y y$ " クリップボードからペースト nnoremap p "*p vnoremap p "*p nnoremap P "*P vnoremap P "*P " クリップボードにヤンク nnoremap y "*y nnoremap Y "*y$ vnoremap y "*y " クリップボードにヤンクして削除 nnoremap d "*d nnoremap D "*d$ vnoremap d "*d " クリップボードからPasteモードにして貼り付け nnoremap sp :let b:save_paste=&paste:set paste"*p:let &paste=b:save_paste nnoremap sP :let b:save_paste=&paste:set paste"*P:let &paste=b:save_paste " 空行挿入(繰り返し対応) nnoremap o :for i in range(1, v:count1) \| call append(line('.'), '') \| endfor \| silent! call repeat#set("o", v:count1) nnoremap O :for i in range(1, v:count1) \| call append(line('.')-1, '') \| endfor \| silent! call repeat#set("O", v:count1) nnoremap O :for i in range(1, v:count1) \| call append(line('.')-1, '') \| endfor \| silent! call repeat#set("O"), v:count1 " from ujihisa's vimrc nnoremap I $i nnoremap X ^x ";と:を入れ替え nnoremap ; : vnoremap ; : nnoremap q; q: vnoremap q; q: nnoremap : ; vnoremap : ; " ;で最後のコマンドライン繰り返し nnoremap ; @: " .で直前の@xを繰り返し nnoremap . @@ " disable because this is dangerous key nnoremap ZZ nnoremap ZQ " Don't use Ex mode, use Q for formatting nnoremap Q gq " 一括してキーマップする function! s:LumpMap(prefix, lhs, rhs) let charlist = split(a:lhs, '\zs') for char in charlist execute 'nnoremap ' . a:prefix . char . ' ' . a:rhs endfor endfunction " マクロの誤タイプ防止(使うキーだけ残す) call s:LumpMap('q', '0123456789rtyuiopghjklvbnm"', '') " use instead of @ nnoremap @ nnoremap @@ " map w to iw in motion. Because iw is commonly-used key and don't use w in motion. onoremap w iw onoremap W iW " text-objectを割り当て onoremap aa a> vnoremap aa a> onoremap ia i> vnoremap ia i> onoremap aa a> vnoremap aa a> onoremap ia i> vnoremap ia i> onoremap ar a] vnoremap ar a] onoremap ir i] vnoremap ir i] onoremap ad a" vnoremap ad a" onoremap id i" vnoremap id i" " key mapping強制ギブス onoremap a> vnoremap a> onoremap i> vnoremap i> onoremap a< vnoremap a< onoremap i< vnoremap i< onoremap a] vnoremap a] onoremap i] vnoremap i] onoremap a[ vnoremap a[ onoremap i[ vnoremap i[ onoremap a" vnoremap a" onoremap i" vnoremap i" " exコマンド nnoremap w :update nnoremap q :SafeQuit nnoremap Q :SafeQuit! nnoremap Q :SafeQuit! nnoremap bd :bdelete nnoremap bD :bdelete! nnoremap bb :buffer # function! s:safeQuit(bang) " 最後のタブ&最後のウィンドウでなければ終了 if !(tabpagenr('$') == 1 && winnr('$') == 1) execute 'quit'.a:bang return endif " 終了するかどうか確認 echohl WarningMsg let l:input = input('Are you sure to quit vim?[y/n]: ') echohl None redraw! if l:input ==? 'y' execute 'quit'.a:bang endif endfunction command! -bang SafeQuit call s:safeQuit('') " 仮想置換モード nnoremap R gR " win間移動 nnoremap h nnoremap j nnoremap k nnoremap l nnoremap H nnoremap J nnoremap K nnoremap L if has('mac') nnoremap h nnoremap j nnoremap k nnoremap l nnoremap H nnoremap J nnoremap K nnoremap L endif " command mode cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap (getcmdpos()==strlen(getcmdline())+1 ? "\" : "\") cnoremap cnoremap " カーソル位置にかかわらず全部消す cnoremap " コマンドラインモードでコマンドラインウィンドウを開く cnoremap a " カーソル下のlineを挿入 cnoremap matchstr(getline("."), '[^ \t:][^\r\n]*') " ASCII keyboardで打ちやすいように cnoremap ' " " command modeでの自動エスケープ cnoremap / getcmdtype() == '/' ? '\/' : '/' cnoremap ? getcmdtype() == '?' ? '\?' : '?' " 置換の自動入力 nnoremap gs :%s///g vnoremap gs :s///g nnoremap gS :%s///gc vnoremap gS :s///gc " vim diffのkeymap nnoremap dp dp:diffupdate]czz nnoremap do do:diffupdate]czz vnoremap dp :diffput:diffupdatezz vnoremap do :diffget:diffupdatezz nnoremap du :diffupdate nnoremap dy [czz nnoremap dm ]czz vnoremap dy [czz vnoremap dm ]czz " insert mode inoremap inoremap inoremap inoremap inoremap ^ inoremap $ inoremap inoremap "inoremap C "inoremap p " undoできるC-w,C-u inoremap u inoremap u inoremap O " ハイライトを消す nnoremap :nohlsearch nnoremap :nohlsearch nnoremap :nohlsearch nnoremap :nohlsearch " 検索方向が変わってもnは下、Nは上に移動できるように対応 nnoremap n search_forward_p() ? 'nzvzz' : 'Nzvzz' nnoremap N search_forward_p() ? 'Nzvzz' : 'nzvzz' vnoremap n search_forward_p() ? 'nzvzz' : 'Nzvzz' vnoremap N search_forward_p() ? 'Nzvzz' : 'nzvzz' onoremap n search_forward_p() ? 'nzz' : 'Nzz' onoremap N search_forward_p() ? 'Nzz' : 'nzz' function! s:search_forward_p() return exists('v:searchforward') ? v:searchforward : 1 endfunction nnoremap gg ggzvzz nnoremap G Gzvzz " scrolloffが設定されていてもスクリーンの最上行に移動する if &scrolloff > 0 execute 'nnoremap H H' . &scrolloff . 'kzvzz' execute 'nnoremap L L' . &scrolloff . 'jzvzz' endif " 仮想編集の変更 nnoremap va :setlocal virtualedit=all:setlocal virtualedit? nnoremap vb :setlocal virtualedit=block:setlocal virtualedit? nnoremap vv :let &virtualedit=(&ve == "block" ? "all" : "block"):setlocal virtualedit? " very magic(正規表現をエスケープしなくてよくなる) noremap / /\v noremap ? ?\v " カーソル下のウィンドウを編集(数字が付いていればその行へ) noremap gf gF " tab mode nnoremap [tabmode] nmap t [tabmode] nnoremap [tabmode]t :tabnew nnoremap [tabmode]d :tabclose nnoremap gT nnoremap gt " tag jump nnoremap [tagjump] nmap t [tagjump] nnoremap [tagjump]t " 「飛ぶ」 nnoremap [tagjump]j :tag " 「進む」 nnoremap [tagjump]k :pop " 「戻る」 nnoremap [tagjump]l :tags " 履歴一覧 "-------------------- " Function: Open tag under cursor in new tab " Source: http://stackoverflow.com/questions/563616/vimctags-tips-and-tricks "-------------------- nnoremap [tagjump]n :tab split:exec("tag ".expand("")) " filetype nnoremap [filetype] nmap t [filetype] nnoremap [filetype]p :set filetype=perl nnoremap [filetype]v :set filetype=vim nnoremap [filetype]c :set filetype=c nnoremap [filetype]o :set filetype=objc nnoremap [filetype]j :set filetype=java nnoremap [filetype]s :set filetype=shell nnoremap [filetype]r :set filetype=ruby nnoremap [filetype]a :set filetype=javascript nnoremap [filetype]h :set filetype=html nnoremap [filetype]x :set filetype=xml nnoremap [filetype]d :set filetype=diff nnoremap [filetype]l :set filetype=scala command! -nargs=1 -complete=filetype FileType execute "set filetype=". if has('win32') " Save the current buffer and execute the Tortoise SVN interface's diff program nnoremap sd :call TortoiseDiff() " Save the current buffer and execute the Tortoise SVN interface's log nnoremap sl :w:silent !C:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe /command:log /path:"%" /notempfile /closeonend " Save the current buffer and execute the Tortoise SVN interface's revision graph nnoremap sr :w:silent !C:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe /command:revisiongraph /path:"%" /notempfile /closeonend " Save the current buffer and execute the Tortoise SVN interface's blame program nnoremap sb :call TortoiseBlame() function! s:TortoiseDiff() silent execute(':w') let filename = shellescape(expand("%:p")) let cmdname = escape(shellescape('D:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe'), ' \') let cmdline = '! start "" ' . cmdname . ' /command:diff /path:' . filename . ' /notempfile /closeonend' silent execute(cmdline) endfunction function! s:TortoiseBlame() silent execute(':w') let filename = shellescape(expand("%:p")) let linenum = line(".") let cmdname = escape(shellescape('D:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe'), ' \') let cmdline = '! start "" ' . cmdname . ' /command:blame /path:' . filename . ' /line:' . linenum . '/notempfile /closeonend' silent execute(cmdline) endfunction endif " kana's useful tab function {{{ function! s:move_window_into_tab_page(target_tabpagenr) " Move the current window into a:target_tabpagenr. " If a:target_tabpagenr is 0, move into new tab page. if a:target_tabpagenr < 0 " ignore invalid number. return endif let original_tabnr = tabpagenr() let target_bufnr = bufnr('') let window_view = winsaveview() if a:target_tabpagenr == 0 tabnew tabmove " Move new tabpage at the last. execute target_bufnr 'buffer' let target_tabpagenr = tabpagenr() else execute a:target_tabpagenr 'tabnext' let target_tabpagenr = a:target_tabpagenr topleft new " FIXME: be customizable? execute target_bufnr 'buffer' endif call winrestview(window_view) execute original_tabnr 'tabnext' if 1 < winnr('$') close else enew endif execute target_tabpagenr 'tabnext' endfunction " }}} " move current buffer into a new tab. nnoremap :call move_window_into_tab_page(0) nnoremap t :call move_window_into_tab_page(0) " change expandtab booster nnoremap t2 :setlocal expandtab shiftwidth=2 tabstop=2 nnoremap t4 :setlocal noexpandtab shiftwidth=4 tabstop=4 nnoremap t2 :setlocal expandtab shiftwidth=2 tabstop=2 nolist nnoremap t4 :setlocal noexpandtab shiftwidth=4 tabstop=4 nolist " 差分モードを終了する function! s:DiffOff() diffoff! set nowrap endfunction command! DiffOff call s:DiffOff() " Google Chromeで開く function! s:GoogleChrome(...) if has('mac') let l:cmd = "silent !open -a Google\\ Chrome " elseif has('win32') let l:cmd = "silent !start google\\ chrome " else return endif if a:0 == 0 execute l:cmd . "%" else execute l:cmd . a:1 endif endfunction command! -nargs=? GoogleChrome call s:GoogleChrome() " 検索文字列をレジスタでグローバル置換 nnoremap rs :execute '%substitute//' . escape(getreg(), '/\') . '/g' " 縦に連番を入力する nnoremap co :ContinuousNumber vnoremap co :ContinuousNumber command! -count -nargs=1 ContinuousNumber let c = col('.')|for n in range(1, ?-line('.'):1)|exec 'normal! j' . n . |call cursor('.', c)|endfor " from ujihisa's vimrc command! -count=1 -nargs=0 GoToTheLine silent execute getpos('.')[1][:-len(v:count)-1] . v:count "nnoremap gl :GoToTheLine " grep function! s:Grep(pattern, target) execute 'grep ' . a:pattern . ' ' . a:target Unite -no-quit -direction=botright quickfix endfunction command! -nargs=+ Grep call s:Grep() " Count Char function! s:CountChar(c) let line = getline('.') let match = stridx(line, a:c) let cnt = 0 while match != -1 let cnt = cnt + 1 let match = stridx(line, a:c, match + 1) endwhile echo cnt . " '" . a:c . "' in current line." endfunction command! -nargs=1 CountChar call s:CountChar() function s:EchoSynName() let synlist = [] for id in synstack(line("."), col(".")) call add(synlist, synIDattr(id, "name")) endfor echo synlist endfunction command! -nargs=0 EchoSynName call s:EchoSynName() " visualモードで最後に選択したテキストを%sで指定してコマンドを実行する {{{ function! ExecuteWithSelectedText(command) if a:command !~? '%s' return endif let reg = '"' let [save_reg, save_type] = [getreg(reg), getregtype(reg)] normal! gvy let selectedText = @" call setreg(reg, save_reg, save_type) if selectedText == '' return endif execute printf(a:command, selectedText) endfunction " }}} " }}} "--------------------------------------------------------------------------- " Command {{{2 command! Utf8 e ++enc=utf-8 command! Euc e ++enc=euc-jp command! Sjis e ++enc=cp932 command! Jis e ++enc=iso-2022-jp command! WUtf8 w ++enc=utf-8 | e command! WEuc w ++enc=euc-jp | e command! WSjis w ++enc=cp932 | e command! WJis w ++enc=iso-2022-jp | e " }}} "--------------------------------------------------------------------------- " filetype {{{2 augroup commonfiletype autocmd! autocmd FileType * setlocal fo-=t fo-=c fo-=r fo-=o fo-=v fo+=l autocmd FileType * setlocal textwidth=0 autocmd SourceCmd .vimrc setlocal fo-=t fo-=c fo-=r fo-=o fo-=v fo+=l augroup END augroup vimlang autocmd! autocmd FileType vim setlocal expandtab tabstop=2 shiftwidth=2 list autocmd FileType vim let g:vim_indent_cont = 2 augroup END augroup snippetlang autocmd! autocmd FileType snippet setlocal noexpandtab tabstop=4 shiftwidth=4 list augroup END augroup makefile autocmd! autocmd FileType make setlocal noexpandtab list augroup END augroup clang autocmd! autocmd FileType c setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup rubylang autocmd! autocmd FileType ruby setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup perllang autocmd! autocmd BufRead,BufNewFile *.psgi setfiletype perl autocmd BufRead,BufNewFile *.t setfiletype perl autocmd FileType perl setlocal expandtab tabstop=4 shiftwidth=4 list " perlの関数に飛ぶ autocmd FileType perl noremap ]] m':call search('^\s*sub\>', "W") autocmd FileType perl noremap [[ m':call search('^\s*sub\>', "bW") autocmd FileType perl compiler perl "autocmd BufWritePost *.pl,*.pm silent make augroup END augroup htmlfile autocmd! autocmd FileType html,xhtml setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup xmlfile autocmd! autocmd FileType xml setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup jslang autocmd! autocmd FileType javascript setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup iolang autocmd! autocmd BufRead,BufNewFile *.io setfiletype io autocmd FileType io setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup scalalang autocmd! autocmd BufRead,BufNewFile *.scala setfiletype scala autocmd FileType scala setlocal expandtab tabstop=2 shiftwidth=2 list augroup END augroup zshlang autocmd! autocmd FileType zsh setlocal expandtab tabstop=2 shiftwidth=2 list augroup END " Objective-C if has('mac') " for tablist.vim Objective-C let tlist_objc_settings='objc;P:protocols;i:interfaces;I:implementations;M:instance methods;C:implementation methods;Z:protocol methods' " for a.vim Objective-C let g:alternateExtensions_h = "m,mm,c,cpp" let g:alternateExtensions_m = "h" let g:alternateExtensions_mm = "h,hpp" " for Objective-C gfでジャンプできるように augroup objclang autocmd! autocmd FileType objc setlocal path=.;,/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks,/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks,, autocmd FileType objc setlocal include=^\s*#\s*import autocmd FileType objc setlocal includeexpr=substitute(v:fname,'\/','\.framework/Headers/','g') autocmd FileType objc setlocal makeprg=xcodebuild\ -activetarget\ -activeconfiguration augroup END endif " }}} " }}} "--------------------------------------------------------------------------- " plugins {{{1 "--------------------------------------------------------------------------- " for Lokaltog/vim-easymotion {{{2 let g:EasyMotion_leader_key = ',' let g:EasyMotion_keys = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' let g:EasyMotion_do_shade = 1 augroup diffcolor autocmd ColorScheme * hi EasyMotionTarget ctermbg=none ctermfg=green autocmd ColorScheme * hi EasyMotionShade ctermbg=none ctermfg=blue augroup END " }}} "--------------------------------------------------------------------------- " for Shougo/neocomplcache {{{2 if s:bundled('neocomplcache') " Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplcache. let g:neocomplcache_enable_at_startup = 1 " Use smartcase. let g:neocomplcache_enable_smart_case = 1 "" Use camel case completion. let g:neocomplcache_enable_camel_case_completion = 1 "" Use underbar completion. let g:neocomplcache_enable_underbar_completion = 1 let g:neocomplcache_auto_completion_start_length = 3 let g:neocomplcache_manual_completion_start_length = 3 " Define dictionary. let g:neocomplcache_dictionary_filetype_lists = { \ 'default' : '', \ 'vimshell' : $HOME.'/.vimshell_hist', \ 'scheme' : $HOME.'/.gosh_completions' \ } " Define keyword. if !exists('g:neocomplcache_keyword_patterns') let g:neocomplcache_keyword_patterns = {} endif let g:neocomplcache_keyword_patterns['default'] = '\h\w*' " Plugin key-mappings. inoremap neocomplcache#undo_completion() inoremap neocomplcache#complete_common_string() " Recommended key-mappings. " : close popup and save indent. "inoremap neocomplcache#close_popup() . "\" " : completion. "inoremap pumvisible() ? "\" : "\" " , : close popup and delete backword char. inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#close_popup() "inoremap neocomplcache#cancel_popup() "imap (neocomplcache_start_unite_snippet) "smap (neocomplcache_start_unite_snippet) " Enable omni completion. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags " Enable heavy omni completion. if !exists('g:neocomplcache_omni_patterns') let g:neocomplcache_omni_patterns = {} endif let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\h\w*\|\h\w*::' "autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::' let g:neocomplcache_omni_patterns.c = '\%(\.\|->\)\h\w*' let g:neocomplcache_omni_patterns.cpp = '\h\w*\%(\.\|->\)\h\w*\|\h\w*::' " For perlomni.vim setting. " https://github.com/c9s/perlomni.vim "let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::' endif " }}} "--------------------------------------------------------------------------- " for Shougo/neocomplcache-snippets-complete {{{2 if s:bundled('neosnippet') call s:LetAndMkdir('g:neosnippet#snippets_directory', $DOTVIM.'/snippets') " Plugin key-mappings. imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) xmap (neosnippet_start_unite_snippet_target) smap (neosnippet_jump) nnoremap e :NeoSnippetEdit nnoremap ee :NeoSnippetEdit " SuperTab like snippets behavior. "imap neosnippet#expandable() ? " \ "\(neosnippet_expand_or_jump)" " \: pumvisible() ? "\" : "\" "smap neosnippet#expandable() ? " \ "\(neosnippet_expand_or_jump)" " \: "\" " For snippet_complete marker. if has('conceal') set conceallevel=2 concealcursor=i endif set completeopt-=preview endif " }}} "--------------------------------------------------------------------------- " for Shougo/unite.vim {{{2 if s:bundled('unite.vim') nnoremap [unite] nmap u [unite] nnoremap [unite]c :UniteWithCurrentDir -buffer-name=files buffer file_mru bookmark file nnoremap [unite]b :Unite buffer nnoremap [unite]r :Unite register nnoremap [unite]o :Unite outline nnoremap [unite]u :Unite file_mru nnoremap [unite]d :Unite directory_mru nnoremap [unite]k :Unite bookmark nnoremap [unite]s :Unite source nnoremap [unite]f :UniteWithBufferDir -buffer-name=files file nnoremap [unite]g :Unite grep nnoremap [unite]h :Unite help nnoremap [unite]; :Unite history/command nnoremap [unite]/ :Unite history/search nnoremap [unite]y :Unite history/yank nnoremap [unite]a :UniteBookmarkAdd nnoremap [unite]n :Unite neobundle/install:! nnoremap [unite]e :Unite snippet nnoremap [unite]q :Unite quickfix nnoremap [unite]p :Unite ref/perldoc " Start insert. "let g:unite_enable_start_insert = 1 autocmd FileType unite call s:unite_my_settings() function! s:unite_my_settings() "{{{ nmap (unite_exit) nmap (unite_exit) imap jk (unite_insert_leave) nmap nmap (unite_toggle_mark_current_candidate) imap (unite_toggle_mark_current_candidate) vmap (unite_toggle_mark_selected_candidates) " : manual neocomplcache completion. inoremap " action key mapping nnoremap r unite#do_action('replace') call unite#custom_default_action('directory', 'lcd') endfunction "}}} let g:unite_source_file_mru_limit = 200 let g:unite_cursor_line_highlight = 'TabLineSel' let g:unite_abbr_highlight = 'TabLine' let g:unite_winheight = 15 let g:unite_source_file_mru_time_format = "%m/%d %H:%M " " For optimize. let g:unite_source_file_mru_filename_format = '' " For history/yank let g:unite_source_history_yank_enable = 1 let g:unite_source_history_yank_limit = 100 let g:unite_source_history_yank_file = $DOTVIM.'/history_yank' if has('win32') if executable(g:my_win32_grep_path) let g:unite_source_grep_command = g:my_win32_grep_path let g:unite_source_grep_recursive_opt = '-R' let g:unite_source_grep_default_opts = '-n --enc utf-8,cp932,euc-jp' endif elseif has('unix') if executable('ag') let g:unite_source_grep_command = 'ag' let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_default_opts = '--nocolor --nogrep' endif endif let g:unite_source_grep_max_candidates = 200 " For unite-session. " Save session automatically. "let g:unite_source_session_enable_auto_save = 1 " Load session automatically. "autocmd VimEnter * UniteSessionLoad endif " }}} "--------------------------------------------------------------------------- " for Shougo/vimfiler {{{2 " File explorer like behavior. if s:bundled('vimfiler') nnoremap [vimfiler] nmap f [vimfiler] nnoremap [vimfiler]f :VimFiler -buffer-name=explorer -split -simple -winwidth=35 -toggle -no-quit nnoremap [vimfiler]d :VimFilerTab -double -no-quit nnoremap [vimfiler]b :VimFiler -buffer-name=explorer -split -simple -winwidth=35 -toggle -no-quit -auto-cd $VIMBUNDLE let g:vimfiler_as_default_explorer = 1 let g:vimfiler_enable_auto_cd = 1 " Use trashbox. " Windows only and require latest vimproc. if has('win32') let g:unite_kind_file_use_trashbox = 1 endif call s:LetAndMkdir('g:vimfiler_data_directory', $DOTVIM.'/.vimfiler') if has('mac') " Like Textmate icons. let g:vimfiler_tree_leaf_icon = ' ' let g:vimfiler_tree_opened_icon = '▾' let g:vimfiler_tree_closed_icon = '▸' let g:vimfiler_file_icon = '-' let g:vimfiler_marked_file_icon = '*' else let g:vimfiler_tree_leaf_icon = ' ' let g:vimfiler_tree_opened_icon = '-' let g:vimfiler_tree_closed_icon = '+' let g:vimfiler_file_icon = '-' let g:vimfiler_marked_file_icon = '*' endif autocmd FileType vimfiler call s:vimfiler_my_settings() function! s:vimfiler_my_settings() "{{{ if has('gui_running') nnoremap E vimfiler#do_action('tabdrop') else nnoremap E vimfiler#do_action('tabopen') endif nnoremap s vimfiler#do_action('right') nnoremap f vimfiler#do_action('diff') nmap e vimfiler#smart_cursor_map( \ "\(vimfiler_cd_file)", \ "\(vimfiler_edit_file)") nmap nmap (vimfiler_toggle_mark_current_line) vmap (vimfiler_toggle_mark_selected_lines) endfunction "}}} endif " }}} "--------------------------------------------------------------------------- " for airblade/vim-gitgutter {{{2 if s:bundled('vim-gitgutter') let g:gitgutter_enabled = 0 nnoremap gg :GitGutterToggle endif " }}} "--------------------------------------------------------------------------- " for h1mesuke/vim-alignta {{{2 if s:bundled('vim-alignta') nnoremap as :Alignta = vnoremap as :Alignta = nnoremap a= :Alignta = vnoremap a= :Alignta = nnoremap ah :Alignta => nnoremap ah :Alignta => vnoremap a> :Alignta => vnoremap a> :Alignta => nnoremap a, :Alignta , vnoremap a, :Alignta , nnoremap a: :Alignta : vnoremap a: :Alignta : "augroup perllang "autocmd FileType perl vnoremap ah :alignctrl l-lgv:align => "augroup end endif " }}} "--------------------------------------------------------------------------- " for jpalardy/vim-slime {{{2 let g:slime_target = 'tmux' let g:slime_paste_file = tempname() " }}} "--------------------------------------------------------------------------- " for kana/vim-altr {{{2 if s:bundled('vim-altr') call altr#remove_all() call altr#define('plugin/%/*.vim', \ 'autoload/%/*.vim') call altr#define('plugin/%.vim', \ 'autoload/%.vim') command! A call altr#forward() command! B call altr#back() endif " }}} "--------------------------------------------------------------------------- " for kana/vim-arpeggio {{{2 if s:bundled('vim-arpeggio') " easy to input sign call arpeggio#map('ic', '', 0, 'r`', '~') call arpeggio#map('ic', '', 0, 'r1', '!') call arpeggio#map('ic', '', 0, 'r2', '@') call arpeggio#map('ic', '', 0, 'r3', '#') call arpeggio#map('ic', '', 0, 'r4', '$') call arpeggio#map('ic', '', 0, 'r5', '%') call arpeggio#map('ic', '', 0, 'r6', '^') call arpeggio#map('ic', '', 0, 'r7', '&') call arpeggio#map('ic', '', 0, 'r8', '*') call arpeggio#map('ic', '', 0, 'r9', '(') call arpeggio#map('ic', '', 0, 'r0', ')') call arpeggio#map('ic', '', 0, 'r-', '_') call arpeggio#map('ic', '', 0, 'r=', '+') call arpeggio#map('ic', '', 0, 't5', '%') call arpeggio#map('ic', '', 0, 't6', '^') call arpeggio#map('ic', '', 0, 'y7', '&') call arpeggio#map('ic', '', 0, 'u8', '*') call arpeggio#map('ic', '', 0, 'u9', '(') call arpeggio#map('ic', '', 0, 'u0', ')') call arpeggio#map('ic', '', 0, 'u-', '_') call arpeggio#map('ic', '', 0, 'u=', '+') endif " }}} "--------------------------------------------------------------------------- " for kana/vim-submode {{{2 if s:bundled('vim-submode') let g:submode_keyseqs_to_leave = [''] let g:submode_timeoutlen = 1000000 call submode#enter_with('undo/redo', 'n', '', 'g-', 'g-') call submode#enter_with('undo/redo', 'n', '', 'g+', 'g+') call submode#map('undo/redo', 'n', '', '-', 'g-') call submode#map('undo/redo', 'n', '', '+', 'g+') call submode#enter_with('window-size', 'n', '', '+', '+') call submode#enter_with('window-size', 'n', '', '-', '-') call submode#enter_with('window-size', 'n', '', '<', '<') call submode#enter_with('window-size', 'n', '', '=', '=') call submode#enter_with('window-size', 'n', '', '>', '>') call submode#map('window-size', 'n', '', '+', '+') call submode#map('window-size', 'n', '', '-', '-') call submode#map('window-size', 'n', '', '<', '<') call submode#map('window-size', 'n', '', '=', '=') call submode#map('window-size', 'n', '', '>', '>') call submode#enter_with('buffer-mode', 'n', '', 'gh', ':bprevious') call submode#enter_with('buffer-mode', 'n', '', 'gl', ':bnext') call submode#map('buffer-mode', 'n', '', 'h', ':bprevious') call submode#map('buffer-mode', 'n', '', 'l', ':bnext') call submode#map('buffer-mode', 'n', '', 'd', ':bdelete') call submode#enter_with('tab-mode', 'n', '', 'tl', 'gt') call submode#enter_with('tab-mode', 'n', '', 'th', 'gT') call submode#enter_with('tab-mode', 'n', '', 't\h', ':tabfirst') call submode#enter_with('tab-mode', 'n', '', 't\l', ':tablast') call submode#enter_with('tab-mode', 'n', '', 'tL', ':tabmove +1') call submode#enter_with('tab-mode', 'n', '', 'tH', ':tabmove -1') call submode#map('tab-mode', 'n', '', 'l', 'gt') call submode#map('tab-mode', 'n', '', 'h', 'gT') call submode#map('tab-mode', 'n', '', '\h', ':tabfirst') call submode#map('tab-mode', 'n', '', '\l', ':tablast') call submode#map('tab-mode', 'n', '', 'L', ':tabmove +1') call submode#map('tab-mode', 'n', '', 'H', ':tabmove -1') call submode#map('tab-mode', 'n', '', 't', ':tabnew') call submode#map('tab-mode', 'n', '', 'd', ':tabclose') call submode#enter_with('ex-move', 'nv', '', '', '') call submode#enter_with('ex-move', 'nv', '', 'j', 'zz') call submode#enter_with('ex-move', 'nv', '', 'k', 'zz') call submode#leave_with('ex-move', 'nv', '', '') call submode#map('ex-move', 'nv', '', 'j', 'zz') call submode#map('ex-move', 'nv', '', 'k', 'zz') call submode#map('ex-move', 'nv', '', 'n', '5jzz') call submode#map('ex-move', 'nv', '', 'm', '5kzz') call submode#map('ex-move', 'nv', '', 'l', '}zz') call submode#map('ex-move', 'nv', '', 'h', '{zz') call submode#enter_with('change-list', 'n', '', 'g;', 'g;zz') call submode#enter_with('change-list', 'n', '', 'g,', 'g,zz') call submode#map('change-list', 'n', '', ';', 'g;zz') call submode#map('change-list', 'n', '', ',', 'g,zz') call submode#enter_with('diff', 'n', '', 'd', '') call submode#map('diff', 'n', '', 'j', ']czz') " next diff call submode#map('diff', 'n', '', 'k', '[czz') " prev diff call submode#map('diff', 'n', '', 'h', 'do') " get diff call submode#map('diff', 'n', '', 'l', 'dp') " put diff call submode#map('diff', 'n', '', 'u', 'do]czz') " get diff and next diff call submode#map('diff', 'n', '', 'i', 'dp]czz') " put diff and next diff call submode#enter_with('nextfile', 'n', 'r', 'j', '(nextfile-next)') call submode#enter_with('nextfile', 'n', 'r', 'k', '(nextfile-previous)') call submode#map('nextfile', 'n', 'r', 'j', '(nextfile-next)') call submode#map('nextfile', 'n', 'r', 'k', '(nextfile-previous)') call submode#enter_with('ge-mode', 'nv', 'r', 'ge', '(smartword-ge)') call submode#map('ge-mode', 'nv', 'r', 'e', '(smartword-ge)') endif " }}} "--------------------------------------------------------------------------- " for kana/vim-operator-replace {{{2 if s:bundled('vim-operator-user') && s:bundled('vim-operator-replace') map s (operator-replace) map S (operator-replace)$ " clipboardからoperator-replace map s "*(operator-replace) map S "*(operator-replace)$ endif " }}} "--------------------------------------------------------------------------- " for kana/vim-operator-user {{{2 if s:bundled('vim-operator-user') call operator#user#define_ex_command('blank-killer', 's/\s\+$//') nmap bk (operator-blank-killer) endif " }}} "--------------------------------------------------------------------------- " for kana/vim-scratch {{{2 if s:bundled('vim-scratch') function! s:ScratchToggle() if exists("t:is_scratch_window") unlet t:is_scratch_window ScratchClose echo 'close' else let t:is_scratch_window = 1 ScratchOpen echo 'open' endif endfunction command! -nargs=0 ScratchToggle call s:ScratchToggle() "nnoremap :ScratchToggle endif " }}} "--------------------------------------------------------------------------- " for kana/vim-smarttill {{{2 if s:bundled('vim-smarttill') omap q (smarttill-t) omap Q (smarttill-T) endif " }}} "--------------------------------------------------------------------------- " for kana/vim-smartword {{{2 if s:bundled('vim-smartword') nmap w (smartword-w) vmap w (smartword-w) map b (smartword-b) map e (smartword-e) " submodeで割り当てるのでomapだけ omap ge (smartword-ge) endif " }}} "--------------------------------------------------------------------------- " for kien/ctrlp.vim {{{2 if s:bundled('ctrlp.vim') let g:ctrlp_map = '' let g:ctrlp_by_filename = 1 let g:ctrlp_mruf_max = 200 let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' let g:ctrlp_prompt_mappings = { \ 'PrtBS()': ['', ''], \ 'PrtDelete()': [''], \ 'PrtSelectMove("j")': ['', ''], \ 'PrtSelectMove("k")': ['', ''], \ 'PrtHistory(-1)': [''], \ 'PrtHistory(1)': [''], \ 'PrtCurLeft()': [''], \ 'PrtCurRight()': [''], \ } let g:ctrlp_reuse_window = 'netrw\|help\|quickfix\|NERD_tree_2\|__Tag_List__\|*Scratch*' nnoremap [ctrlp] nmap c [ctrlp] nnoremap [ctrlp]b :CtrlPBuffer nnoremap [ctrlp]m :CtrlPMRUFiles nnoremap [ctrlp]u :CtrlPMRUFiles nnoremap [ctrlp]f :CtrlPCurFile endif " }}} "--------------------------------------------------------------------------- " for mattn/zencoding-vim {{{2 let g:user_zen_leader_key = '' let g:user_zen_settings = { \ 'lang' : 'ja', \ 'html' : { \ 'filters' : 'html', \ 'indentation' : ' ' \ }, \ 'xhtml' : { \ 'filters' : 'html', \ 'indentation' : ' ' \ }, \ 'perl' : { \ 'indentation' : ' ', \ 'aliases' : { \ 'req' : "require '|'" \ }, \ 'snippets' : { \ 'use' : "use strict\nuse warnings\n\n", \ 'w' : "warn \"${cursor}\";", \ }, \ }, \ 'css' : { \ 'filters' : 'fc', \ }, \ 'javascript' : { \ 'snippets' : { \ 'jq' : "$(function() {\n\t${cursor}${child}\n});", \ 'jq:each' : "$.each(arr, function(index, item)\n\t${child}\n});", \ 'fn' : "(function() {\n\t${cursor}\n})();", \ 'tm' : "setTimeout(function() {\n\t${cursor}\n}, 100);", \ }, \ }, \} " }}} "--------------------------------------------------------------------------- " for motemen/git-vim {{{2 if s:bundled('git-vim') let g:git_no_map_default = 1 let g:git_command_edit = 'leftabove new' let g:git_author_highlight = { 'deris0126': 'term=reverse cterm=bold ctermbg=12 gui=bold guibg=red' } let g:git_highlight_blame = 1 let g:git_blame_width = 50 nnoremap [git] nmap g [git] nnoremap [git]d :GitDiff --no-prefix nnoremap [git]D :GitDiff --no-prefix --cached nnoremap [git]s :GitStatus nnoremap [git]l :GitLog nnoremap [git]L :GitLog -u \| head -10000 nnoremap [git]a :GitAdd nnoremap [git]A :GitAdd nnoremap [git]c :GitCommit nnoremap [git]C :GitCommit --amend nnoremap [git]p :Git push nnoremap [git]r :GitPullRebase nnoremap [git]f :GitCatFile % nnoremap [git]v :GitVimDiffMerge nnoremap [git]b zR:GitBlame augroup git_diff autocmd! " 差分間の移動 autocmd FileType git-diff nnoremap :call search('^[^+-].*\n\zs[+-]', "W") autocmd FileType git-diff nnoremap :call search('^[^+-].*\n\zs[+-]', "bW") augroup END endif " }}} "--------------------------------------------------------------------------- " for nathanaelkane/vim-indent-guides {{{2 let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_guide_size = 1 " }}} "--------------------------------------------------------------------------- " for t9md/vim-quickhl {{{2 if s:bundled('vim-quickhl') nmap hm (quickhl-toggle) xmap hm (quickhl-toggle) nmap hM (quickhl-reset) xmap hM (quickhl-reset) nmap hh (quickhl-match) "let g:quickhl_keywords = [ " \ "keyword", " \ ] endif " }}} "--------------------------------------------------------------------------- " for t9md/vim-surround_custom_mapping {{{2 let g:surround_custom_mapping = {} let g:surround_custom_mapping.perl = { \ 'Q': "q(\r)", \ 'D': "qq(\r)", \ 'o': "qw(\r)", \ } let g:surround_custom_mapping.ruby = { \ '-': "<% \r %>", \ '=': "<%= \r %>", \ '9': "(\r)", \ '5': "%(\r)", \ '%': "%(\r)", \ 'w': "%w(\r)", \ '#': "#{\r}", \ '3': "#{\r}", \ 'e': "begin \r end", \ 'E': "<n :NERDTreeToggle endif " }}} "--------------------------------------------------------------------------- " for scrooloose/syntastic {{{2 let g:syntastic_enable_signs = 1 let g:syntastic_auto_loc_list = 2 " }}} "--------------------------------------------------------------------------- " for thinca/vim-ambicmd {{{2 if s:bundled('vim-ambicmd') cnoremap ambicmd#expand("\") cnoremap ambicmd#expand("\") cnoremap (getcmdtype() =~ '[/?]' ? "\zvzz" : ambicmd#expand("\")) function! g:ambicmd_my_custom_rule(cmd) return [ \ '\c^' . a:cmd . '$', \ '\c^' . a:cmd, \ '\C^' . substitute(toupper(a:cmd), '.', '\0\\l*', 'g') . '$', \ '\C' . substitute(toupper(a:cmd), '.', '\0\\l*', 'g'), \ '\c' . a:cmd, \ '.*' . substitute(a:cmd, '.', '\0.*', 'g'), \ '\C^' . substitute(a:cmd, '^.', '\u\0', 'g') . '$', \ '\C^' . substitute(a:cmd, '^.', '\u\0', 'g'), \ ] endfunction let g:ambicmd#build_rule = 'g:ambicmd_my_custom_rule' endif " }}} "--------------------------------------------------------------------------- " for thinca/vim-poslist {{{2 if s:bundled('vim-poslist') let g:poslist_histsize = 500 map (poslist-prev-line) map (poslist-next-line) map (poslist-prev-buf) map (poslist-next-buf) endif " }}} "--------------------------------------------------------------------------- " for thinca/vim-quickrun {{{2 if s:bundled('vim-quickrun') let g:quickrun_config = {} let g:quickrun_config = { '*' : {'shebang' : '0' }} let g:quickrun_config._ = {'runmode': "async:remote:vimproc", 'split': 'below 10sp'} let g:quickrun_config._.runmode = 'async:vimproc' let g:quickrun_config.markdown = { \ 'type' : 'markdown/pandoc', \ 'outputter' : 'browser', \ 'cmdopt' : '-s' \ } let g:quickrun_config.io = { \ 'command': 'io', \ } let g:quickrun_config.scala = { \ 'command': 'scala', \ } nnoremap r :QuickRun -mode n vnoremap r :QuickRun -mode v nnoremap R :QuickRun -args "" endif " }}} "--------------------------------------------------------------------------- " for thinca/vim-ref {{{2 if s:bundled('vim-ref') let g:ref_source_webdict_sites = { \ 'default': 'alc', \ \ 'alc': { \ 'url': 'http://eow.alc.co.jp/%s', \ 'keyword_encoding': 'utf-8', \ 'cache': '1', \ }, \ 'wikipedia': { \ 'url': 'http://ja.wikipedia.org/wiki/%s', \ }, \ } function! g:ref_source_webdict_sites.alc.filter(output) return join(split(a:output, "\n")[38 :], "\n") endfunction function! g:ref_source_webdict_sites.wikipedia.filter(output) return join(split(a:output, "\n")[6 :], "\n") endfunction nnoremap wa :Ref webdict alc vnoremap wa :call ExecuteWithSelectedText('Ref webdict alc %s') nnoremap wA :Ref webdict alc nnoremap ww :Ref webdict wikipedia vnoremap ww :call ExecuteWithSelectedText('Ref webdict wikipedia %s') nnoremap wW :Ref webdict wikipedia endif " }}} "--------------------------------------------------------------------------- " for thinca/vim-visualstar {{{2 if s:bundled('vim-visualstar') map * (visualstar-*)Nzz map # (visualstar-#)Nzz map g* (visualstar-g*)Nzz map g# (visualstar-g#)Nzz map / (visualstar-*)Nzz map ? (visualstar-#)Nzz map g/ (visualstar-g*)Nzz map g? (visualstar-g#)Nzz endif " }}} "--------------------------------------------------------------------------- " for tsukkee/lingr-vim {{{2 let g:lingr_vim_user = 'deris0126' " }}} "--------------------------------------------------------------------------- " for tyru/nextfile.vim {{{2 let g:nf_include_dotfiles = 1 let g:nf_loop_files = 1 " }}} "--------------------------------------------------------------------------- " for tyru/open-browser.vim {{{2 if s:bundled('open-browser.vim') let g:netrw_nogx = 1 " disable netrw's gx mapping. nmap gx (openbrowser-smart-search) vmap gx (openbrowser-smart-search) nnoremap gz vi':call ExecuteWithSelectedText('OpenBrowser https://github.com/%s') vnoremap gz :call ExecuteWithSelectedText('OpenBrowser https://github.com/%s') endif " }}} "--------------------------------------------------------------------------- " for tyru/operator-html-escape.vim {{{2 if s:bundled('operator-user') && s:bundled('operator-html-escape.vim') nmap he (operator-html-escape) nmap hu (operator-html-unescape) endif " }}} "--------------------------------------------------------------------------- " for tyru/operator-star.vim {{{2 if s:bundled('operator-user') && s:bundled('operator-star.vim') nmap * (operator-*) nmap g* (operator-g*) nmap # (operator-#) nmap g# (operator-g#) endif " }}} "--------------------------------------------------------------------------- " for xolox/vim-easytags {{{2 if has('win32') let g:easytags_cmd = '' endif " }}} "--------------------------------------------------------------------------- " for deris/columnjump {{{2 if s:bundled('columnjump') nmap (columnjump-backward)zz nmap (columnjump-forward)zz endif " }}} "--------------------------------------------------------------------------- " for deris/parajump {{{2 if s:bundled('parajump') map { (parajump-backward)zz map } (parajump-forward)zz endif " }}} "--------------------------------------------------------------------------- " for errormarker.vim {{{2 let errormarker_disablemappings = 1 " }}} "--------------------------------------------------------------------------- " for taglist.vim {{{2 if s:bundled('taglist.vim') if has('mac') let Tlist_Ctags_Cmd = "/usr/local/bin/ctags" "ctagsのパス elseif has('win32') let Tlist_Ctags_Cmd = "c:/usr/local/bin/ctags.exe" "ctagsのパス endif "let Tlist_Show_One_File = 1 "現在編集中のソースのタグしか表示しない let Tlist_Exit_OnlyWindow = 1 "taglistのウィンドーが最後のウィンドーならばVimを閉じる let Tlist_Use_Right_Window = 1 "右側でtaglistのウィンドーを表示 nnoremap :TlistToggle endif " }}} "--------------------------------------------------------------------------- " for vim-textobj-function {{{2 if s:bundled('vim-textobj-user') && s:bundled('vim-textobj-function') let g:textobj_function_no_default_key_mappings = 1 omap iF (textobj-function-i) omap aF (textobj-function-a) vmap iF (textobj-function-i) vmap aF (textobj-function-a) endif " }}} " }}} "--------------------------------------------------------------------------- " __END__ "{{{1 " vim: expandtab softtabstop=2 shiftwidth=2 " vim: foldmethod=marker " }}}