From a8ba57cc639e19cf261c89580b2e564b602458a4 Mon Sep 17 00:00:00 2001 From: Bryan Goldstein Date: Sat, 7 Sep 2013 12:52:43 -0400 Subject: [PATCH 1/7] Add Vundle configuration Everyone will need to figure out how to remove the submodules they don't need or just delete their repo and start fresh. [Finishes #53046167] --- .gitignore | 1 + .gitmodules | 209 +--------------------------------------------------- vimrc | 99 ++++++++++++++++++++++++- 3 files changed, 101 insertions(+), 208 deletions(-) diff --git a/.gitignore b/.gitignore index 3edc9e2c..f05a7ada 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .netrwhist doc/tags .vimlog +bundle/* diff --git a/.gitmodules b/.gitmodules index 6f1a0709..fb40c667 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,207 +1,4 @@ -[submodule "bundle/vim-vividchalk"] - path = bundle/vim-vividchalk - url = git://github.com/tpope/vim-vividchalk.git +[submodule "bundle/vundle"] + path = bundle/vundle + url = https://github.com/gmarik/vundle.git ignore = dirty -[submodule "bundle/molokai"] - path = bundle/molokai - url = git://github.com/vim-scripts/molokai.git - ignore = dirty -[submodule "bundle/vim-rails"] - path = bundle/vim-rails - url = git://github.com/tpope/vim-rails.git - ignore = dirty -[submodule "bundle/vim-cucumber"] - path = bundle/vim-cucumber - url = git://github.com/tpope/vim-cucumber.git - ignore = dirty -[submodule "bundle/vim-haml"] - path = bundle/vim-haml - url = git://github.com/tpope/vim-haml.git - ignore = dirty -[submodule "bundle/vim-endwise"] - path = bundle/vim-endwise - url = git://github.com/tpope/vim-endwise.git - ignore = dirty -[submodule "bundle/vim-surround"] - path = bundle/vim-surround - url = git://github.com/tpope/vim-surround.git - ignore = dirty -[submodule "bundle/vim-repeat"] - path = bundle/vim-repeat - url = git://github.com/tpope/vim-repeat.git - ignore = dirty -[submodule "bundle/nerdtree"] - path = bundle/nerdtree - url = git://github.com/scrooloose/nerdtree.git - ignore = dirty -[submodule "bundle/nerdcommenter"] - path = bundle/nerdcommenter - url = git://github.com/scrooloose/nerdcommenter.git - ignore = dirty -[submodule "bundle/ack.vim"] - path = bundle/ack.vim - url = https://github.com/mileszs/ack.vim.git - ignore = dirty -[submodule "bundle/vim-abolish"] - path = bundle/vim-abolish - url = https://github.com/tpope/vim-abolish.git - ignore = dirty -[submodule "bundle/vim-git-pair"] - path = bundle/vim-git-pair - url = https://github.com/Peeja/vim-git-pair.git -[submodule "bundle/vim-javascript"] - path = bundle/vim-javascript - url = https://github.com/pangloss/vim-javascript.git - ignore = dirty -[submodule "bundle/vim-colors-solarized"] - path = bundle/vim-colors-solarized - url = git://github.com/altercation/vim-colors-solarized.git - ignore = dirty -[submodule "bundle/vim-fugitive"] - path = bundle/vim-fugitive - url = https://github.com/tpope/vim-fugitive.git - ignore = dirty -[submodule "bundle/vim-markdown"] - path = bundle/vim-markdown - url = https://github.com/plasticboy/vim-markdown.git - ignore = dirty -[submodule "bundle/vim-ruby-refactoring"] - path = bundle/vim-ruby-refactoring - url = https://github.com/ecomba/vim-ruby-refactoring.git - ignore = dirty -[submodule "bundle/vim-textobj-rubyblock"] - path = bundle/vim-textobj-rubyblock - url = https://github.com/nelstrom/vim-textobj-rubyblock.git - ignore = dirty -[submodule "bundle/vim-textobj-user"] - path = bundle/vim-textobj-user - url = https://github.com/kana/vim-textobj-user.git - ignore = dirty -[submodule "bundle/vim-unimpaired"] - path = bundle/vim-unimpaired - url = https://github.com/tpope/vim-unimpaired.git - ignore = dirty -[submodule "bundle/vim-irblack"] - path = bundle/vim-irblack - url = https://github.com/wgibbs/vim-irblack.git - ignore = dirty -[submodule "bundle/vim-ruby"] - path = bundle/vim-ruby - url = git://github.com/vim-ruby/vim-ruby.git - ignore = dirty -[submodule "bundle/vim-slim"] - path = bundle/vim-slim - url = git://github.com/slim-template/vim-slim.git -[submodule "bundle/gundo"] - path = bundle/gundo - url = https://github.com/sjl/gundo.vim.git -[submodule "bundle/tabular"] - path = bundle/tabular - url = https://github.com/godlygeek/tabular -[submodule "bundle/cucumbertables/ftplugin"] - path = bundle/cucumbertables/ftplugin - url = git://gist.github.com/1486660.git -[submodule "bundle/syntastic"] - path = bundle/syntastic - url = git://github.com/scrooloose/syntastic.git -[submodule "bundle/handlebars"] - path = bundle/handlebars - url = git://github.com/nono/vim-handlebars.git -[submodule "bundle/tmux-config"] - path = bundle/tmux-config - url = git://github.com/pivotal/tmux-config.git -[submodule "bundle/vim-tomorrow-theme"] - path = bundle/vim-tomorrow-theme - url = https://github.com/chriskempson/vim-tomorrow-theme.git -[submodule "bundle/ag.vim"] - path = bundle/ag.vim - url = https://github.com/epmatsw/ag.vim.git -[submodule "bundle/vim-coffee-script"] - path = bundle/vim-coffee-script - url = https://github.com/kchmck/vim-coffee-script.git -[submodule "bundle/hammer.vim"] - path = bundle/hammer.vim - url = https://github.com/matthias-guenther/hammer.vim.git -[submodule "bundle/vim-colors-candycode"] - path = bundle/vim-colors-candycode - url = https://github.com/vim-scripts/candycode.vim.git -[submodule "bundle/vim-colors-sampler"] - path = bundle/vim-colors-sampler - url = https://github.com/vim-scripts/Color-Sampler-Pack.git -[submodule "bundle/enhancedjumps"] - path = bundle/enhancedjumps - url = https://github.com/vim-scripts/EnhancedJumps.git -[submodule "bundle/test_server"] - path = bundle/test_server - url = https://github.com/brysgo/test_server.git -[submodule "bundle/diffthese"] - path = bundle/diffthese - url = https://github.com/matt-royal/diffthese.git -[submodule "bundle/vim-powerline"] - path = bundle/vim-powerline - url = https://github.com/Lokaltog/vim-powerline.git -[submodule "bundle/supertab"] - path = bundle/supertab - url = git://github.com/ervandew/supertab.git -[submodule "bundle/mustache"] - path = bundle/mustache - url = git://github.com/juvenn/mustache.vim.git -[submodule "bundle/vim-cucumber-align-pipes"] - path = bundle/vim-cucumber-align-pipes - url = git://github.com/quentindecock/vim-cucumber-align-pipes.git -[submodule "bundle/j-split"] - path = bundle/j-split - url = git://github.com/mgamba/j-split.git -[submodule "bundle/ZoomWin"] - path = bundle/ZoomWin - url = https://github.com/vim-scripts/ZoomWin.git -[submodule "bundle/vim-blockle"] - path = bundle/vim-blockle - url = git://github.com/jgdavey/vim-blockle.git -[submodule "bundle/camelcasemotion"] - path = bundle/camelcasemotion - url = https://github.com/vim-scripts/camelcasemotion.git -[submodule "bundle/vim-gitgutter"] - path = bundle/vim-gitgutter - url = https://github.com/airblade/vim-gitgutter.git -[submodule "bundle/tagbar"] - path = bundle/tagbar - url = https://github.com/majutsushi/tagbar.git -[submodule "bundle/edit-plus"] - path = bundle/edit-plus - url = https://github.com/mgamba/edit-plus.git -[submodule "bundle/colorschemes"] - path = bundle/colorschemes - url = https://github.com/flazz/vim-colorschemes.git -[submodule "bundle/vim-qargs"] - path = bundle/vim-qargs - url = https://github.com/henrik/vim-qargs.git -[submodule "bundle/quickfixfix"] - path = bundle/quickfixfix - url = https://github.com/brysgo/quickfixfix.git -[submodule "bundle/vim-golang"] - path = bundle/vim-golang - url = https://github.com/jnwhiteh/vim-golang.git -[submodule "bundle/vim-scala"] - path = bundle/vim-scala - url = https://github.com/rosstimson/scala-vim-support.git -[submodule "bundle/ctrlp"] - path = bundle/ctrlp - url = https://github.com/kien/ctrlp.vim.git - ignore = dirty -[submodule "bundle/matcher"] - path = bundle/matcher - url = https://github.com/burke/matcher - ignore = dirty -[submodule "bundle/vim-dispatch"] - path = bundle/vim-dispatch - url = https://github.com/tpope/vim-dispatch -[submodule "bundle/vim-easymotion"] - path = bundle/vim-easymotion - url = https://github.com/Lokaltog/vim-easymotion.git -[submodule "bundle/vim-clojure-static"] - path = bundle/vim-clojure-static - url = https://github.com/guns/vim-clojure-static.git -[submodule "bundle/csv.vim"] - path = bundle/csv.vim - url = https://github.com/chrisbra/csv.vim.git diff --git a/vimrc b/vimrc index 85e2ad26..53a90a4c 100644 --- a/vimrc +++ b/vimrc @@ -13,9 +13,104 @@ " come first or last, like Pathogen and sourcing the machine-local config. " Instead, add it to one of the files in .vim/init, or create a new one. -set nocompatible +set nocompatible " be iMproved +filetype off " required! + +set rtp+=~/.vim/bundle/vundle/ +call vundle#rc() + +Bundle 'gmarik/vundle' + +" +" Colorschemes +" +Bundle 'tpope/vim-vividchalk' +Bundle 'molokai' +Bundle 'altercation/vim-colors-solarized' +Bundle 'wgibbs/vim-irblack' +Bundle 'chriskempson/vim-tomorrow-theme' +Bundle 'candycode.vim' +Bundle 'Color-Sampler-Pack' +Bundle 'flazz/vim-colorschemes' + +" +" Rails +" +Bundle 'tpope/vim-rails' +Bundle 'tpope/vim-endwise' +Bundle 'ecomba/vim-ruby-refactoring' +Bundle 'nelstrom/vim-textobj-rubyblock' +Bundle 'brysgo/test_server' +Bundle 'jgdavey/vim-blockle' + +" +" General Editing +" +Bundle 'tpope/vim-repeat' +Bundle 'tpope/vim-surround' +Bundle 'scrooloose/nerdcommenter' +Bundle 'kana/vim-textobj-user' +Bundle 'tpope/vim-unimpaired' +Bundle 'sjl/gundo.vim' +Bundle 'godlygeek/tabular' +Bundle 'scrooloose/syntastic' +Bundle 'Lokaltog/vim-powerline' " Will be depricated soon +Bundle 'ervandew/supertab' +Bundle 'mgamba/j-split' +Bundle 'matt-royal/diffthese' +Bundle 'camelcasemotion' +Bundle 'mgamba/edit-plus' +Bundle 'brysgo/quickfixfix' +Bundle 'Lokaltog/vim-easymotion' + +" +" Window Management +" +Bundle 'ZoomWin' + +" +" Searching +" +Bundle 'mileszs/ack.vim' +Bundle 'epmatsw/ag.vim' +Bundle 'tpope/vim-abolish' +Bundle 'henrik/vim-qargs' +Bundle 'kien/ctrlp.vim' +Bundle 'burke/matcher' + +" +" Navigation +" +Bundle 'scrooloose/nerdtree' +Bundle 'EnhancedJumps' +Bundle 'majutsushi/tagbar' + +" +" Languages +" +Bundle 'vim-ruby/vim-ruby' +Bundle 'pangloss/vim-javascript' +Bundle 'plasticboy/vim-markdown' +Bundle 'slim-template/vim-slim' +Bundle 'nono/vim-handlebars' +Bundle 'kchmck/vim-coffee-script' +Bundle 'tpope/vim-haml' +Bundle 'tpope/vim-cucumber' +Bundle 'juvenn/mustache.vim' +Bundle 'jnwhiteh/vim-golang' +Bundle 'rosstimson/scala-vim-support' +Bundle 'guns/vim-clojure-static' +Bundle 'chrisbra/csv.vim' + +" +" Development Tool Integration +" +Bundle 'tpope/vim-fugitive' +Bundle 'airblade/vim-gitgutter' " This plugin is slow +Bundle 'pivotal/tmux-config' +Bundle 'tpope/vim-dispatch' + -execute pathogen#infect() syntax on filetype plugin indent on From a86f8fb1f0636bdc67f5775cd055872252d5c062 Mon Sep 17 00:00:00 2001 From: Bryan Goldstein Date: Sat, 7 Sep 2013 21:36:03 -0400 Subject: [PATCH 2/7] Delete all git references to bundle submodules --- bundle/ZoomWin | 1 - bundle/ack.vim | 1 - bundle/ag.vim | 1 - bundle/camelcasemotion | 1 - bundle/cdo/plugin/cdo.vim | 30 - bundle/colorschemes | 1 - bundle/conque_2.0/autoload/conque_term.vim | 1272 ----------- .../conque_2.0/autoload/conque_term/conque.py | 975 --------- .../autoload/conque_term/conque_globals.py | 287 --- .../autoload/conque_term/conque_screen.py | 209 -- .../autoload/conque_term/conque_sole.py | 459 ---- .../conque_term/conque_sole_communicator.py | 183 -- .../conque_term/conque_sole_shared_memory.py | 202 -- .../conque_term/conque_sole_subprocess.py | 753 ------- .../conque_term/conque_sole_wrapper.py | 304 --- .../autoload/conque_term/conque_subprocess.py | 195 -- .../autoload/conque_term/conque_win32_util.py | 473 ----- bundle/conque_2.0/doc/conque_term.txt | 462 ---- bundle/conque_2.0/doc/tags | 38 - bundle/conque_2.0/plugin/conque_term.vim | 139 -- bundle/conque_2.0/syntax/conque_term.vim | 113 - bundle/csv.vim | 1 - bundle/ctrlp | 1 - bundle/cucumbertables/ftplugin | 1 - bundle/diffthese | 1 - bundle/edit-plus | 1 - bundle/gundo | 1 - bundle/hammer.vim | 1 - bundle/handlebars | 1 - .../plugin/insert_mode_background_color.vim | 12 - bundle/j-split | 1 - bundle/matcher | 1 - bundle/matchit/doc/matchit.txt | 406 ---- bundle/matchit/doc/tags | 50 - bundle/matchit/plugin/matchit.vim | 812 ------- bundle/mustache | 1 - bundle/nerdcommenter | 1 - bundle/nerdtree | 1 - bundle/quickfixfix | 1 - bundle/regreplop/plugin/regreplop.vim | 109 - bundle/snipMate/after/plugin/snipMate.vim | 35 - bundle/snipMate/autoload/snipMate.vim | 433 ---- bundle/snipMate/doc/snipMate.txt | 286 --- bundle/snipMate/doc/tags | 33 - bundle/snipMate/ftplugin/html_snip_helper.vim | 10 - bundle/snipMate/plugin/snipMate.vim | 247 --- bundle/snipMate/snippets/_.snippets | 7 - bundle/snipMate/snippets/autoit.snippets | 66 - bundle/snipMate/snippets/c.snippets | 110 - bundle/snipMate/snippets/cpp.snippets | 30 - bundle/snipMate/snippets/html.snippets | 190 -- bundle/snipMate/snippets/java.snippets | 78 - bundle/snipMate/snippets/javascript.snippets | 74 - bundle/snipMate/snippets/mako.snippets | 54 - bundle/snipMate/snippets/objc.snippets | 184 -- bundle/snipMate/snippets/perl.snippets | 91 - bundle/snipMate/snippets/php.snippets | 216 -- bundle/snipMate/snippets/python.snippets | 86 - bundle/snipMate/snippets/ruby.snippets | 420 ---- bundle/snipMate/snippets/sh.snippets | 28 - bundle/snipMate/snippets/snippet.snippets | 7 - bundle/snipMate/snippets/tcl.snippets | 92 - bundle/snipMate/snippets/tex.snippets | 115 - bundle/snipMate/snippets/vim.snippets | 32 - bundle/snipMate/snippets/zsh.snippets | 58 - bundle/snipMate/syntax/snippet.vim | 19 - bundle/supertab | 1 - bundle/syntastic | 1 - bundle/tabular | 1 - bundle/tagbar | 1 - bundle/test_server | 1 - bundle/tmux-config | 1 - bundle/vim-abolish | 1 - bundle/vim-blockle | 1 - bundle/vim-clojure-static | 1 - bundle/vim-coffee-script | 1 - bundle/vim-colors-candycode | 1 - bundle/vim-colors-sampler | 1 - bundle/vim-colors-solarized | 1 - bundle/vim-cucumber | 1 - bundle/vim-cucumber-align-pipes | 1 - bundle/vim-dispatch | 1 - bundle/vim-easymotion/.gitignore | 1 - bundle/vim-easymotion/README.md | 52 - bundle/vim-easymotion/autoload/EasyMotion.vim | 573 ----- bundle/vim-easymotion/doc/easymotion.txt | 319 --- bundle/vim-easymotion/plugin/EasyMotion.vim | 73 - bundle/vim-endwise | 1 - bundle/vim-fugitive | 1 - bundle/vim-gitgutter | 1 - bundle/vim-golang | 1 - bundle/vim-haml | 1 - bundle/vim-irblack | 1 - bundle/vim-javascript | 1 - bundle/vim-markdown | 1 - .../autoload/fuf.vim | 1046 --------- .../autoload/fuf/bookmarkdir.vim | 163 -- .../autoload/fuf/bookmarkfile.vim | 199 -- .../autoload/fuf/buffer.vim | 189 -- .../autoload/fuf/buffertag.vim | 300 --- .../autoload/fuf/callbackfile.vim | 137 -- .../autoload/fuf/callbackitem.vim | 139 -- .../autoload/fuf/changelist.vim | 172 -- .../autoload/fuf/coveragefile.vim | 199 -- .../autoload/fuf/dir.vim | 132 -- .../autoload/fuf/file.vim | 139 -- .../autoload/fuf/givencmd.vim | 123 -- .../autoload/fuf/givendir.vim | 123 -- .../autoload/fuf/givenfile.vim | 121 -- .../autoload/fuf/help.vim | 198 -- .../autoload/fuf/jumplist.vim | 182 -- .../autoload/fuf/line.vim | 135 -- .../autoload/fuf/mrucmd.vim | 134 -- .../autoload/fuf/mrufile.vim | 234 -- .../autoload/fuf/quickfix.vim | 154 -- .../autoload/fuf/tag.vim | 178 -- .../autoload/fuf/taggedfile.vim | 159 -- .../vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.jax | 1405 ------------ .../vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.txt | 1883 ----------------- bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags | 176 -- .../vim-org-vim-fuzzyfinder-4.2.2/doc/tags-ja | 174 -- .../plugin/fuf.vim | 158 -- bundle/vim-org-vim-l9-1.1/autoload/l9.vim | 570 ----- .../vim-org-vim-l9-1.1/autoload/l9/async.py | 92 - .../vim-org-vim-l9-1.1/autoload/l9/async.vim | 67 - .../autoload/l9/quickfix.vim | 107 - .../autoload/l9/tempbuffer.vim | 112 - .../autoload/l9/tempvariables.vim | 60 - bundle/vim-org-vim-l9-1.1/doc/l9.jax | 55 - bundle/vim-org-vim-l9-1.1/doc/l9.txt | 73 - bundle/vim-org-vim-l9-1.1/doc/tags | 9 - bundle/vim-org-vim-l9-1.1/doc/tags-ja | 9 - bundle/vim-org-vim-l9-1.1/plugin/l9.vim | 108 - bundle/vim-powerline | 1 - bundle/vim-qargs | 1 - bundle/vim-rails | 1 - bundle/vim-repeat | 1 - bundle/vim-ruby | 1 - bundle/vim-ruby-refactoring | 1 - bundle/vim-scala | 1 - bundle/vim-slim | 1 - bundle/vim-surround | 1 - bundle/vim-textobj-rubyblock | 1 - bundle/vim-textobj-user | 1 - bundle/vim-tomorrow-theme | 1 - bundle/vim-unimpaired | 1 - bundle/vim-vividchalk | 1 - 147 files changed, 21173 deletions(-) delete mode 160000 bundle/ZoomWin delete mode 160000 bundle/ack.vim delete mode 160000 bundle/ag.vim delete mode 160000 bundle/camelcasemotion delete mode 100644 bundle/cdo/plugin/cdo.vim delete mode 160000 bundle/colorschemes delete mode 100644 bundle/conque_2.0/autoload/conque_term.vim delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_globals.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_screen.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_sole.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_sole_communicator.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_sole_shared_memory.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_sole_subprocess.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_sole_wrapper.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_subprocess.py delete mode 100644 bundle/conque_2.0/autoload/conque_term/conque_win32_util.py delete mode 100644 bundle/conque_2.0/doc/conque_term.txt delete mode 100644 bundle/conque_2.0/doc/tags delete mode 100644 bundle/conque_2.0/plugin/conque_term.vim delete mode 100644 bundle/conque_2.0/syntax/conque_term.vim delete mode 160000 bundle/csv.vim delete mode 160000 bundle/ctrlp delete mode 160000 bundle/cucumbertables/ftplugin delete mode 160000 bundle/diffthese delete mode 160000 bundle/edit-plus delete mode 160000 bundle/gundo delete mode 160000 bundle/hammer.vim delete mode 160000 bundle/handlebars delete mode 100644 bundle/insert_mode_background_color/plugin/insert_mode_background_color.vim delete mode 160000 bundle/j-split delete mode 160000 bundle/matcher delete mode 100644 bundle/matchit/doc/matchit.txt delete mode 100644 bundle/matchit/doc/tags delete mode 100644 bundle/matchit/plugin/matchit.vim delete mode 160000 bundle/mustache delete mode 160000 bundle/nerdcommenter delete mode 160000 bundle/nerdtree delete mode 160000 bundle/quickfixfix delete mode 100644 bundle/regreplop/plugin/regreplop.vim delete mode 100644 bundle/snipMate/after/plugin/snipMate.vim delete mode 100644 bundle/snipMate/autoload/snipMate.vim delete mode 100644 bundle/snipMate/doc/snipMate.txt delete mode 100644 bundle/snipMate/doc/tags delete mode 100644 bundle/snipMate/ftplugin/html_snip_helper.vim delete mode 100644 bundle/snipMate/plugin/snipMate.vim delete mode 100644 bundle/snipMate/snippets/_.snippets delete mode 100644 bundle/snipMate/snippets/autoit.snippets delete mode 100644 bundle/snipMate/snippets/c.snippets delete mode 100644 bundle/snipMate/snippets/cpp.snippets delete mode 100644 bundle/snipMate/snippets/html.snippets delete mode 100644 bundle/snipMate/snippets/java.snippets delete mode 100644 bundle/snipMate/snippets/javascript.snippets delete mode 100644 bundle/snipMate/snippets/mako.snippets delete mode 100644 bundle/snipMate/snippets/objc.snippets delete mode 100644 bundle/snipMate/snippets/perl.snippets delete mode 100644 bundle/snipMate/snippets/php.snippets delete mode 100644 bundle/snipMate/snippets/python.snippets delete mode 100644 bundle/snipMate/snippets/ruby.snippets delete mode 100644 bundle/snipMate/snippets/sh.snippets delete mode 100644 bundle/snipMate/snippets/snippet.snippets delete mode 100644 bundle/snipMate/snippets/tcl.snippets delete mode 100644 bundle/snipMate/snippets/tex.snippets delete mode 100644 bundle/snipMate/snippets/vim.snippets delete mode 100644 bundle/snipMate/snippets/zsh.snippets delete mode 100644 bundle/snipMate/syntax/snippet.vim delete mode 160000 bundle/supertab delete mode 160000 bundle/syntastic delete mode 160000 bundle/tabular delete mode 160000 bundle/tagbar delete mode 160000 bundle/test_server delete mode 160000 bundle/tmux-config delete mode 160000 bundle/vim-abolish delete mode 160000 bundle/vim-blockle delete mode 160000 bundle/vim-clojure-static delete mode 160000 bundle/vim-coffee-script delete mode 160000 bundle/vim-colors-candycode delete mode 160000 bundle/vim-colors-sampler delete mode 160000 bundle/vim-colors-solarized delete mode 160000 bundle/vim-cucumber delete mode 160000 bundle/vim-cucumber-align-pipes delete mode 160000 bundle/vim-dispatch delete mode 100644 bundle/vim-easymotion/.gitignore delete mode 100644 bundle/vim-easymotion/README.md delete mode 100644 bundle/vim-easymotion/autoload/EasyMotion.vim delete mode 100644 bundle/vim-easymotion/doc/easymotion.txt delete mode 100644 bundle/vim-easymotion/plugin/EasyMotion.vim delete mode 160000 bundle/vim-endwise delete mode 160000 bundle/vim-fugitive delete mode 160000 bundle/vim-gitgutter delete mode 160000 bundle/vim-golang delete mode 160000 bundle/vim-haml delete mode 160000 bundle/vim-irblack delete mode 160000 bundle/vim-javascript delete mode 160000 bundle/vim-markdown delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkdir.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkfile.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffer.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffertag.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackfile.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackitem.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/changelist.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/coveragefile.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/dir.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/file.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givencmd.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givendir.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givenfile.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/help.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/jumplist.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/line.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrucmd.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrufile.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/quickfix.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/tag.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/taggedfile.vim delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.jax delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.txt delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags-ja delete mode 100644 bundle/vim-org-vim-fuzzyfinder-4.2.2/plugin/fuf.vim delete mode 100644 bundle/vim-org-vim-l9-1.1/autoload/l9.vim delete mode 100644 bundle/vim-org-vim-l9-1.1/autoload/l9/async.py delete mode 100644 bundle/vim-org-vim-l9-1.1/autoload/l9/async.vim delete mode 100644 bundle/vim-org-vim-l9-1.1/autoload/l9/quickfix.vim delete mode 100644 bundle/vim-org-vim-l9-1.1/autoload/l9/tempbuffer.vim delete mode 100644 bundle/vim-org-vim-l9-1.1/autoload/l9/tempvariables.vim delete mode 100644 bundle/vim-org-vim-l9-1.1/doc/l9.jax delete mode 100644 bundle/vim-org-vim-l9-1.1/doc/l9.txt delete mode 100644 bundle/vim-org-vim-l9-1.1/doc/tags delete mode 100644 bundle/vim-org-vim-l9-1.1/doc/tags-ja delete mode 100644 bundle/vim-org-vim-l9-1.1/plugin/l9.vim delete mode 160000 bundle/vim-powerline delete mode 160000 bundle/vim-qargs delete mode 160000 bundle/vim-rails delete mode 160000 bundle/vim-repeat delete mode 160000 bundle/vim-ruby delete mode 160000 bundle/vim-ruby-refactoring delete mode 160000 bundle/vim-scala delete mode 160000 bundle/vim-slim delete mode 160000 bundle/vim-surround delete mode 160000 bundle/vim-textobj-rubyblock delete mode 160000 bundle/vim-textobj-user delete mode 160000 bundle/vim-tomorrow-theme delete mode 160000 bundle/vim-unimpaired delete mode 160000 bundle/vim-vividchalk diff --git a/bundle/ZoomWin b/bundle/ZoomWin deleted file mode 160000 index cf21ce1f..00000000 --- a/bundle/ZoomWin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cf21ce1f4bfec10fe7e446c08e9e647a2a234e03 diff --git a/bundle/ack.vim b/bundle/ack.vim deleted file mode 160000 index f183a345..00000000 --- a/bundle/ack.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f183a345a0c10caed7684d07dabae33e007c7590 diff --git a/bundle/ag.vim b/bundle/ag.vim deleted file mode 160000 index 36c46816..00000000 --- a/bundle/ag.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36c4681665725426e380f4e77b6a94e1bb0cb61b diff --git a/bundle/camelcasemotion b/bundle/camelcasemotion deleted file mode 160000 index 8db17bde..00000000 --- a/bundle/camelcasemotion +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8db17bdee3f42bd71839ead2a84b2ee1916e45c2 diff --git a/bundle/cdo/plugin/cdo.vim b/bundle/cdo/plugin/cdo.vim deleted file mode 100644 index 31f191b7..00000000 --- a/bundle/cdo/plugin/cdo.vim +++ /dev/null @@ -1,30 +0,0 @@ -" Runs the same command over every entry in the quickfix or location list. -" -" Ex: Find every instance of foo in the app and replace it with bar. -" :Ggrep foo -" :Cdo s/foo/bar/c | update - -function! s:Cdo(command) - crewind - let error_count = len(getqflist()) - let i = 0 - while i < error_count - let i = i + 1 - exe "cc ".i - exe a:command - endwhile -endfunction - -function! s:Ldo(command) - lrewind - let error_count = len(getloclist(0)) - let i = 0 - while i < error_count - let i = i + 1 - exe "ll ".i - exe a:command - endwhile -endfunction - -command! -nargs=1 -bar Cdo :call s:Cdo() -command! -nargs=1 -bar Ldo :call s:Ldo() diff --git a/bundle/colorschemes b/bundle/colorschemes deleted file mode 160000 index f134dd57..00000000 --- a/bundle/colorschemes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f134dd5726732a74e05edacc9a795006b984b82f diff --git a/bundle/conque_2.0/autoload/conque_term.vim b/bundle/conque_2.0/autoload/conque_term.vim deleted file mode 100644 index a0b67906..00000000 --- a/bundle/conque_2.0/autoload/conque_term.vim +++ /dev/null @@ -1,1272 +0,0 @@ -" FILE: autoload/conque_term.vim {{{ -" AUTHOR: Nico Raffo -" WEBSITE: http://conque.googlecode.com -" MODIFIED: 2010-11-15 -" VERSION: 2.0, for Vim 7.0 -" LICENSE: -" Conque - Vim terminal/console emulator -" Copyright (C) 2009-2010 Nico Raffo -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to deal -" in the Software without restriction, including without limitation the rights -" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -" copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -" THE SOFTWARE. -" }}} - -" ********************************************************************************************************** -" **** CROSS-TERMINAL SETTINGS ***************************************************************************** -" ********************************************************************************************************** - -" {{{ - -" path to this file -let s:scriptfile = expand("") -let s:scriptdir = expand(":h") . '/' -let s:scriptdirpy = expand(":h") . '/conque_term/' - -" Extra key codes -let s:input_extra = [] - -let s:term_obj = { 'idx' : 1, 'var' : '', 'is_buffer' : 1, 'active' : 1, 'buffer_name' : '' } -let s:terminals = {} - -let s:save_updatetime = &updatetime - -let s:initialized = 0 - -" }}} - -" ********************************************************************************************************** -" **** SYSTEM DETECTION ************************************************************************************ -" ********************************************************************************************************** - -" {{{ - -function! conque_term#fail(feature) " {{{ - - " create a new buffer - new - setlocal buftype=nofile - setlocal nonumber - setlocal foldcolumn=0 - setlocal wrap - setlocal noswapfile - - " missing vim features - if a:feature == 'python' - - call append('$', 'Conque ERROR: Python interface cannot be loaded') - call append('$', '') - - if !executable("python") - call append('$', 'Your version of Vim appears to be installed without the Python interface. In ') - call append('$', 'addition, you may need to install Python.') - else - call append('$', 'Your version of Vim appears to be installed without the Python interface.') - endif - - call append('$', '') - - if has('unix') == 1 - call append('$', "You are using a Unix-like operating system. Most, if not all, of the popular ") - call append('$', "Linux package managers have Python-enabled Vim available. For example ") - call append('$', "vim-gnome or vim-gtk on Ubuntu will get you everything you need.") - call append('$', "") - call append('$', "If you are compiling Vim from source, make sure you use the --enable-pythoninterp ") - call append('$', "configure option. You will also need to install Python and the Python headers.") - call append('$', "") - call append('$', "If you are using OS X, MacVim will give you Python support by default.") - else - call append('$', "You appear to be using Windows. The official Vim 7.3 installer available at ") - call append('$', "http://www.vim.org comes with the required Python interfaces. You will also ") - call append('$', "need to install Python 2.7 and/or Python 3.1, both available at http://www.python.org") - endif - - elseif a:feature == 'python_exe' - - call append('$', "Conque ERROR: Can't find Python executable") - call append('$', "") - call append('$', "Conque needs to know the full path to python.exe on Windows systems. By default, ") - call append('$', "Conque will check your system path as well as the most common installation path ") - call append('$', "C:\\PythonXX\\. To fix this error either:") - call append('$', "") - call append('$', "Set the g:ConqueTerm_PyExe option in your .vimrc. E.g.") - call append('$', " let g:ConqueTerm_PyExe = 'C:\Program Files\Python27\python.exe'") - call append('$', "") - call append('$', "Add the directory where you installed python to your system path. This isn't a bad ") - call append('$', "idea in general.") - - elseif a:feature == 'ctypes' - - call append('$', 'Conque ERROR: Python cannot load the ctypes module') - call append('$', "") - call append('$', "Conque requires the 'ctypes' python module. This has been a standard module since Python 2.5.") - call append('$', "") - call append('$', "The recommended fix is to make sure you're using the latest official GVim version 7.3, ") - call append('$', "and have at least one of the two compatible versions of Python installed, ") - call append('$', "2.7 or 3.1. You can download the GVim 7.3 installer from http://www.vim.org. You ") - call append('$', "can download the Python 2.7 or 3.1 installer from http://www.python.org") - - endif - -endfunction " }}} - -function! conque_term#dependency_check() " {{{ - - " don't recheck the second time 'round - if s:initialized == 1 - return 1 - endif - - " choose a python version and define a string unicoding function - let s:py = '' - if g:ConqueTerm_PyVersion == 3 - let s:pytest = 'python3' - else - let s:pytest = 'python' - let g:ConqueTerm_PyVersion = 2 - endif - - " first the requested version - if has(s:pytest) - if s:pytest == 'python3' - let s:py = 'py3' - else - let s:py = 'py' - endif - - " otherwise use the other version - else - let s:py_alternate = 5 - g:ConqueTerm_PyVersion - if s:py_alternate == 3 - let s:pytest = 'python3' - else - let s:pytest = 'python' - endif - if has(s:pytest) - echohl WarningMsg | echomsg "Python " . g:ConqueTerm_PyVersion . " interface is not installed, using Python " . s:py_alternate . " instead" | echohl None - let g:ConqueTerm_PyVersion = s:py_alternate - if s:pytest == 'python3' - let s:py = 'py3' - else - let s:py = 'py' - endif - endif - endif - - " test if we actually found a python version - if s:py == '' - call conque_term#fail('python') - return 0 - endif - - " quick and dirty platform declaration - if has('unix') == 1 - let s:platform = 'nix' - sil exe s:py . " CONQUE_PLATFORM = 'nix'" - else - let s:platform = 'dos' - sil exe s:py . " CONQUE_PLATFORM = 'dos'" - endif - - " if we're using Windows, make sure ctypes is available - if s:platform == 'dos' - try - sil exe s:py . " import ctypes" - catch - call conque_term#fail('ctypes') - return 0 - endtry - endif - - " if we're using Windows, make sure we can finde python executable - if s:platform == 'dos' && conque_term#find_python_exe() == '' - call conque_term#fail('python_exe') - return 0 - endif - - " check for global cursorhold/cursormove events - let o = '' - silent redir => o - silent autocmd CursorHoldI,CursorMovedI - redir END - for line in split(o, "\n") - if line =~ '^ ' || line =~ '^--' || line =~ 'matchparen' - continue - endif - echohl WarningMsg | echomsg "Warning: Global CursorHoldI and CursorMovedI autocommands may cause ConqueTerm to run slowly." | echohl None - endfor - - " if we're all good, load python files - call conque_term#load_python() - - return 1 - -endfunction " }}} - -" }}} - -" ********************************************************************************************************** -" **** WINDOWS VK CODES ************************************************************************************ -" ********************************************************************************************************** - -" Windows Virtual Key Codes {{{ -let s:windows_vk = { -\ 'VK_ADD' : 107, -\ 'VK_APPS' : 93, -\ 'VK_ATTN' : 246, -\ 'VK_BACK' : 8, -\ 'VK_BROWSER_BACK' : 166, -\ 'VK_BROWSER_FORWARD' : 167, -\ 'VK_CANCEL' : 3, -\ 'VK_CAPITAL' : 20, -\ 'VK_CLEAR' : 12, -\ 'VK_CONTROL' : 17, -\ 'VK_CONVERT' : 28, -\ 'VK_CRSEL' : 247, -\ 'VK_DECIMAL' : 110, -\ 'VK_DELETE' : 46, -\ 'VK_DIVIDE' : 111, -\ 'VK_DOWN' : 40, -\ 'VK_END' : 35, -\ 'VK_EREOF' : 249, -\ 'VK_ESCAPE' : 27, -\ 'VK_EXECUTE' : 43, -\ 'VK_EXSEL' : 248, -\ 'VK_F1' : 112, -\ 'VK_F10' : 121, -\ 'VK_F11' : 122, -\ 'VK_F12' : 123, -\ 'VK_F13' : 124, -\ 'VK_F14' : 125, -\ 'VK_F15' : 126, -\ 'VK_F16' : 127, -\ 'VK_F17' : 128, -\ 'VK_F18' : 129, -\ 'VK_F19' : 130, -\ 'VK_F2' : 113, -\ 'VK_F20' : 131, -\ 'VK_F21' : 132, -\ 'VK_F22' : 133, -\ 'VK_F23' : 134, -\ 'VK_F24' : 135, -\ 'VK_F3' : 114, -\ 'VK_F4' : 115, -\ 'VK_F5' : 116, -\ 'VK_F6' : 117, -\ 'VK_F7' : 118, -\ 'VK_F8' : 119, -\ 'VK_F9' : 120, -\ 'VK_FINAL' : 24, -\ 'VK_HANGEUL' : 21, -\ 'VK_HANGUL' : 21, -\ 'VK_HANJA' : 25, -\ 'VK_HELP' : 47, -\ 'VK_HOME' : 36, -\ 'VK_INSERT' : 45, -\ 'VK_JUNJA' : 23, -\ 'VK_KANA' : 21, -\ 'VK_KANJI' : 25, -\ 'VK_LBUTTON' : 1, -\ 'VK_LCONTROL' : 162, -\ 'VK_LEFT' : 37, -\ 'VK_LMENU' : 164, -\ 'VK_LSHIFT' : 160, -\ 'VK_LWIN' : 91, -\ 'VK_MBUTTON' : 4, -\ 'VK_MEDIA_NEXT_TRACK' : 176, -\ 'VK_MEDIA_PLAY_PAUSE' : 179, -\ 'VK_MEDIA_PREV_TRACK' : 177, -\ 'VK_MENU' : 18, -\ 'VK_MODECHANGE' : 31, -\ 'VK_MULTIPLY' : 106, -\ 'VK_NEXT' : 34, -\ 'VK_NONAME' : 252, -\ 'VK_NONCONVERT' : 29, -\ 'VK_NUMLOCK' : 144, -\ 'VK_NUMPAD0' : 96, -\ 'VK_NUMPAD1' : 97, -\ 'VK_NUMPAD2' : 98, -\ 'VK_NUMPAD3' : 99, -\ 'VK_NUMPAD4' : 100, -\ 'VK_NUMPAD5' : 101, -\ 'VK_NUMPAD6' : 102, -\ 'VK_NUMPAD7' : 103, -\ 'VK_NUMPAD8' : 104, -\ 'VK_NUMPAD9' : 105, -\ 'VK_OEM_CLEAR' : 254, -\ 'VK_PA1' : 253, -\ 'VK_PAUSE' : 19, -\ 'VK_PLAY' : 250, -\ 'VK_PRINT' : 42, -\ 'VK_PRIOR' : 33, -\ 'VK_PROCESSKEY' : 229, -\ 'VK_RBUTTON' : 2, -\ 'VK_RCONTROL' : 163, -\ 'VK_RETURN' : 13, -\ 'VK_RIGHT' : 39, -\ 'VK_RMENU' : 165, -\ 'VK_RSHIFT' : 161, -\ 'VK_RWIN' : 92, -\ 'VK_SCROLL' : 145, -\ 'VK_SELECT' : 41, -\ 'VK_SEPARATOR' : 108, -\ 'VK_SHIFT' : 16, -\ 'VK_SNAPSHOT' : 44, -\ 'VK_SPACE' : 32, -\ 'VK_SUBTRACT' : 109, -\ 'VK_TAB' : 9, -\ 'VK_UP' : 38, -\ 'VK_VOLUME_DOWN' : 174, -\ 'VK_VOLUME_MUTE' : 173, -\ 'VK_VOLUME_UP' : 175, -\ 'VK_XBUTTON1' : 5, -\ 'VK_XBUTTON2' : 6, -\ 'VK_ZOOM' : 251 -\ } -" }}} - -" ********************************************************************************************************** -" **** ACTUAL CONQUE FUNCTIONS! *************************************************************************** -" ********************************************************************************************************** - -" {{{ - -" launch conque -function! conque_term#open(...) "{{{ - let command = get(a:000, 0, '') - let hooks = get(a:000, 1, []) - let return_to_current = get(a:000, 2, 0) - let is_buffer = get(a:000, 3, 1) - - " dependency check - if conque_term#dependency_check() == 0 - return 0 - endif - - " switch to buffer if needed - if is_buffer && return_to_current - let save_sb = &switchbuf - - "use an agressive sb option - sil set switchbuf=usetab - - " current buffer name - let current_buffer = bufname("%") - endif - - " bare minimum validation - if s:py == '' - echohl WarningMsg | echomsg "Conque requires the Python interface to be installed" | echohl None - return 0 - endif - if empty(command) - echohl WarningMsg | echomsg "No command found" | echohl None - return 0 - else - let l:cargs = split(command, '[^\\]\@<=\s') - let l:cargs[0] = substitute(l:cargs[0], '\\ ', ' ', 'g') - if !executable(l:cargs[0]) - echohl WarningMsg | echomsg "Not an executable: " . l:cargs[0] | echohl None - return 0 - endif - endif - - let g:ConqueTerm_Idx += 1 - let g:ConqueTerm_Var = 'ConqueTerm_' . g:ConqueTerm_Idx - let g:ConqueTerm_BufName = substitute(command, ' ', '\\ ', 'g') . "\\ -\\ " . g:ConqueTerm_Idx - - " initialize global mappings if needed - call conque_term#init() - - " set buffer window options - if is_buffer - call conque_term#set_buffer_settings(command, hooks) - - let b:ConqueTerm_Idx = g:ConqueTerm_Idx - let b:ConqueTerm_Var = g:ConqueTerm_Var - endif - - " save handle - let t_obj = conque_term#create_terminal_object(g:ConqueTerm_Idx, is_buffer, g:ConqueTerm_BufName) - let s:terminals[g:ConqueTerm_Idx] = t_obj - - " open command - try - let l:config = '{"color":' . string(g:ConqueTerm_Color) . ',"TERM":"' . g:ConqueTerm_TERM . '"}' - if s:platform == 'nix' - execute s:py . ' ' . g:ConqueTerm_Var . ' = Conque()' - execute s:py . ' ' . g:ConqueTerm_Var . ".open('" . conque_term#python_escape(command) . "', " . l:config . ")" - else - " find python.exe and communicator - let py_exe = conque_term#python_escape(conque_term#find_python_exe()) - let py_vim = conque_term#python_escape(s:scriptdirpy . 'conque_sole_communicator.py') - if py_exe == '' - return 0 - endif - execute s:py . ' ' . g:ConqueTerm_Var . ' = ConqueSole()' - execute s:py . ' ' . g:ConqueTerm_Var . ".open('" . conque_term#python_escape(command) . "', " . l:config . ", '" . py_exe . "', '" . py_vim . "')" - - "call conque_term#init_conceal_color() - endif - catch - echohl WarningMsg | echomsg "An error occurred: " . command | echohl None - return - endtry - - " set buffer mappings and auto commands - if is_buffer - call conque_term#set_mappings('start') - endif - - " switch to buffer if needed - if is_buffer && return_to_current - " jump back to code buffer - sil exe ":sb " . current_buffer - sil exe ":set switchbuf=" . save_sb - elseif is_buffer - startinsert! - endif - - return t_obj -endfunction "}}} - -" open(), but no buffer -function! conque_term#subprocess(command) " {{{ - - let t_obj = conque_term#open(a:command, [], 0, 0) - if !exists('b:ConqueTerm_Var') - call conque_term#on_blur() - sil exe s:py . ' ' . g:ConqueTerm_Var . '.idle()' - endif - return t_obj - -endfunction " }}} - -" set buffer options -function! conque_term#set_buffer_settings(command, pre_hooks) "{{{ - - " optional hooks to execute, e.g. 'split' - for h in a:pre_hooks - sil exe h - endfor - sil exe 'edit ++enc=utf-8 ' . g:ConqueTerm_BufName - - " showcmd gets altered by nocompatible - let sc_save = &showcmd - - " buffer settings - setlocal fileencoding=utf-8 " file encoding, even tho there's no file - setlocal nocompatible " conque won't work in compatible mode - setlocal nopaste " conque won't work in paste mode - setlocal buftype=nofile " this buffer is not a file, you can't save it - setlocal nonumber " hide line numbers - if v:version >= 703 - setlocal norelativenumber " hide relative line numbers (VIM >= 7.3) - endif - setlocal foldcolumn=0 " reasonable left margin - setlocal nowrap " default to no wrap (esp with MySQL) - setlocal noswapfile " don't bother creating a .swp file - setlocal scrolloff=0 " don't use buffer lines. it makes the 'clear' command not work as expected - setlocal sidescrolloff=0 " don't use buffer lines. it makes the 'clear' command not work as expected - setlocal sidescroll=1 " don't use buffer lines. it makes the 'clear' command not work as expected - setlocal foldmethod=manual " don't fold on {{{}}} and stuff - setlocal bufhidden=hide " when buffer is no longer displayed, don't wipe it out - setlocal noreadonly " this is not actually a readonly buffer - if v:version >= 703 - setlocal conceallevel=3 - setlocal concealcursor=nic - endif - setfiletype conque_term " useful - sil exe "setlocal syntax=" . g:ConqueTerm_Syntax - - " reset showcmd - if sc_save - set showcmd - else - set noshowcmd - endif - - " temporary global settings go in here - call conque_term#on_focus(1) - -endfunction " }}} - -" set key mappings and auto commands -function! conque_term#set_mappings(action) "{{{ - - " set action {{{ - if a:action == 'toggle' - if exists('b:conque_on') && b:conque_on == 1 - let l:action = 'stop' - echohl WarningMsg | echomsg "Terminal is paused" | echohl None - else - let l:action = 'start' - echohl WarningMsg | echomsg "Terminal is resumed" | echohl None - endif - else - let l:action = a:action - endif - - " if mappings are being removed, add 'un' - let map_modifier = 'nore' - if l:action == 'stop' - let map_modifier = 'un' - endif - " }}} - - " auto commands {{{ - if l:action == 'stop' - execute 'autocmd! ' . b:ConqueTerm_Var - - else - execute 'augroup ' . b:ConqueTerm_Var - - " handle unexpected closing of shell, passes HUP to parent and all child processes - execute 'autocmd ' . b:ConqueTerm_Var . ' BufUnload ' . s:py . ' ' . b:ConqueTerm_Var . '.close()' - - " check for resized/scrolled buffer when entering buffer - execute 'autocmd ' . b:ConqueTerm_Var . ' BufEnter ' . s:py . ' ' . b:ConqueTerm_Var . '.update_window_size()' - execute 'autocmd ' . b:ConqueTerm_Var . ' VimResized ' . s:py . ' ' . b:ConqueTerm_Var . '.update_window_size()' - - " set/reset updatetime on entering/exiting buffer - execute 'autocmd ' . b:ConqueTerm_Var . ' BufEnter call conque_term#on_focus()' - execute 'autocmd ' . b:ConqueTerm_Var . ' BufLeave call conque_term#on_blur()' - - " reposition cursor when going into insert mode - execute 'autocmd ' . b:ConqueTerm_Var . ' InsertEnter ' . s:py . ' ' . b:ConqueTerm_Var . '.insert_enter()' - - " poll for more output - sil execute 'autocmd ' . b:ConqueTerm_Var . ' CursorHoldI ' . s:py . ' ' . b:ConqueTerm_Var . '.auto_read()' - endif - " }}} - - " map ASCII 1-31 {{{ - for c in range(1, 31) - " - if c == 27 || c == 3 - continue - endif - if l:action == 'start' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(chr(' . c . '))' - else - sil exe 'i' . map_modifier . 'map ' - endif - endfor - " bonus mapping: send in normal mode to terminal as well for panic interrupts - if l:action == 'start' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(chr(3))' - sil exe 'n' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(chr(3))' - else - sil exe 'i' . map_modifier . 'map ' - sil exe 'n' . map_modifier . 'map ' - endif - - " leave insert mode - if !exists('g:ConqueTerm_EscKey') || g:ConqueTerm_EscKey == '' - " use to send to terminal - if l:action == 'start' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(chr(27))' - else - sil exe 'i' . map_modifier . 'map ' - endif - else - " use to send to terminal - if l:action == 'start' - sil exe 'i' . map_modifier . 'map ' . g:ConqueTerm_EscKey . ' ' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(chr(27))' - else - sil exe 'i' . map_modifier . 'map ' . g:ConqueTerm_EscKey - sil exe 'i' . map_modifier . 'map ' - endif - endif - - " Map in insert mode - if exists('g:ConqueTerm_CWInsert') && g:ConqueTerm_CWInsert == 1 - inoremap j j - inoremap k k - inoremap h h - inoremap l l - inoremap w w - endif - " }}} - - " map ASCII 33-127 {{{ - for i in range(33, 127) - " - if i == 124 - if l:action == 'start' - sil exe "i" . map_modifier . "map :" . s:py . ' ' . b:ConqueTerm_Var . ".write(chr(124))" - else - sil exe "i" . map_modifier . "map " - endif - continue - endif - if l:action == 'start' - sil exe "i" . map_modifier . "map " . nr2char(i) . " :" . s:py . ' ' . b:ConqueTerm_Var . ".write(chr(" . i . "))" - else - sil exe "i" . map_modifier . "map " . nr2char(i) - endif - endfor - " }}} - - " map Latin-1 128-255 {{{ - for i in range(128, 255) - if l:action == 'start' - sil exe "i" . map_modifier . "map " . nr2char(i) . " :" . s:py . ' ' . b:ConqueTerm_Var . ".write_latin1(chr(" . i . "))" - else - sil exe "i" . map_modifier . "map " . nr2char(i) - endif - endfor - " }}} - - " Special keys {{{ - if l:action == 'start' - if s:platform == 'nix' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x08")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(" ")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[A")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[B")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[C")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[D")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1bOH")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1bOF")' - else - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x08")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write(" ")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_UP . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_DOWN . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_RIGHT . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_LEFT . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_DELETE . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_HOME . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_END . ')' - endif - else - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - endif - " }}} - - " keys {{{ - if g:ConqueTerm_SendFunctionKeys - if l:action == 'start' - if s:platform == 'nix' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[11~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[12~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("1b[13~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[14~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[15~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[17~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[18~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[19~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[20~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[21~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[23~")' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write("\x1b[24~")' - else - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F1 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F2 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F3 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F4 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F5 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F6 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F7 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F8 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F9 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F10 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F11 . ')' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . '.write_vk(' . s:windows_vk.VK_F12 . ')' - endif - else - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - endif - endif - " }}} - - " send selected text into conque {{{ - if l:action == 'start' - sil exe 'v' . map_modifier . 'map ' . g:ConqueTerm_SendVisKey . ' :call conque_term#send_selected(visualmode())' - endif - " }}} - - " remap paste keys {{{ - if l:action == 'start' - sil exe 'n' . map_modifier . 'map p :' . s:py . ' ' . b:ConqueTerm_Var . '.write(vim.eval("@@"))a' - sil exe 'n' . map_modifier . 'map P :' . s:py . ' ' . b:ConqueTerm_Var . '.write(vim.eval("@@"))a' - sil exe 'n' . map_modifier . 'map ]p :' . s:py . ' ' . b:ConqueTerm_Var . '.write(vim.eval("@@"))a' - sil exe 'n' . map_modifier . 'map [p :' . s:py . ' ' . b:ConqueTerm_Var . '.write(vim.eval("@@"))a' - else - sil exe 'n' . map_modifier . 'map p' - sil exe 'n' . map_modifier . 'map P' - sil exe 'n' . map_modifier . 'map ]p' - sil exe 'n' . map_modifier . 'map [p' - endif - if has('gui_running') == 1 - if l:action == 'start' - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . ".write(vim.eval('@+'))a" - sil exe 'i' . map_modifier . 'map :' . s:py . ' ' . b:ConqueTerm_Var . ".write(vim.eval('@+'))a" - else - sil exe 'i' . map_modifier . 'map ' - sil exe 'i' . map_modifier . 'map ' - endif - endif - " }}} - - " disable other normal mode keys which insert text {{{ - if l:action == 'start' - sil exe 'n' . map_modifier . 'map r :echo "Replace mode disabled in shell."' - sil exe 'n' . map_modifier . 'map R :echo "Replace mode disabled in shell."' - sil exe 'n' . map_modifier . 'map c :echo "Change mode disabled in shell."' - sil exe 'n' . map_modifier . 'map C :echo "Change mode disabled in shell."' - sil exe 'n' . map_modifier . 'map s :echo "Change mode disabled in shell."' - sil exe 'n' . map_modifier . 'map S :echo "Change mode disabled in shell."' - else - sil exe 'n' . map_modifier . 'map r' - sil exe 'n' . map_modifier . 'map R' - sil exe 'n' . map_modifier . 'map c' - sil exe 'n' . map_modifier . 'map C' - sil exe 'n' . map_modifier . 'map s' - sil exe 'n' . map_modifier . 'map S' - endif - " }}} - - " user defined mappings {{{ - for [map_from, map_to] in s:input_extra - if l:action == 'start' - sil exe 'i' . map_modifier . 'map ' . map_from . ' :' . s:py . ' ' . b:ConqueTerm_Var . ".write('" . conque_term#python_escape(map_to) . "')" - else - sil exe 'i' . map_modifier . 'map ' . map_from - endif - endfor - " }}} - - " set conque as on or off {{{ - if l:action == 'start' - let b:conque_on = 1 - else - let b:conque_on = 0 - endif - " }}} - - " map command to toggle terminal key mappings {{{ - if a:action == 'start' - sil exe 'nnoremap ' . g:ConqueTerm_ToggleKey . ' :call conque_term#set_mappings("toggle")' - endif - " }}} - -endfunction " }}} - -" Initialize global mappings. Should only be called once per Vim session -function! conque_term#init() " {{{ - - if s:initialized == 1 - return - endif - - augroup ConqueTerm - autocmd ConqueTerm VimLeave * call conque_term#close_all() - - " read more output when this isn't the current buffer - if g:ConqueTerm_ReadUnfocused == 1 - autocmd ConqueTerm CursorHold * call conque_term#read_all(0) - endif - - let s:initialized = 1 - -endfunction " }}} - -" read from all known conque buffers -function! conque_term#read_all(insert_mode) "{{{ - - for i in range(1, g:ConqueTerm_Idx) - try - if !s:terminals[i].active - continue - endif - - let output = s:terminals[i].read(1) - - if !s:terminals[i].is_buffer && exists('*s:terminals[i].callback') - call s:terminals[i].callback(output) - endif - catch - " probably a deleted buffer - endtry - endfor - - " restart updatetime - if a:insert_mode - call feedkeys("\f\e", "n") - else - call feedkeys("f\e", "n") - endif - -endfunction "}}} - -" close all subprocesses -function! conque_term#close_all() "{{{ - - for i in range(1, g:ConqueTerm_Idx) - try - call s:terminals[i].close() - catch - " probably a deleted buffer - endtry - endfor - -endfunction "}}} - -" util function to add enough \s to pass a string to python -function! conque_term#python_escape(input) "{{{ - let l:cleaned = a:input - let l:cleaned = substitute(l:cleaned, '\\', '\\\\', 'g') - let l:cleaned = substitute(l:cleaned, '\n', '\\n', 'g') - let l:cleaned = substitute(l:cleaned, '\r', '\\r', 'g') - let l:cleaned = substitute(l:cleaned, "'", "\\\\'", 'g') - return l:cleaned -endfunction "}}} - -" gets called when user enters conque buffer. -" Useful for making temp changes to global config -function! conque_term#on_focus(...) " {{{ - - let startup = get(a:000, 0, 0) - - " Disable NeoComplCache. It has global hooks on CursorHold and CursorMoved :-/ - let s:NeoComplCache_WasEnabled = exists(':NeoComplCacheLock') - if s:NeoComplCache_WasEnabled == 2 - NeoComplCacheLock - endif - - if g:ConqueTerm_ReadUnfocused == 1 - autocmd! ConqueTerm CursorHoldI * - autocmd! ConqueTerm CursorHold * - endif - - " set poll interval to 50ms - set updatetime=50 - - if startup == 0 && exists('b:ConqueTerm_Var') - sil exe s:py . ' ' . g:ConqueTerm_Var . '.resume()' - endif - - " if configured, go into insert mode - if g:ConqueTerm_InsertOnEnter == 1 - startinsert! - endif - -endfunction " }}} - -" gets called when user exits conque buffer. -" Useful for resetting changes to global config -function! conque_term#on_blur() " {{{ - " re-enable NeoComplCache if needed - if exists('s:NeoComplCache_WasEnabled') && exists(':NeoComplCacheUnlock') && s:NeoComplCache_WasEnabled == 2 - NeoComplCacheUnlock - endif - - if exists('b:ConqueTerm_Var') - sil exe s:py . ' ' . b:ConqueTerm_Var . '.idle()' - endif - - " reset poll interval - if g:ConqueTerm_ReadUnfocused == 1 - set updatetime=1000 - autocmd ConqueTerm CursorHoldI * call conque_term#read_all(1) - autocmd ConqueTerm CursorHold * call conque_term#read_all(0) - elseif exists('s:save_updatetime') - exe 'set updatetime=' . s:save_updatetime - else - set updatetime=2000 - endif -endfunction " }}} - -" bell event (^G) -function! conque_term#bell() " {{{ - echohl WarningMsg | echomsg "BELL!" | echohl None -endfunction " }}} - -" }}} - -" ********************************************************************************************************** -" **** Windows only functions ****************************************************************************** -" ********************************************************************************************************** - -" {{{ - -" find python.exe in windows -function! conque_term#find_python_exe() " {{{ - - " first check configuration for custom value - if g:ConqueTerm_PyExe != '' && executable(g:ConqueTerm_PyExe) - return g:ConqueTerm_PyExe - endif - - let sys_paths = split($PATH, ';') - - " get exact python version - sil exe ':' . s:py . ' import sys, vim' - sil exe ':' . s:py . ' vim.command("let g:ConqueTerm_PyVersion = " + str(sys.version_info[0]) + str(sys.version_info[1]))' - - " ... and add to path list - call add(sys_paths, 'C:\Python' . g:ConqueTerm_PyVersion) - call reverse(sys_paths) - - " check if python.exe is in paths - for path in sys_paths - let cand = path . '\' . 'python.exe' - if executable(cand) - return cand - endif - endfor - - echohl WarningMsg | echomsg "Unable to find python.exe, see :help ConqueTerm_PythonExe for more information" | echohl None - - return '' - -endfunction " }}} - -" initialize concealed colors -function! conque_term#init_conceal_color() " {{{ - - highlight link ConqueCCBG Normal - - " foreground colors, low intensity - syn region ConqueCCF000 matchgroup=ConqueConceal start="\esf000;" end="\eef000;" concealends contains=ConqueCCBG - syn region ConqueCCF00c matchgroup=ConqueConceal start="\esf00c;" end="\eef00c;" concealends contains=ConqueCCBG - syn region ConqueCCF0c0 matchgroup=ConqueConceal start="\esf0c0;" end="\eef0c0;" concealends contains=ConqueCCBG - syn region ConqueCCF0cc matchgroup=ConqueConceal start="\esf0cc;" end="\eef0cc;" concealends contains=ConqueCCBG - syn region ConqueCCFc00 matchgroup=ConqueConceal start="\esfc00;" end="\eefc00;" concealends contains=ConqueCCBG - syn region ConqueCCFc0c matchgroup=ConqueConceal start="\esfc0c;" end="\eefc0c;" concealends contains=ConqueCCBG - syn region ConqueCCFcc0 matchgroup=ConqueConceal start="\esfcc0;" end="\eefcc0;" concealends contains=ConqueCCBG - syn region ConqueCCFccc matchgroup=ConqueConceal start="\esfccc;" end="\eefccc;" concealends contains=ConqueCCBG - - " foreground colors, high intensity - syn region ConqueCCF000 matchgroup=ConqueConceal start="\esf000;" end="\eef000;" concealends contains=ConqueCCBG - syn region ConqueCCF00f matchgroup=ConqueConceal start="\esf00f;" end="\eef00f;" concealends contains=ConqueCCBG - syn region ConqueCCF0f0 matchgroup=ConqueConceal start="\esf0f0;" end="\eef0f0;" concealends contains=ConqueCCBG - syn region ConqueCCF0ff matchgroup=ConqueConceal start="\esf0ff;" end="\eef0ff;" concealends contains=ConqueCCBG - syn region ConqueCCFf00 matchgroup=ConqueConceal start="\esff00;" end="\eeff00;" concealends contains=ConqueCCBG - syn region ConqueCCFf0f matchgroup=ConqueConceal start="\esff0f;" end="\eeff0f;" concealends contains=ConqueCCBG - syn region ConqueCCFff0 matchgroup=ConqueConceal start="\esfff0;" end="\eefff0;" concealends contains=ConqueCCBG - syn region ConqueCCFfff matchgroup=ConqueConceal start="\esffff;" end="\eeffff;" concealends contains=ConqueCCBG - - " background colors, low intensity - syn region ConqueCCB000 matchgroup=ConqueConceal start="\esb000;" end="\eeb000;" concealends - syn region ConqueCCB00c matchgroup=ConqueConceal start="\esb00c;" end="\eeb00c;" concealends - syn region ConqueCCB0c0 matchgroup=ConqueConceal start="\esb0c0;" end="\eeb0c0;" concealends - syn region ConqueCCB0cc matchgroup=ConqueConceal start="\esb0cc;" end="\eeb0cc;" concealends - syn region ConqueCCBc00 matchgroup=ConqueConceal start="\esbc00;" end="\eebc00;" concealends - syn region ConqueCCBc0c matchgroup=ConqueConceal start="\esbc0c;" end="\eebc0c;" concealends - syn region ConqueCCBcc0 matchgroup=ConqueConceal start="\esbcc0;" end="\eebcc0;" concealends - syn region ConqueCCBccc matchgroup=ConqueConceal start="\esbccc;" end="\eebccc;" concealends - - " background colors, high intensity - syn region ConqueCCB000 matchgroup=ConqueConceal start="\esb000;" end="\eeb000;" concealends - syn region ConqueCCB00f matchgroup=ConqueConceal start="\esb00f;" end="\eeb00f;" concealends - syn region ConqueCCB0f0 matchgroup=ConqueConceal start="\esb0f0;" end="\eeb0f0;" concealends - syn region ConqueCCB0ff matchgroup=ConqueConceal start="\esb0ff;" end="\eeb0ff;" concealends - syn region ConqueCCBf00 matchgroup=ConqueConceal start="\esbf00;" end="\eebf00;" concealends - syn region ConqueCCBf0f matchgroup=ConqueConceal start="\esbf0f;" end="\eebf0f;" concealends - syn region ConqueCCBff0 matchgroup=ConqueConceal start="\esbff0;" end="\eebff0;" concealends - syn region ConqueCCBfff matchgroup=ConqueConceal start="\esbfff;" end="\eebfff;" concealends - - - """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - - "highlight link ConqueCCConceal Error - - " foreground colors, low intensity - highlight ConqueCCF000 guifg=#000000 - highlight ConqueCCF00c guifg=#0000cc - highlight ConqueCCF0c0 guifg=#00cc00 - highlight ConqueCCF0cc guifg=#00cccc - highlight ConqueCCFc00 guifg=#cc0000 - highlight ConqueCCFc0c guifg=#cc00cc - highlight ConqueCCFcc0 guifg=#cccc00 - highlight ConqueCCFccc guifg=#cccccc - - " foreground colors, high intensity - highlight ConqueCCF000 guifg=#000000 - highlight ConqueCCF00f guifg=#0000ff - highlight ConqueCCF0f0 guifg=#00ff00 - highlight ConqueCCF0ff guifg=#00ffff - highlight ConqueCCFf00 guifg=#ff0000 - highlight ConqueCCFf0f guifg=#ff00ff - highlight ConqueCCFff0 guifg=#ffff00 - highlight ConqueCCFfff guifg=#ffffff - - " background colors, low intensity - highlight ConqueCCB000 guibg=#000000 - highlight ConqueCCB00c guibg=#0000cc - highlight ConqueCCB0c0 guibg=#00cc00 - highlight ConqueCCB0cc guibg=#00cccc - highlight ConqueCCBc00 guibg=#cc0000 - highlight ConqueCCBc0c guibg=#cc00cc - highlight ConqueCCBcc0 guibg=#cccc00 - highlight ConqueCCBccc guibg=#cccccc - - " background colors, high intensity - highlight ConqueCCB000 guibg=#000000 - highlight ConqueCCB00f guibg=#0000ff - highlight ConqueCCB0f0 guibg=#00ff00 - highlight ConqueCCB0ff guibg=#00ffff - highlight ConqueCCBf00 guibg=#ff0000 - highlight ConqueCCBf0f guibg=#ff00ff - highlight ConqueCCBff0 guibg=#ffff00 - highlight ConqueCCBfff guibg=#ffffff - - " background colors, low intensity - highlight link ConqueCCB000 ConqueCCBG - highlight link ConqueCCB00c ConqueCCBG - highlight link ConqueCCB0c0 ConqueCCBG - highlight link ConqueCCB0cc ConqueCCBG - highlight link ConqueCCBc00 ConqueCCBG - highlight link ConqueCCBc0c ConqueCCBG - highlight link ConqueCCBcc0 ConqueCCBG - highlight link ConqueCCBccc ConqueCCBG - - " background colors, high intensity - highlight link ConqueCCB000 ConqueCCBG - highlight link ConqueCCB00f ConqueCCBG - highlight link ConqueCCB0f0 ConqueCCBG - highlight link ConqueCCB0ff ConqueCCBG - highlight link ConqueCCBf00 ConqueCCBG - highlight link ConqueCCBf0f ConqueCCBG - highlight link ConqueCCBff0 ConqueCCBG - highlight link ConqueCCBfff ConqueCCBG - -endfunction " }}} - -" }}} - -" ********************************************************************************************************** -" **** Add-on features ************************************************************************************* -" ********************************************************************************************************** - -" send selected text from another buffer -function! conque_term#send_selected(type) "{{{ - let reg_save = @@ - - " save user's sb settings - let sb_save = &switchbuf - set switchbuf=usetab - - " yank current selection - sil exe "normal! `<" . a:type . "`>y" - - " format yanked text - let @@ = substitute(@@, '^[\r\n]*', '', '') - let @@ = substitute(@@, '[\r\n]*$', '', '') - - " execute yanked text - sil exe ":sb " . g:ConqueTerm_BufName - sil exe s:py . ' ' . g:ConqueTerm_Var . '.paste_selection()' - - " reset original values - let @@ = reg_save - sil exe 'set switchbuf=' . sb_save - - " scroll buffer left - startinsert! - normal 0zH -endfunction "}}} - -" ********************************************************************************************************** -" **** "API" functions ************************************************************************************* -" ********************************************************************************************************** - -" See doc/conque_term.txt for full documentation {{{ - -" Write to a conque terminal buffer -function! s:term_obj.write(text) dict " {{{ - - " if we're not in terminal buffer, pass flag to not position the cursor - sil exe s:py . ' ' . self.var . '.write(vim.eval("a:text"), False, False)' - -endfunction " }}} - -" same as write() but adds a newline -function! s:term_obj.writeln(text) dict " {{{ - - call self.write(a:text . "\r") - -endfunction " }}} - -" read from terminal buffer and return string -function! s:term_obj.read(...) dict " {{{ - - let read_time = get(a:000, 0, 1) - let update_buffer = get(a:000, 1, self.is_buffer) - - if update_buffer - let up_py = 'True' - else - let up_py = 'False' - endif - - " figure out if we're in the buffer we're updating - if exists('b:ConqueTerm_Var') && b:ConqueTerm_Var == self.var - let in_buffer = 1 - else - let in_buffer = 0 - endif - - let output = '' - - " read! - sil exec s:py . " conque_tmp = " . self.var . ".read(timeout = " . read_time . ", set_cursor = False, return_output = True, update_buffer = " . up_py . ")" - - " ftw! - try - let pycode = "\nif conque_tmp:\n conque_tmp = re.sub('\\\\\\\\', '\\\\\\\\\\\\\\\\', conque_tmp)\n conque_tmp = re.sub('\"', '\\\\\\\\\"', conque_tmp)\n vim.command('let output = \"' + conque_tmp + '\"')\n" - sil exec s:py . pycode - catch - " d'oh - endtry - - return output - -endfunction " }}} - -" set output callback -function! s:term_obj.set_callback(callback_func) dict " {{{ - - let s:terminals[self.idx].callback = function(a:callback_func) - -endfunction " }}} - -" close subprocess with ABORT signal -function! s:term_obj.close() dict " {{{ - - try - sil exe s:py . ' ' . self.var . '.abort()' - catch - " probably already dead - endtry - - if self.is_buffer - call conque_term#set_mappings('stop') - if exists('g:ConqueTerm_CloseOnEnd') && g:ConqueTerm_CloseOnEnd - sil exe 'bwipeout! ' . self.buffer_name - stopinsert! - endif - endif - -endfunction " }}} - -" create a new terminal object -function! conque_term#create_terminal_object(...) " {{{ - - " find conque buffer to update - let buf_num = get(a:000, 0, 0) - if buf_num > 0 - let pvar = 'ConqueTerm_' . buf_num - elseif exists('b:ConqueTerm_Var') - let pvar = b:ConqueTerm_Var - let buf_num = b:ConqueTerm_Idx - else - let pvar = g:ConqueTerm_Var - let buf_num = g:ConqueTerm_Idx - endif - - " is ther a buffer? - let is_buffer = get(a:000, 1, 1) - - " the buffer name - let bname = get(a:000, 2, '') - - let l:t_obj = copy(s:term_obj) - let l:t_obj.is_buffer = is_buffer - let l:t_obj.idx = buf_num - let l:t_obj.buffer_name = bname - let l:t_obj.var = pvar - - return l:t_obj - -endfunction " }}} - -" get an existing terminal instance -function! conque_term#get_instance(...) " {{{ - - " find conque buffer to update - let buf_num = get(a:000, 0, 0) - - if exists('s:terminals[buf_num]') - - elseif exists('b:ConqueTerm_Var') - let buf_num = b:ConqueTerm_Idx - else - let buf_num = g:ConqueTerm_Idx - endif - - return s:terminals[buf_num] - -endfunction " }}} - -" add a new default mapping -function! conque_term#imap(map_from, map_to) " {{{ - call add(s:input_extra, [a:map_from, a:map_to]) -endfunction " }}} - -" add a list of new default mappings -function! conque_term#imap_list(map_list) " {{{ - call extend(s:input_extra, a:map_list) -endfunction " }}} - -" }}} - -" ********************************************************************************************************** -" **** PYTHON ********************************************************************************************** -" ********************************************************************************************************** - -function! conque_term#load_python() " {{{ - - exec s:py . "file " . s:scriptdirpy . "conque_globals.py" - exec s:py . "file " . s:scriptdirpy . "conque.py" - exec s:py . "file " . s:scriptdirpy . "conque_screen.py" - exec s:py . "file " . s:scriptdirpy . "conque_subprocess.py" - if s:platform == 'dos' - exec s:py . "file " . s:scriptdirpy . "conque_win32_util.py" - exec s:py . "file " . s:scriptdirpy . "conque_sole_shared_memory.py" - exec s:py . "file " . s:scriptdirpy . "conque_sole.py" - exec s:py . "file " . s:scriptdirpy . "conque_sole_wrapper.py" - endif - -endfunction " }}} - -" vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque.py b/bundle/conque_2.0/autoload/conque_term/conque.py deleted file mode 100644 index 6c7b2fc5..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque.py +++ /dev/null @@ -1,975 +0,0 @@ -# FILE: autoload/conque_term/conque.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -""" -Vim terminal emulator. - -The Conque does two things. First, it handles communication between Vim and -the terminal/console subprocess. For example, Vim uses the Conque.write() -method to send input, and Conque.read() to update the terminal buffer. - -Second, the Conque class handles Unix terminal escape sequence parsing. -""" - -import vim -import re -import math - - - - -class Conque: - - # CLASS PROPERTIES {{{ - - # screen object - screen = None - - # subprocess object - proc = None - - # terminal dimensions and scrolling region - columns = 80 # same as $COLUMNS - lines = 24 # same as $LINES - working_columns = 80 # can be changed by CSI ? 3 l/h - working_lines = 24 # can be changed by CSI r - - # top/bottom of the scroll region - top = 1 # relative to top of screen - bottom = 24 # relative to top of screen - - # cursor position - l = 1 # current cursor line - c = 1 # current cursor column - - # autowrap mode - autowrap = True - - # absolute coordinate mode - absolute_coords = True - - # tabstop positions - tabstops = [] - - # enable colors - enable_colors = True - - # color changes - color_changes = {} - - # color history - color_history = {} - - # don't wrap table output - unwrap_tables = True - - # wrap CUF/CUB around line breaks - wrap_cursor = False - - # do we need to move the cursor? - cursor_set = False - - # current character set, ascii or graphics - character_set = 'ascii' - - # used for auto_read actions - read_count = 0 - - # }}} - - # constructor - def __init__(self): # {{{ - self.screen = ConqueScreen() - # }}} - - # start program and initialize this instance - def open(self, command, options): # {{{ - - # int vars - self.columns = vim.current.window.width - self.lines = vim.current.window.height - self.working_columns = vim.current.window.width - self.working_lines = vim.current.window.height - self.bottom = vim.current.window.height - - # init color - self.enable_colors = options['color'] - - # init tabstops - self.init_tabstops() - - # open command - self.proc = ConqueSubprocess() - self.proc.open(command, {'TERM': options['TERM'], 'CONQUE': '1', 'LINES': str(self.lines), 'COLUMNS': str(self.columns)}) - - # send window size signal, in case LINES/COLUMNS is ignored - self.update_window_size(True) - # }}} - - # write to pty - def write(self, input, set_cursor=True, read=True): # {{{ - - # check if window size has changed - if read: - self.update_window_size() - - # write and read - self.proc.write(input) - - # read output immediately - if read: - self.read(1, set_cursor) - - # }}} - - # convert latin-1 input into utf-8 - # XXX - this is a hack, to be removed soon - def write_latin1(self, input, set_cursor=True, read=True): # {{{ - - if CONQUE_PYTHON_VERSION == 2: - try: - input_unicode = input.decode('latin-1', 'ignore') - self.write(input_unicode.encode('utf-8', 'ignore'), set_cursor, read) - except: - return - else: - self.write(input, set_cursor, read) - - # }}} - - # read from pty, and update buffer - def read(self, timeout=1, set_cursor=True, return_output=False, update_buffer=True): # {{{ - output = '' - - # this may not actually work - try: - - # read from subprocess - output = self.proc.read(timeout) - # and strip null chars - output = output.replace(chr(0), '') - - if output == '': - return - - # for bufferless terminals - if not update_buffer: - return output - - - - - - chunks = CONQUE_SEQ_REGEX.split(output) - - - - - - # don't go through all the csi regex if length is one (no matches) - if len(chunks) == 1: - - self.plain_text(chunks[0]) - - else: - for s in chunks: - if s == '': - continue - - - - - - # Check for control character match {{{ - if CONQUE_SEQ_REGEX_CTL.match(s[0]): - - nr = ord(s[0]) - if nr in CONQUE_CTL: - getattr(self, 'ctl_' + CONQUE_CTL[nr])() - else: - - pass - # }}} - - # check for escape sequence match {{{ - elif CONQUE_SEQ_REGEX_CSI.match(s): - - if s[-1] in CONQUE_ESCAPE: - csi = self.parse_csi(s[2:]) - - getattr(self, 'csi_' + CONQUE_ESCAPE[s[-1]])(csi) - else: - - pass - # }}} - - # check for title match {{{ - elif CONQUE_SEQ_REGEX_TITLE.match(s): - - self.change_title(s[2], s[4:-1]) - # }}} - - # check for hash match {{{ - elif CONQUE_SEQ_REGEX_HASH.match(s): - - if s[-1] in CONQUE_ESCAPE_HASH: - getattr(self, 'hash_' + CONQUE_ESCAPE_HASH[s[-1]])() - else: - - pass - # }}} - - # check for charset match {{{ - elif CONQUE_SEQ_REGEX_CHAR.match(s): - - if s[-1] in CONQUE_ESCAPE_CHARSET: - getattr(self, 'charset_' + CONQUE_ESCAPE_CHARSET[s[-1]])() - else: - - pass - # }}} - - # check for other escape match {{{ - elif CONQUE_SEQ_REGEX_ESC.match(s): - - if s[-1] in CONQUE_ESCAPE_PLAIN: - getattr(self, 'esc_' + CONQUE_ESCAPE_PLAIN[s[-1]])() - else: - - pass - # }}} - - # else process plain text {{{ - else: - self.plain_text(s) - # }}} - - # check window size - if set_cursor: - self.screen.set_cursor(self.l, self.c) - - # we need to set the cursor position - self.cursor_set = False - - vim.command('redraw') - - - - except: - - - pass - - if return_output: - if CONQUE_PYTHON_VERSION == 3: - return output - else: - return output.encode(vim.eval('&encoding'), 'replace') - # }}} - - # for polling - def auto_read(self): # {{{ - - # check subprocess status, but not every time since it's CPU expensive - if self.read_count == 10: - if not self.proc.is_alive(): - vim.command('call conque_term#get_instance().close()') - return - else: - self.read_count = 0 - self.read_count += 1 - - # read output - self.read(1) - - # reset timer - if self.c == 1: - vim.command('call feedkeys("\\", "n")') - else: - vim.command('call feedkeys("\\", "n")') - - # stop here if cursor doesn't need to be moved - if self.cursor_set: - return - - # otherwise set cursor position - try: - self.set_cursor(self.l, self.c) - except: - - - pass - self.cursor_set = True - - # }}} - - ############################################################################################### - # Plain text # {{{ - - def plain_text(self, input): - - # translate input into correct character set - if self.character_set == 'graphics': - old_input = input - input = '' - for i in range(0, len(old_input)): - chrd = ord(old_input[i]) - - - try: - if chrd > 255: - - input = input + old_input[i] - else: - input = input + unichr(CONQUE_GRAPHICS_SET[chrd]) - except: - - pass - - - current_line = self.screen[self.l] - - if len(current_line) < self.working_columns: - current_line = current_line + ' ' * (self.c - len(current_line)) - - # if line is wider than screen - if self.c + len(input) - 1 > self.working_columns: - # Table formatting hack - if self.unwrap_tables and CONQUE_TABLE_OUTPUT.match(input): - self.screen[self.l] = current_line[:self.c - 1] + input + current_line[self.c + len(input) - 1:] - self.apply_color(self.c, self.c + len(input)) - self.c += len(input) - return - - diff = self.c + len(input) - self.working_columns - 1 - # if autowrap is enabled - if self.autowrap: - self.screen[self.l] = current_line[:self.c - 1] + input[:-1 * diff] - self.apply_color(self.c, self.working_columns) - self.ctl_nl() - self.ctl_cr() - remaining = input[-1 * diff:] - - self.plain_text(remaining) - else: - self.screen[self.l] = current_line[:self.c - 1] + input[:-1 * diff - 1] + input[-1] - self.apply_color(self.c, self.working_columns) - self.c = self.working_columns - - # no autowrap - else: - self.screen[self.l] = current_line[:self.c - 1] + input + current_line[self.c + len(input) - 1:] - self.apply_color(self.c, self.c + len(input)) - self.c += len(input) - - def apply_color(self, start, end, line=0): - - - # stop here if coloration is disabled - if not self.enable_colors: - return - - # allow custom line nr to be passed - if line: - real_line = line - else: - real_line = self.screen.get_real_line(self.l) - - # check for previous overlapping coloration - - to_del = [] - if real_line in self.color_history: - for i in range(len(self.color_history[real_line])): - syn = self.color_history[real_line][i] - - if syn['start'] >= start and syn['start'] < end: - - vim.command('syn clear ' + syn['name']) - to_del.append(i) - # outside - if syn['end'] > end: - - self.exec_highlight(real_line, end, syn['end'], syn['highlight']) - elif syn['end'] > start and syn['end'] <= end: - - vim.command('syn clear ' + syn['name']) - to_del.append(i) - # outside - if syn['start'] < start: - - self.exec_highlight(real_line, syn['start'], start, syn['highlight']) - - if len(to_del) > 0: - to_del.reverse() - for di in to_del: - del self.color_history[real_line][di] - - # if there are no new colors - if len(self.color_changes) == 0: - return - - highlight = '' - for attr in self.color_changes.keys(): - highlight = highlight + ' ' + attr + '=' + self.color_changes[attr] - - # execute the highlight - self.exec_highlight(real_line, start, end, highlight) - - def exec_highlight(self, real_line, start, end, highlight): - unique_key = str(self.proc.pid) - - syntax_name = 'EscapeSequenceAt_' + unique_key + '_' + str(self.l) + '_' + str(start) + '_' + str(len(self.color_history) + 1) - syntax_options = ' contains=ALLBUT,ConqueString,MySQLString,MySQLKeyword oneline' - syntax_region = 'syntax match ' + syntax_name + ' /\%' + str(real_line) + 'l\%>' + str(start - 1) + 'c.*\%<' + str(end + 1) + 'c/' + syntax_options - syntax_highlight = 'highlight ' + syntax_name + highlight - - vim.command(syntax_region) - vim.command(syntax_highlight) - - # add syntax name to history - if not real_line in self.color_history: - self.color_history[real_line] = [] - - self.color_history[real_line].append({'name': syntax_name, 'start': start, 'end': end, 'highlight': highlight}) - - # }}} - - ############################################################################################### - # Control functions {{{ - - def ctl_nl(self): - # if we're in a scrolling region, scroll instead of moving cursor down - if self.lines != self.working_lines and self.l == self.bottom: - del self.screen[self.top] - self.screen.insert(self.bottom, '') - elif self.l == self.bottom: - self.screen.append('') - else: - self.l += 1 - - self.color_changes = {} - - def ctl_cr(self): - self.c = 1 - - self.color_changes = {} - - def ctl_bs(self): - if self.c > 1: - self.c += -1 - - def ctl_soh(self): - pass - - def ctl_stx(self): - pass - - def ctl_bel(self): - vim.command('call conque_term#bell()') - - def ctl_tab(self): - # default tabstop location - ts = self.working_columns - - # check set tabstops - for i in range(self.c, len(self.tabstops)): - if self.tabstops[i]: - ts = i + 1 - break - - - - self.c = ts - - def ctl_so(self): - self.character_set = 'graphics' - - def ctl_si(self): - self.character_set = 'ascii' - - # }}} - - ############################################################################################### - # CSI functions {{{ - - def csi_font(self, csi): # {{{ - if not self.enable_colors: - return - - # defaults to 0 - if len(csi['vals']) == 0: - csi['vals'] = [0] - - # 256 xterm color foreground - if len(csi['vals']) == 3 and csi['vals'][0] == 38 and csi['vals'][1] == 5: - self.color_changes['ctermfg'] = str(csi['vals'][2]) - self.color_changes['guifg'] = '#' + self.xterm_to_rgb(csi['vals'][2]) - - # 256 xterm color background - elif len(csi['vals']) == 3 and csi['vals'][0] == 48 and csi['vals'][1] == 5: - self.color_changes['ctermbg'] = str(csi['vals'][2]) - self.color_changes['guibg'] = '#' + self.xterm_to_rgb(csi['vals'][2]) - - # 16 colors - else: - for val in csi['vals']: - if val in CONQUE_FONT: - - # ignore starting normal colors - if CONQUE_FONT[val]['normal'] and len(self.color_changes) == 0: - - continue - # clear color changes - elif CONQUE_FONT[val]['normal']: - - self.color_changes = {} - # save these color attributes for next plain_text() call - else: - - for attr in CONQUE_FONT[val]['attributes'].keys(): - if attr in self.color_changes and (attr == 'cterm' or attr == 'gui'): - self.color_changes[attr] += ',' + CONQUE_FONT[val]['attributes'][attr] - else: - self.color_changes[attr] = CONQUE_FONT[val]['attributes'][attr] - # }}} - - def csi_clear_line(self, csi): # {{{ - - - # this escape defaults to 0 - if len(csi['vals']) == 0: - csi['val'] = 0 - - - - - # 0 means cursor right - if csi['val'] == 0: - self.screen[self.l] = self.screen[self.l][0:self.c - 1] - - # 1 means cursor left - elif csi['val'] == 1: - self.screen[self.l] = ' ' * (self.c) + self.screen[self.l][self.c:] - - # clear entire line - elif csi['val'] == 2: - self.screen[self.l] = '' - - # clear colors - if csi['val'] == 2 or (csi['val'] == 0 and self.c == 1): - real_line = self.screen.get_real_line(self.l) - if real_line in self.color_history: - for syn in self.color_history[real_line]: - vim.command('syn clear ' + syn['name']) - - - - # }}} - - def csi_cursor_right(self, csi): # {{{ - # we use 1 even if escape explicitly specifies 0 - if csi['val'] == 0: - csi['val'] = 1 - - - - - if self.wrap_cursor and self.c + csi['val'] > self.working_columns: - self.l += int(math.floor((self.c + csi['val']) / self.working_columns)) - self.c = (self.c + csi['val']) % self.working_columns - return - - self.c = self.bound(self.c + csi['val'], 1, self.working_columns) - # }}} - - def csi_cursor_left(self, csi): # {{{ - # we use 1 even if escape explicitly specifies 0 - if csi['val'] == 0: - csi['val'] = 1 - - if self.wrap_cursor and csi['val'] >= self.c: - self.l += int(math.floor((self.c - csi['val']) / self.working_columns)) - self.c = self.working_columns - (csi['val'] - self.c) % self.working_columns - return - - self.c = self.bound(self.c - csi['val'], 1, self.working_columns) - # }}} - - def csi_cursor_to_column(self, csi): # {{{ - self.c = self.bound(csi['val'], 1, self.working_columns) - # }}} - - def csi_cursor_up(self, csi): # {{{ - self.l = self.bound(self.l - csi['val'], self.top, self.bottom) - - self.color_changes = {} - # }}} - - def csi_cursor_down(self, csi): # {{{ - self.l = self.bound(self.l + csi['val'], self.top, self.bottom) - - self.color_changes = {} - # }}} - - def csi_clear_screen(self, csi): # {{{ - # default to 0 - if len(csi['vals']) == 0: - csi['val'] = 0 - - # 2 == clear entire screen - if csi['val'] == 2: - self.l = 1 - self.c = 1 - self.screen.clear() - - # 0 == clear down - elif csi['val'] == 0: - for l in range(self.bound(self.l + 1, 1, self.lines), self.lines + 1): - self.screen[l] = '' - - # clear end of current line - self.csi_clear_line(self.parse_csi('K')) - - # 1 == clear up - elif csi['val'] == 1: - for l in range(1, self.bound(self.l, 1, self.lines + 1)): - self.screen[l] = '' - - # clear beginning of current line - self.csi_clear_line(self.parse_csi('1K')) - - # clear coloration - if csi['val'] == 2 or csi['val'] == 0: - real_line = self.screen.get_real_line(self.l) - for line in self.color_history.keys(): - if line >= real_line: - for syn in self.color_history[line]: - vim.command('syn clear ' + syn['name']) - - self.color_changes = {} - # }}} - - def csi_delete_chars(self, csi): # {{{ - self.screen[self.l] = self.screen[self.l][:self.c] + self.screen[self.l][self.c + csi['val']:] - # }}} - - def csi_add_spaces(self, csi): # {{{ - self.screen[self.l] = self.screen[self.l][: self.c - 1] + ' ' * csi['val'] + self.screen[self.l][self.c:] - # }}} - - def csi_cursor(self, csi): # {{{ - if len(csi['vals']) == 2: - new_line = csi['vals'][0] - new_col = csi['vals'][1] - else: - new_line = 1 - new_col = 1 - - if self.absolute_coords: - self.l = self.bound(new_line, 1, self.lines) - else: - self.l = self.bound(self.top + new_line - 1, self.top, self.bottom) - - self.c = self.bound(new_col, 1, self.working_columns) - if self.c > len(self.screen[self.l]): - self.screen[self.l] = self.screen[self.l] + ' ' * (self.c - len(self.screen[self.l])) - - # }}} - - def csi_set_coords(self, csi): # {{{ - if len(csi['vals']) == 2: - new_start = csi['vals'][0] - new_end = csi['vals'][1] - else: - new_start = 1 - new_end = vim.current.window.height - - self.top = new_start - self.bottom = new_end - self.working_lines = new_end - new_start + 1 - - # if cursor is outside scrolling region, reset it - if self.l < self.top: - self.l = self.top - elif self.l > self.bottom: - self.l = self.bottom - - self.color_changes = {} - # }}} - - def csi_tab_clear(self, csi): # {{{ - # this escape defaults to 0 - if len(csi['vals']) == 0: - csi['val'] = 0 - - - - if csi['val'] == 0: - self.tabstops[self.c - 1] = False - elif csi['val'] == 3: - for i in range(0, self.columns + 1): - self.tabstops[i] = False - # }}} - - def csi_set(self, csi): # {{{ - # 132 cols - if csi['val'] == 3: - self.csi_clear_screen(self.parse_csi('2J')) - self.working_columns = 132 - - # relative_origin - elif csi['val'] == 6: - self.absolute_coords = False - - # set auto wrap - elif csi['val'] == 7: - self.autowrap = True - - - self.color_changes = {} - # }}} - - def csi_reset(self, csi): # {{{ - # 80 cols - if csi['val'] == 3: - self.csi_clear_screen(self.parse_csi('2J')) - self.working_columns = 80 - - # absolute origin - elif csi['val'] == 6: - self.absolute_coords = True - - # reset auto wrap - elif csi['val'] == 7: - self.autowrap = False - - - self.color_changes = {} - # }}} - - # }}} - - ############################################################################################### - # ESC functions {{{ - - def esc_scroll_up(self): # {{{ - self.ctl_nl() - - self.color_changes = {} - # }}} - - def esc_next_line(self): # {{{ - self.ctl_nl() - self.c = 1 - # }}} - - def esc_set_tab(self): # {{{ - - if self.c <= len(self.tabstops): - self.tabstops[self.c - 1] = True - # }}} - - def esc_scroll_down(self): # {{{ - if self.l == self.top: - del self.screen[self.bottom] - self.screen.insert(self.top, '') - else: - self.l += -1 - - self.color_changes = {} - # }}} - - # }}} - - ############################################################################################### - # HASH functions {{{ - - def hash_screen_alignment_test(self): # {{{ - self.csi_clear_screen(self.parse_csi('2J')) - self.working_lines = self.lines - for l in range(1, self.lines + 1): - self.screen[l] = 'E' * self.working_columns - # }}} - - # }}} - - ############################################################################################### - # CHARSET functions {{{ - - def charset_us(self): - self.character_set = 'ascii' - - def charset_uk(self): - self.character_set = 'ascii' - - def charset_graphics(self): - self.character_set = 'graphics' - - # }}} - - ############################################################################################### - # Random stuff {{{ - - def set_cursor(self, line, col): - self.screen.set_cursor(line, col) - - def change_title(self, key, val): - - - if key == '0' or key == '2': - - vim.command('setlocal statusline=' + re.escape(val)) - try: - vim.command('set titlestring=' + re.escape(val)) - except: - pass - - def paste(self): - input = vim.eval('@@') - input = input.replace("\n", "\r") - self.read(50) - - def paste_selection(self): - input = vim.eval('@@') - input = input.replace("\n", "\r") - self.write(input) - - def update_window_size(self, force=False): - # resize if needed - if force or vim.current.window.width != self.columns or vim.current.window.height != self.lines: - - # reset all window size attributes to default - self.columns = vim.current.window.width - self.lines = vim.current.window.height - self.working_columns = vim.current.window.width - self.working_lines = vim.current.window.height - self.bottom = vim.current.window.height - - # reset screen object attributes - self.l = self.screen.reset_size(self.l) - - # reset tabstops - self.init_tabstops() - - - - # signal process that screen size has changed - self.proc.window_resize(self.lines, self.columns) - - def insert_enter(self): - - # check window size - self.update_window_size() - - # we need to set the cursor position - self.cursor_set = False - - def init_tabstops(self): - for i in range(0, self.columns + 1): - if i % 8 == 0: - self.tabstops.append(True) - else: - self.tabstops.append(False) - - def idle(self): - pass - - def resume(self): - pass - - def close(self): - self.proc.close() - - def abort(self): - self.proc.signal(1) - - # }}} - - ############################################################################################### - # Utility {{{ - - def parse_csi(self, s): # {{{ - attr = {'key': s[-1], 'flag': '', 'val': 1, 'vals': []} - - if len(s) == 1: - return attr - - full = s[0:-1] - - if full[0] == '?': - full = full[1:] - attr['flag'] = '?' - - if full != '': - vals = full.split(';') - for val in vals: - - val = re.sub("\D", "", val) - - if val != '': - attr['vals'].append(int(val)) - - if len(attr['vals']) == 1: - attr['val'] = int(attr['vals'][0]) - - return attr - # }}} - - def bound(self, val, min, max): # {{{ - if val > max: - return max - - if val < min: - return min - - return val - # }}} - - def xterm_to_rgb(self, color_code): # {{{ - if color_code < 16: - ascii_colors = ['000000', 'CD0000', '00CD00', 'CDCD00', '0000EE', 'CD00CD', '00CDCD', 'E5E5E5', - '7F7F7F', 'FF0000', '00FF00', 'FFFF00', '5C5CFF', 'FF00FF', '00FFFF', 'FFFFFF'] - return ascii_colors[color_code] - - elif color_code < 232: - cc = int(color_code) - 16 - - p1 = "%02x" % (math.floor(cc / 36) * (255 / 5)) - p2 = "%02x" % (math.floor((cc % 36) / 6) * (255 / 5)) - p3 = "%02x" % (math.floor(cc % 6) * (255 / 5)) - - return p1 + p2 + p3 - else: - grey_tone = "%02x" % math.floor((255 / 24) * (color_code - 232)) - return grey_tone + grey_tone + grey_tone - # }}} - - # }}} - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_globals.py b/bundle/conque_2.0/autoload/conque_term/conque_globals.py deleted file mode 100644 index dfc37079..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_globals.py +++ /dev/null @@ -1,287 +0,0 @@ -# FILE: autoload/conque_term/conque_globals.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -"""Common global constants and functions for Conque.""" - -import sys -import os -import re - - - - - - - - - - - - - - - - - -# shared memory size -CONQUE_SOLE_BUFFER_LENGTH = 1000 -CONQUE_SOLE_INPUT_SIZE = 1000 -CONQUE_SOLE_STATS_SIZE = 1000 -CONQUE_SOLE_COMMANDS_SIZE = 255 -CONQUE_SOLE_RESCROLL_SIZE = 255 -CONQUE_SOLE_RESIZE_SIZE = 255 - -# interval of screen redraw -# larger number means less frequent -CONQUE_SOLE_SCREEN_REDRAW = 100 - -# interval of full buffer redraw -# larger number means less frequent -CONQUE_SOLE_BUFFER_REDRAW = 500 - -# interval of full output bucket replacement -# larger number means less frequent, 1 = every time -CONQUE_SOLE_MEM_REDRAW = 1000 - -# PYTHON VERSION -CONQUE_PYTHON_VERSION = sys.version_info[0] - - -def u(str_val, str_encoding='latin-1', errors='strict'): - """foolhardy attempt to make unicode string syntax compatible with both python 2 and 3""" - - if not str_val: - str_val = '' - - if CONQUE_PYTHON_VERSION == 3: - return str_val - - else: - return unicode(str_val, str_encoding, errors) - -# Escape sequence settings {{{ - -CONQUE_CTL = { - 1: 'soh', # start of heading - 2: 'stx', # start of text - 7: 'bel', # bell - 8: 'bs', # backspace - 9: 'tab', # tab - 10: 'nl', # new line - 13: 'cr', # carriage return - 14: 'so', # shift out - 15: 'si' # shift in -} -# 11 : 'vt', # vertical tab -# 12 : 'ff', # form feed - -# Escape sequences -CONQUE_ESCAPE = { - 'm': 'font', - 'J': 'clear_screen', - 'K': 'clear_line', - '@': 'add_spaces', - 'A': 'cursor_up', - 'B': 'cursor_down', - 'C': 'cursor_right', - 'D': 'cursor_left', - 'G': 'cursor_to_column', - 'H': 'cursor', - 'P': 'delete_chars', - 'f': 'cursor', - 'g': 'tab_clear', - 'r': 'set_coords', - 'h': 'set', - 'l': 'reset' -} -# 'L': 'insert_lines', -# 'M': 'delete_lines', -# 'd': 'cusor_vpos', - -# Alternate escape sequences, no [ -CONQUE_ESCAPE_PLAIN = { - 'D': 'scroll_up', - 'E': 'next_line', - 'H': 'set_tab', - 'M': 'scroll_down' -} -# 'N': 'single_shift_2', -# 'O': 'single_shift_3', -# '=': 'alternate_keypad', -# '>': 'numeric_keypad', -# '7': 'save_cursor', -# '8': 'restore_cursor', - -# Character set escape sequences, with "(" -CONQUE_ESCAPE_CHARSET = { - 'A': 'uk', - 'B': 'us', - '0': 'graphics' -} - -# Uber alternate escape sequences, with # or ? -CONQUE_ESCAPE_QUESTION = { - '1h': 'new_line_mode', - '3h': '132_cols', - '4h': 'smooth_scrolling', - '5h': 'reverse_video', - '6h': 'relative_origin', - '7h': 'set_auto_wrap', - '8h': 'set_auto_repeat', - '9h': 'set_interlacing_mode', - '1l': 'set_cursor_key', - '2l': 'set_vt52', - '3l': '80_cols', - '4l': 'set_jump_scrolling', - '5l': 'normal_video', - '6l': 'absolute_origin', - '7l': 'reset_auto_wrap', - '8l': 'reset_auto_repeat', - '9l': 'reset_interlacing_mode' -} - -CONQUE_ESCAPE_HASH = { - '8': 'screen_alignment_test' -} -# '3': 'double_height_top', -# '4': 'double_height_bottom', -# '5': 'single_height_single_width', -# '6': 'single_height_double_width', - -CONQUE_GRAPHICS_SET = [ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002A, 0x2192, 0x2190, 0x2191, 0x2193, 0x002F, - 0x2588, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x00A0, - 0x25C6, 0x2592, 0x2409, 0x240C, 0x240D, 0x240A, 0x00B0, 0x00B1, - 0x2591, 0x240B, 0x2518, 0x2510, 0x250C, 0x2514, 0x253C, 0xF800, - 0xF801, 0x2500, 0xF803, 0xF804, 0x251C, 0x2524, 0x2534, 0x252C, - 0x2502, 0x2264, 0x2265, 0x03C0, 0x2260, 0x00A3, 0x00B7, 0x007F, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, - 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, - 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, - 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, - 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, - 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, - 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, - 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, - 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, - 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, - 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, - 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, - 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF -] - -# Font codes {{{ -CONQUE_FONT = { - 0: {'description': 'Normal (default)', 'attributes': {'cterm': 'NONE', 'ctermfg': 'NONE', 'ctermbg': 'NONE', 'gui': 'NONE', 'guifg': 'NONE', 'guibg': 'NONE'}, 'normal': True}, - 1: {'description': 'Bold', 'attributes': {'cterm': 'BOLD', 'gui': 'BOLD'}, 'normal': False}, - 4: {'description': 'Underlined', 'attributes': {'cterm': 'UNDERLINE', 'gui': 'UNDERLINE'}, 'normal': False}, - 5: {'description': 'Blink (appears as Bold)', 'attributes': {'cterm': 'BOLD', 'gui': 'BOLD'}, 'normal': False}, - 7: {'description': 'Inverse', 'attributes': {'cterm': 'REVERSE', 'gui': 'REVERSE'}, 'normal': False}, - 8: {'description': 'Invisible (hidden)', 'attributes': {'ctermfg': '0', 'ctermbg': '0', 'guifg': '#000000', 'guibg': '#000000'}, 'normal': False}, - 22: {'description': 'Normal (neither bold nor faint)', 'attributes': {'cterm': 'NONE', 'gui': 'NONE'}, 'normal': True}, - 24: {'description': 'Not underlined', 'attributes': {'cterm': 'NONE', 'gui': 'NONE'}, 'normal': True}, - 25: {'description': 'Steady (not blinking)', 'attributes': {'cterm': 'NONE', 'gui': 'NONE'}, 'normal': True}, - 27: {'description': 'Positive (not inverse)', 'attributes': {'cterm': 'NONE', 'gui': 'NONE'}, 'normal': True}, - 28: {'description': 'Visible (not hidden)', 'attributes': {'ctermfg': 'NONE', 'ctermbg': 'NONE', 'guifg': 'NONE', 'guibg': 'NONE'}, 'normal': True}, - 30: {'description': 'Set foreground color to Black', 'attributes': {'ctermfg': '16', 'guifg': '#000000'}, 'normal': False}, - 31: {'description': 'Set foreground color to Red', 'attributes': {'ctermfg': '1', 'guifg': '#ff0000'}, 'normal': False}, - 32: {'description': 'Set foreground color to Green', 'attributes': {'ctermfg': '2', 'guifg': '#00ff00'}, 'normal': False}, - 33: {'description': 'Set foreground color to Yellow', 'attributes': {'ctermfg': '3', 'guifg': '#ffff00'}, 'normal': False}, - 34: {'description': 'Set foreground color to Blue', 'attributes': {'ctermfg': '4', 'guifg': '#0000ff'}, 'normal': False}, - 35: {'description': 'Set foreground color to Magenta', 'attributes': {'ctermfg': '5', 'guifg': '#990099'}, 'normal': False}, - 36: {'description': 'Set foreground color to Cyan', 'attributes': {'ctermfg': '6', 'guifg': '#009999'}, 'normal': False}, - 37: {'description': 'Set foreground color to White', 'attributes': {'ctermfg': '7', 'guifg': '#ffffff'}, 'normal': False}, - 39: {'description': 'Set foreground color to default (original)', 'attributes': {'ctermfg': 'NONE', 'guifg': 'NONE'}, 'normal': True}, - 40: {'description': 'Set background color to Black', 'attributes': {'ctermbg': '16', 'guibg': '#000000'}, 'normal': False}, - 41: {'description': 'Set background color to Red', 'attributes': {'ctermbg': '1', 'guibg': '#ff0000'}, 'normal': False}, - 42: {'description': 'Set background color to Green', 'attributes': {'ctermbg': '2', 'guibg': '#00ff00'}, 'normal': False}, - 43: {'description': 'Set background color to Yellow', 'attributes': {'ctermbg': '3', 'guibg': '#ffff00'}, 'normal': False}, - 44: {'description': 'Set background color to Blue', 'attributes': {'ctermbg': '4', 'guibg': '#0000ff'}, 'normal': False}, - 45: {'description': 'Set background color to Magenta', 'attributes': {'ctermbg': '5', 'guibg': '#990099'}, 'normal': False}, - 46: {'description': 'Set background color to Cyan', 'attributes': {'ctermbg': '6', 'guibg': '#009999'}, 'normal': False}, - 47: {'description': 'Set background color to White', 'attributes': {'ctermbg': '7', 'guibg': '#ffffff'}, 'normal': False}, - 49: {'description': 'Set background color to default (original).', 'attributes': {'ctermbg': 'NONE', 'guibg': 'NONE'}, 'normal': True}, - 90: {'description': 'Set foreground color to Black', 'attributes': {'ctermfg': '8', 'guifg': '#000000'}, 'normal': False}, - 91: {'description': 'Set foreground color to Red', 'attributes': {'ctermfg': '9', 'guifg': '#ff0000'}, 'normal': False}, - 92: {'description': 'Set foreground color to Green', 'attributes': {'ctermfg': '10', 'guifg': '#00ff00'}, 'normal': False}, - 93: {'description': 'Set foreground color to Yellow', 'attributes': {'ctermfg': '11', 'guifg': '#ffff00'}, 'normal': False}, - 94: {'description': 'Set foreground color to Blue', 'attributes': {'ctermfg': '12', 'guifg': '#0000ff'}, 'normal': False}, - 95: {'description': 'Set foreground color to Magenta', 'attributes': {'ctermfg': '13', 'guifg': '#990099'}, 'normal': False}, - 96: {'description': 'Set foreground color to Cyan', 'attributes': {'ctermfg': '14', 'guifg': '#009999'}, 'normal': False}, - 97: {'description': 'Set foreground color to White', 'attributes': {'ctermfg': '15', 'guifg': '#ffffff'}, 'normal': False}, - 100: {'description': 'Set background color to Black', 'attributes': {'ctermbg': '8', 'guibg': '#000000'}, 'normal': False}, - 101: {'description': 'Set background color to Red', 'attributes': {'ctermbg': '9', 'guibg': '#ff0000'}, 'normal': False}, - 102: {'description': 'Set background color to Green', 'attributes': {'ctermbg': '10', 'guibg': '#00ff00'}, 'normal': False}, - 103: {'description': 'Set background color to Yellow', 'attributes': {'ctermbg': '11', 'guibg': '#ffff00'}, 'normal': False}, - 104: {'description': 'Set background color to Blue', 'attributes': {'ctermbg': '12', 'guibg': '#0000ff'}, 'normal': False}, - 105: {'description': 'Set background color to Magenta', 'attributes': {'ctermbg': '13', 'guibg': '#990099'}, 'normal': False}, - 106: {'description': 'Set background color to Cyan', 'attributes': {'ctermbg': '14', 'guibg': '#009999'}, 'normal': False}, - 107: {'description': 'Set background color to White', 'attributes': {'ctermbg': '15', 'guibg': '#ffffff'}, 'normal': False} -} -# }}} - -# regular expression matching (almost) all control sequences -CONQUE_SEQ_REGEX = re.compile(u("(\x1b\[?\??#?[0-9;]*[a-zA-Z0-9@=>]|\x1b\][0-9];.*?\x07|[\x01-\x0f]|\x1b\([AB0])"), re.UNICODE) -CONQUE_SEQ_REGEX_CTL = re.compile(u("^[\x01-\x0f]$"), re.UNICODE) -CONQUE_SEQ_REGEX_CSI = re.compile(u("^\x1b\["), re.UNICODE) -CONQUE_SEQ_REGEX_TITLE = re.compile(u("^\x1b\]"), re.UNICODE) -CONQUE_SEQ_REGEX_HASH = re.compile(u("^\x1b#"), re.UNICODE) -CONQUE_SEQ_REGEX_ESC = re.compile(u("^\x1b.$"), re.UNICODE) -CONQUE_SEQ_REGEX_CHAR = re.compile(u("^\x1b\("), re.UNICODE) - -# match table output -CONQUE_TABLE_OUTPUT = re.compile("^\s*\|\s.*\s\|\s*$|^\s*\+[=+-]+\+\s*$") - -# }}} - -# Windows subprocess config {{{ - -CONQUE_SEQ_REGEX_VK = re.compile(u("(\x1b\[\d{1,3}VK)"), re.UNICODE) - -# }}} - -CONQUE_COLOR_SEQUENCE = ( - '000', '009', '090', '099', '900', '909', '990', '999', - '000', '00f', '0f0', '0ff', 'f00', 'f0f', 'ff0', 'fff' -) - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_screen.py b/bundle/conque_2.0/autoload/conque_term/conque_screen.py deleted file mode 100644 index a1eb4ee4..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_screen.py +++ /dev/null @@ -1,209 +0,0 @@ -# FILE: autoload/conque_term/conque_screen.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -""" -ConqueScreen is an extention of the vim.current.buffer object - -It restricts the working indices of the buffer object to the scroll region -which pty is expecting. It also uses 1-based indexes, to match escape -sequence commands. - - E.g.: - s = ConqueScreen() - ... - s[5] = 'Set 5th line in terminal to this line' - s.append('Add new line to terminal') - s[5] = 'Since previous append() command scrolled the terminal down, this is a different line than first cb[5] call' -""" - -import vim - - -class ConqueScreen(object): - - # CLASS PROPERTIES {{{ - - # the buffer - buffer = None - - # screen and scrolling regions - screen_top = 1 - - # screen width - screen_width = 80 - screen_height = 80 - - # }}} - - def __init__(self): # {{{ - self.buffer = vim.current.buffer - - self.screen_top = 1 - self.screen_width = vim.current.window.width - self.screen_height = vim.current.window.height - # }}} - - ############################################################################################### - # List overload {{{ - - def __len__(self): # {{{ - return len(self.buffer) - # }}} - - def __getitem__(self, key): # {{{ - real_line = self.get_real_idx(key) - - # if line is past buffer end, add lines to buffer - if real_line >= len(self.buffer): - for i in range(len(self.buffer), real_line + 1): - self.append(' ' * self.screen_width) - - return u(self.buffer[real_line], 'utf-8') - # }}} - - def __setitem__(self, key, value): # {{{ - real_line = self.get_real_idx(key) - - if CONQUE_PYTHON_VERSION == 2: - val = value.encode('utf-8') - else: - # XXX / Vim's python3 interface doesn't accept bytes object - val = str(value) - - # if line is past end of screen, append - if real_line == len(self.buffer): - self.buffer.append(val) - else: - self.buffer[real_line] = val - # }}} - - def __delitem__(self, key): # {{{ - del self.buffer[self.screen_top + key - 2] - # }}} - - def append(self, value): # {{{ - if len(self.buffer) > self.screen_top + self.screen_height - 1: - self.buffer[len(self.buffer) - 1] = value - else: - self.buffer.append(value) - - if len(self.buffer) > self.screen_top + self.screen_height - 1: - self.screen_top += 1 - if vim.current.buffer.number == self.buffer.number: - vim.command('normal G') - # }}} - - def insert(self, line, value): # {{{ - - l = self.screen_top + line - 2 - self.buffer.append(value, l) - - # }}} - # }}} - - ############################################################################################### - # Util {{{ - - def get_top(self): # {{{ - return self.screen_top - # }}} - - def get_real_idx(self, line): # {{{ - return (self.screen_top + line - 2) - # }}} - - def get_real_line(self, line): # {{{ - return (self.screen_top + line - 1) - # }}} - - def set_screen_width(self, width): # {{{ - self.screen_width = width - # }}} - - # }}} - - ############################################################################################### - def clear(self): # {{{ - self.buffer.append(' ') - vim.command('normal Gzt') - self.screen_top = len(self.buffer) - # }}} - - def set_cursor(self, line, column): # {{{ - # figure out line - real_line = self.screen_top + line - 1 - if real_line > len(self.buffer): - for l in range(len(self.buffer) - 1, real_line): - self.buffer.append('') - - # figure out column - real_column = column - if len(self.buffer[real_line - 1]) < real_column: - self.buffer[real_line - 1] = self.buffer[real_line - 1] + ' ' * (real_column - len(self.buffer[real_line - 1])) - - # python version is occasionally grumpy - try: - vim.current.window.cursor = (real_line, real_column - 1) - except: - vim.command('call cursor(' + str(real_line) + ', ' + str(real_column) + ')') - # }}} - - def reset_size(self, line): # {{{ - - - - - # save cursor line number - real_line = self.screen_top + line - - # reset screen size - self.screen_width = vim.current.window.width - self.screen_height = vim.current.window.height - self.screen_top = len(self.buffer) - vim.current.window.height + 1 - if self.screen_top < 1: - self.screen_top = 1 - - - # align bottom of buffer to bottom of screen - vim.command('normal ' + str(self.screen_height) + 'kG') - - # return new relative line number - return (real_line - self.screen_top) - # }}} - - def scroll_to_bottom(self): # {{{ - vim.current.window.cursor = (len(self.buffer) - 1, 1) - # }}} - - def align(self): # {{{ - # align bottom of buffer to bottom of screen - vim.command('normal ' + str(self.screen_height) + 'kG') - # }}} - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_sole.py b/bundle/conque_2.0/autoload/conque_term/conque_sole.py deleted file mode 100644 index d66078ee..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_sole.py +++ /dev/null @@ -1,459 +0,0 @@ -# FILE: autoload/conque_term/conque_sole.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -import vim - - -class ConqueSole(Conque): - - window_top = None - window_bottom = None - - color_cache = {} - color_mode = None - color_conceals = {} - - buffer = None - - # counters for periodic rendering - buffer_redraw_ct = 0 - screen_redraw_ct = 0 - - # ********************************************************************************************* - # start program and initialize this instance - - def open(self, command, options={}, python_exe='', communicator_py=''): # {{{ - - # init size - self.columns = vim.current.window.width - self.lines = vim.current.window.height - self.window_top = 0 - self.window_bottom = vim.current.window.height - 1 - - # init color - self.enable_colors = options['color'] - - # open command - self.proc = ConqueSoleWrapper() - self.proc.open(command, {'TERM': options['TERM'], 'CONQUE': '1', 'LINES': self.lines, 'COLUMNS': self.columns}, python_exe, communicator_py) - - self.buffer = vim.current.buffer - - # }}} - - - # ********************************************************************************************* - # read and update screen - - def read(self, timeout=1, set_cursor=True, return_output=False, update_buffer=True): # {{{ - - try: - stats = self.proc.get_stats() - - if not stats: - return - - self.buffer_redraw_ct += 1 - self.screen_redraw_ct += 1 - - update_top = 0 - update_bottom = 0 - lines = [] - - # full buffer redraw, our favorite! - if self.buffer_redraw_ct == CONQUE_SOLE_BUFFER_REDRAW: - self.buffer_redraw_ct = 0 - update_top = 0 - update_bottom = stats['top_offset'] + self.lines - (lines, attributes) = self.proc.read(update_top, update_bottom) - if return_output: - output = self.get_new_output(lines, update_top, stats) - if update_buffer: - for i in range(update_top, update_bottom + 1): - self.plain_text(i, lines[i], attributes[i], stats) - - # full screen redraw - elif stats['cursor_y'] + 1 != self.l or stats['top_offset'] != self.window_top or self.screen_redraw_ct == CONQUE_SOLE_SCREEN_REDRAW: - self.screen_redraw_ct = 0 - update_top = self.window_top - update_bottom = stats['top_offset'] + self.lines + 1 - (lines, attributes) = self.proc.read(update_top, update_bottom - update_top + 1) - if return_output: - output = self.get_new_output(lines, update_top, stats) - if update_buffer: - for i in range(update_top, update_bottom + 1): - self.plain_text(i, lines[i - update_top], attributes[i - update_top], stats) - - - # single line redraw - else: - update_top = stats['cursor_y'] - update_bottom = stats['cursor_y'] - (lines, attributes) = self.proc.read(update_top, 1) - if return_output: - output = self.get_new_output(lines, update_top, stats) - if update_buffer: - if lines[0].rstrip() != self.buffer[update_top].rstrip(): - self.plain_text(update_top, lines[0], attributes[0], stats) - - - # reset current position - self.window_top = stats['top_offset'] - self.l = stats['cursor_y'] + 1 - self.c = stats['cursor_x'] + 1 - - # reposition cursor if this seems plausible - if set_cursor: - self.set_cursor(self.l, self.c) - - if return_output: - return output - - except: - - pass - # }}} - - ######################################################################### - # Calculate the "new" output from this read. Fake but useful - - def get_new_output(self, lines, update_top, stats): # {{{ - - if not (stats['cursor_y'] + 1 > self.l or (stats['cursor_y'] + 1 == self.l and stats['cursor_x'] + 1 > self.c)): - return "" - - - - - - - try: - num_to_return = stats['cursor_y'] - self.l + 2 - - lines = lines[self.l - update_top - 1:] - - - new_output = [] - - # first line - new_output.append(lines[0][self.c - 1:].rstrip()) - - # the rest - for i in range(1, num_to_return): - new_output.append(lines[i].rstrip()) - - except: - - pass - - - - return "\n".join(new_output) - # }}} - - ######################################################################### - # update the buffer - - def plain_text(self, line_nr, text, attributes, stats): # {{{ - - - - - - self.l = line_nr + 1 - - # remove trailing whitespace - text = text.rstrip() - - # if we're using concealed text for color, then s- is weird - if self.color_mode == 'conceal': - - text = self.add_conceal_color(text, attributes, stats, line_nr) - - - # update vim buffer - if len(self.buffer) <= line_nr: - self.buffer.append(text) - else: - self.buffer[line_nr] = text - - if not self.color_mode == 'conceal': - self.do_color(attributes=attributes, stats=stats) - - # }}} - - ######################################################################### - # add conceal color - - def add_conceal_color(self, text, attributes, stats, line_nr): # {{{ - - # stop here if coloration is disabled - if not self.enable_colors: - return text - - # if no colors for this line, clear everything out - if len(attributes) == 0 or attributes == u(chr(stats['default_attribute'])) * len(attributes): - return text - - new_text = '' - - # if text attribute is different, call add_color() - attr = None - start = 0 - self.color_conceals[line_nr] = [] - ends = [] - for i in range(0, len(attributes)): - c = ord(attributes[i]) - - if c != attr: - if attr and attr != stats['default_attribute']: - - color = self.translate_color(attr) - - new_text += chr(27) + 'sf' + color['fg_code'] + ';' - ends.append(chr(27) + 'ef' + color['fg_code'] + ';') - self.color_conceals[line_nr].append(start) - - if c > 15: - new_text += chr(27) + 'sf' + color['bg_code'] + ';' - ends.append(chr(27) + 'ef' + color['bg_code'] + ';') - self.color_conceals[line_nr].append(start) - - new_text += text[start:i] - - # close color regions - ends.reverse() - for j in range(0, len(ends)): - new_text += ends[j] - self.color_conceals[line_nr].append(i) - ends = [] - - start = i - attr = c - - - if attr and attr != stats['default_attribute']: - - color = self.translate_color(attr) - - new_text += chr(27) + 'sf' + color['fg_code'] + ';' - ends.append(chr(27) + 'ef' + color['fg_code'] + ';') - - if c > 15: - new_text += chr(27) + 'sf' + color['bg_code'] + ';' - ends.append(chr(27) + 'ef' + color['bg_code'] + ';') - - new_text += text[start:] - - # close color regions - ends.reverse() - for i in range(0, len(ends)): - new_text += ends[i] - - return new_text - - # }}} - - ######################################################################### - - def do_color(self, start=0, end=0, attributes='', stats=None): # {{{ - - # stop here if coloration is disabled - if not self.enable_colors: - return - - # if no colors for this line, clear everything out - if len(attributes) == 0 or attributes == u(chr(stats['default_attribute'])) * len(attributes): - self.color_changes = {} - self.apply_color(1, len(attributes), self.l) - return - - # if text attribute is different, call add_color() - attr = None - start = 0 - for i in range(0, len(attributes)): - c = ord(attributes[i]) - - if c != attr: - if attr and attr != stats['default_attribute']: - self.color_changes = self.translate_color(attr) - self.apply_color(start + 1, i + 1, self.l) - start = i - attr = c - - if attr and attr != stats['default_attribute']: - self.color_changes = self.translate_color(attr) - self.apply_color(start + 1, len(attributes), self.l) - - - # }}} - - ######################################################################### - - def translate_color(self, attr): # {{{ - - # check for cached color - if attr in self.color_cache: - return self.color_cache[attr] - - - - - - - # convert attribute integer to bit string - bit_str = bin(attr) - bit_str = bit_str.replace('0b', '') - - # slice foreground and background portions of bit string - fg = bit_str[-4:].rjust(4, '0') - bg = bit_str[-8:-4].rjust(4, '0') - - # ok, first create foreground #rbg - red = int(fg[1]) * 204 + int(fg[0]) * int(fg[1]) * 51 - green = int(fg[2]) * 204 + int(fg[0]) * int(fg[2]) * 51 - blue = int(fg[3]) * 204 + int(fg[0]) * int(fg[3]) * 51 - fg_str = "#%02x%02x%02x" % (red, green, blue) - fg_code = "%02x%02x%02x" % (red, green, blue) - fg_code = fg_code[0] + fg_code[2] + fg_code[4] - - # ok, first create foreground #rbg - red = int(bg[1]) * 204 + int(bg[0]) * int(bg[1]) * 51 - green = int(bg[2]) * 204 + int(bg[0]) * int(bg[2]) * 51 - blue = int(bg[3]) * 204 + int(bg[0]) * int(bg[3]) * 51 - bg_str = "#%02x%02x%02x" % (red, green, blue) - bg_code = "%02x%02x%02x" % (red, green, blue) - bg_code = bg_code[0] + bg_code[2] + bg_code[4] - - # build value for color_changes - - color = {'guifg': fg_str, 'guibg': bg_str} - - if self.color_mode == 'conceal': - color['fg_code'] = fg_code - color['bg_code'] = bg_code - - self.color_cache[attr] = color - - return color - - # }}} - - ######################################################################### - # write virtual key code to shared memory using proprietary escape seq - - def write_vk(self, vk_code): # {{{ - - self.proc.write_vk(vk_code) - - # }}} - - # ********************************************************************************************* - # resize if needed - - def update_window_size(self): # {{{ - - if vim.current.window.width != self.columns or vim.current.window.height != self.lines: - - # reset all window size attributes to default - self.columns = vim.current.window.width - self.lines = vim.current.window.height - self.working_columns = vim.current.window.width - self.working_lines = vim.current.window.height - self.bottom = vim.current.window.height - - self.proc.window_resize(vim.current.window.height, vim.current.window.width) - - # }}} - - # ********************************************************************************************* - # resize if needed - - def set_cursor(self, line, column): # {{{ - - # shift cursor position to handle concealed text - if self.enable_colors and self.color_mode == 'conceal': - if line - 1 in self.color_conceals: - for c in self.color_conceals[line - 1]: - if c < column: - column += 7 - else: - break - - # figure out line - real_line = line - if real_line > len(self.buffer): - for l in range(len(self.buffer) - 1, real_line): - self.buffer.append('') - - # figure out column - real_column = column - if len(self.buffer[real_line - 1]) < real_column: - self.buffer[real_line - 1] = self.buffer[real_line - 1] + ' ' * (real_column - len(self.buffer[real_line - 1])) - - # python version is occasionally grumpy - try: - vim.current.window.cursor = (real_line, real_column - 1) - except: - vim.command('call cursor(' + str(real_line) + ', ' + str(real_column) + ')') - # }}} - - - # ********************************************************************************************* - # go into idle mode - - def idle(self): # {{{ - - self.proc.idle() - - # }}} - - # ********************************************************************************************* - # resume from idle mode - - def resume(self): # {{{ - - self.proc.resume() - - # }}} - - # ********************************************************************************************* - # end subprocess - - def close(self): - self.proc.close() - - # ********************************************************************************************* - # end subprocess forcefully - - def abort(self): - self.proc.close() - - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_sole_communicator.py b/bundle/conque_2.0/autoload/conque_term/conque_sole_communicator.py deleted file mode 100644 index 5c19ff3f..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_sole_communicator.py +++ /dev/null @@ -1,183 +0,0 @@ -# FILE: autoload/conque_term/conque_sole_communicator.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -""" -ConqueSoleCommunicator - -Script to transfer communications between python being run in Vim and a -subprocess run inside a Windows console. This is required since interactive -programs in Windows appear to require a console, and python run in Vim is -not attached to any console. So a console version of python must be initiated -for the subprocess. Communication is then done with the use of shared memory -objects. Good times! -""" - -import time -import sys - -from conque_globals import * -from conque_win32_util import * -from conque_sole_subprocess import * -from conque_sole_shared_memory import * - -############################################################## -# only run if this file was run directly - -if __name__ == '__main__': - - # attempt to catch ALL exceptions to fend of zombies - try: - - # startup and config {{{ - - # simple arg validation - - if len(sys.argv) < 5: - - exit() - - # shared memory size - CONQUE_SOLE_COMMANDS_SIZE = 255 - - # maximum time this thing reads. 0 means no limit. Only for testing. - max_loops = 0 - - # read interval, in seconds - sleep_time = 0.01 - - # idle read interval, in seconds - idle_sleep_time = 0.10 - - # are we idled? - is_idle = False - - # mem key - mem_key = sys.argv[1] - - # console width - console_width = int(sys.argv[2]) - - # console height - console_height = int(sys.argv[3]) - - # the actual subprocess to run - cmd_line = " ".join(sys.argv[4:]) - - - # width and height - options = {'LINES': console_height, 'COLUMNS': console_width} - - - - # set initial idle status - shm_command = ConqueSoleSharedMemory(CONQUE_SOLE_COMMANDS_SIZE, 'command', mem_key, serialize=True) - shm_command.create('write') - - cmd = shm_command.read() - if cmd: - - if cmd['cmd'] == 'idle': - is_idle = True - shm_command.clear() - - # }}} - - ############################################################## - # Create the subprocess - - # {{{ - proc = ConqueSoleSubprocess() - res = proc.open(cmd_line, mem_key, options) - - if not res: - - exit() - - # }}} - - ############################################################## - # main loop! - - loops = 0 - - while True: - - # check for idle/resume - if is_idle or loops % 25 == 0: - - # check process health - if not proc.is_alive(): - - proc.close() - exit() - - # check for change in buffer focus - cmd = shm_command.read() - if cmd: - - if cmd['cmd'] == 'idle': - is_idle = True - shm_command.clear() - - elif cmd['cmd'] == 'resume': - is_idle = False - shm_command.clear() - - - # sleep between loops if moderation is requested - if sleep_time > 0: - if is_idle: - time.sleep(idle_sleep_time) - else: - time.sleep(sleep_time) - - # write, read, etc - proc.write() - proc.read() - - # increment loops, and exit if max has been reached - loops += 1 - if max_loops and loops >= max_loops: - - break - - ############################################################## - # all done! - - - - proc.close() - - # if an exception was thrown, croak - except: - - proc.close() - - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_sole_shared_memory.py b/bundle/conque_2.0/autoload/conque_term/conque_sole_shared_memory.py deleted file mode 100644 index 32817ac6..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_sole_shared_memory.py +++ /dev/null @@ -1,202 +0,0 @@ -# FILE: autoload/conque_term/conque_sole_shared_memory.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -"""Wrapper class for shared memory between Windows python processes""" - -import mmap -import sys - -if sys.version_info[0] == 2: - CONQUE_PYTHON_VERSION = 2 -else: - CONQUE_PYTHON_VERSION = 3 - -if CONQUE_PYTHON_VERSION == 2: - import cPickle as pickle -else: - import pickle - - -class ConqueSoleSharedMemory(): - - # **************************************************************************** - # class properties - - # {{{ - - # is the data being stored not fixed length - fixed_length = False - - # fill memory with this character when clearing and fixed_length is true - fill_char = ' ' - - # serialize and unserialize data automatically - serialize = False - - # size of shared memory, in bytes / chars - mem_size = None - - # size of shared memory, in bytes / chars - mem_type = None - - # unique key, so multiple console instances are possible - mem_key = None - - # mmap instance - shm = None - - # character encoding, dammit - encoding = 'ascii' - - # pickle terminator - TERMINATOR = None - - # }}} - - # **************************************************************************** - # constructor I guess - - def __init__(self, mem_size, mem_type, mem_key, fixed_length=False, fill_char=' ', serialize=False, encoding='ascii'): # {{{ - - self.mem_size = mem_size - self.mem_type = mem_type - self.mem_key = mem_key - self.fixed_length = fixed_length - self.fill_char = fill_char - self.serialize = serialize - self.encoding = encoding - self.TERMINATOR = str(chr(0)).encode(self.encoding) - - # }}} - - # **************************************************************************** - # create memory block - - def create(self, access='write'): # {{{ - - if access == 'write': - mmap_access = mmap.ACCESS_WRITE - else: - mmap_access = mmap.ACCESS_READ - - name = "conque_%s_%s" % (self.mem_type, self.mem_key) - - self.shm = mmap.mmap(0, self.mem_size, name, mmap_access) - - if not self.shm: - return False - else: - return True - - # }}} - - # **************************************************************************** - # read data - - def read(self, chars=1, start=0): # {{{ - - # invalid reads - if self.fixed_length and (chars == 0 or start + chars > self.mem_size): - return '' - - # go to start position - self.shm.seek(start) - - if not self.fixed_length: - chars = self.shm.find(self.TERMINATOR) - - if chars == 0: - return '' - - shm_str = self.shm.read(chars) - - # return unpickled byte object - if self.serialize: - return pickle.loads(shm_str) - - # decode byes in python 3 - if CONQUE_PYTHON_VERSION == 3: - return str(shm_str, self.encoding) - - # encoding - if self.encoding != 'ascii': - shm_str = unicode(shm_str, self.encoding) - - return shm_str - - # }}} - - # **************************************************************************** - # write data - - def write(self, text, start=0): # {{{ - - # simple scenario, let pickle create bytes - if self.serialize: - if CONQUE_PYTHON_VERSION == 3: - tb = pickle.dumps(text, 0) - else: - tb = pickle.dumps(text, 0).encode(self.encoding) - - else: - tb = text.encode(self.encoding, 'replace') - - self.shm.seek(start) - - # write to memory - if self.fixed_length: - self.shm.write(tb) - else: - self.shm.write(tb + self.TERMINATOR) - - # }}} - - # **************************************************************************** - # clear - - def clear(self, start=0): # {{{ - - self.shm.seek(start) - - if self.fixed_length: - self.shm.write(str(self.fill_char * self.mem_size).encode(self.encoding)) - else: - self.shm.write(self.TERMINATOR) - - # }}} - - # **************************************************************************** - # close - - def close(self): - - self.shm.close() - - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_sole_subprocess.py b/bundle/conque_2.0/autoload/conque_term/conque_sole_subprocess.py deleted file mode 100644 index 350a7dff..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_sole_subprocess.py +++ /dev/null @@ -1,753 +0,0 @@ -# FILE: autoload/conque_term/conque_sole_subprocess.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -""" ConqueSoleSubprocess {{{ - -Creates a new subprocess with it's own (hidden) console window. - -Mirrors console window text onto a block of shared memory (mmap), along with -text attribute data. Also handles translation of text input into the format -Windows console expects. - -Sample Usage: - - sh = ConqueSoleSubprocess() - sh.open("cmd.exe", "unique_str") - - shm_in = ConqueSoleSharedMemory(mem_key = "unique_str", mem_type = "input", ...) - shm_out = ConqueSoleSharedMemory(mem_key = "unique_str", mem_type = "output", ...) - - output = shm_out.read(...) - shm_in.write("dir\r") - output = shm_out.read(...) - -Requirements: - - * Python for Windows extensions. Available at http://sourceforge.net/projects/pywin32/ - * Must be run from process attached to an existing console. - -}}} """ - -import time -import re -import os -import ctypes - -from conque_globals import * -from conque_win32_util import * -from conque_sole_shared_memory import * - - -class ConqueSoleSubprocess(): - - # Class properties {{{ - - #window = None - handle = None - pid = None - - # input / output handles - stdin = None - stdout = None - - # size of console window - window_width = 160 - window_height = 40 - - # max lines for the console buffer - buffer_width = 160 - buffer_height = 100 - - # keep track of the buffer number at the top of the window - top = 0 - line_offset = 0 - - # buffer height is CONQUE_SOLE_BUFFER_LENGTH * output_blocks - output_blocks = 1 - - # cursor position - cursor_line = 0 - cursor_col = 0 - - # console data, array of lines - data = [] - - # console attribute data, array of array of int - attributes = [] - attribute_cache = {} - - # default attribute - default_attribute = 7 - - # shared memory objects - shm_input = None - shm_output = None - shm_attributes = None - shm_stats = None - shm_command = None - shm_rescroll = None - shm_resize = None - - # are we still a valid process? - is_alive = True - - # used for periodic execution of screen and memory redrawing - screen_redraw_ct = 0 - mem_redraw_ct = 0 - - # }}} - - # **************************************************************************** - # initialize class instance - - def __init__(self): # {{{ - - pass - - # }}} - - # **************************************************************************** - # Create proccess cmd - - def open(self, cmd, mem_key, options={}): # {{{ - - - - self.reset = True - - try: - # if we're already attached to a console, then unattach - try: - ctypes.windll.kernel32.FreeConsole() - except: - pass - - # set buffer height - self.buffer_height = CONQUE_SOLE_BUFFER_LENGTH - - if 'LINES' in options and 'COLUMNS' in options: - self.window_width = options['COLUMNS'] - self.window_height = options['LINES'] - self.buffer_width = options['COLUMNS'] - - # console window options - si = STARTUPINFO() - - # hide window - si.dwFlags |= STARTF_USESHOWWINDOW - si.wShowWindow = SW_HIDE - #si.wShowWindow = SW_MINIMIZE - - # process options - flags = NORMAL_PRIORITY_CLASS | CREATE_NEW_PROCESS_GROUP | CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE - - # created process info - pi = PROCESS_INFORMATION() - - - - # create the process! - res = ctypes.windll.kernel32.CreateProcessW(None, u(cmd), None, None, 0, flags, None, u('.'), ctypes.byref(si), ctypes.byref(pi)) - - - - - self.pid = pi.dwProcessId - self.handle = pi.hProcess - - - - # attach ourselves to the new console - # console is not immediately available - for i in range(10): - time.sleep(1) - try: - - res = ctypes.windll.kernel32.AttachConsole(self.pid) - - - - - - - break - except: - - pass - - # get input / output handles - self.stdout = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE) - self.stdin = ctypes.windll.kernel32.GetStdHandle(STD_INPUT_HANDLE) - - # set buffer size - size = COORD(self.buffer_width, self.buffer_height) - res = ctypes.windll.kernel32.SetConsoleScreenBufferSize(self.stdout, size) - - - - - - - - # prev set size call needs to process - time.sleep(0.2) - - # set window size - self.set_window_size(self.window_width, self.window_height) - - # init shared memory - self.init_shared_memory(mem_key) - - # init read buffers - self.tc = ctypes.create_unicode_buffer(self.buffer_width) - self.ac = ctypes.create_unicode_buffer(self.buffer_width) - - return True - - except: - - return False - - # }}} - - # **************************************************************************** - # create shared memory objects - - def init_shared_memory(self, mem_key): # {{{ - - buf_info = self.get_buffer_info() - - - - - self.shm_input = ConqueSoleSharedMemory(CONQUE_SOLE_INPUT_SIZE, 'input', mem_key) - self.shm_input.create('write') - self.shm_input.clear() - - self.shm_output = ConqueSoleSharedMemory(self.buffer_height * self.buffer_width, 'output', mem_key, True) - self.shm_output.create('write') - self.shm_output.clear() - - self.shm_attributes = ConqueSoleSharedMemory(self.buffer_height * self.buffer_width, 'attributes', mem_key, True, chr(buf_info.wAttributes), encoding='latin-1') - self.shm_attributes.create('write') - self.shm_attributes.clear() - - self.shm_stats = ConqueSoleSharedMemory(CONQUE_SOLE_STATS_SIZE, 'stats', mem_key, serialize=True) - self.shm_stats.create('write') - self.shm_stats.clear() - - self.shm_command = ConqueSoleSharedMemory(CONQUE_SOLE_COMMANDS_SIZE, 'command', mem_key, serialize=True) - self.shm_command.create('write') - self.shm_command.clear() - - self.shm_resize = ConqueSoleSharedMemory(CONQUE_SOLE_RESIZE_SIZE, 'resize', mem_key, serialize=True) - self.shm_resize.create('write') - self.shm_resize.clear() - - self.shm_rescroll = ConqueSoleSharedMemory(CONQUE_SOLE_RESCROLL_SIZE, 'rescroll', mem_key, serialize=True) - self.shm_rescroll.create('write') - self.shm_rescroll.clear() - - return True - - # }}} - - # **************************************************************************** - # check for and process commands - - def check_commands(self): # {{{ - - cmd = self.shm_command.read() - - if cmd: - - # shut it all down - if cmd['cmd'] == 'close': - - # clear command - self.shm_command.clear() - - self.close() - return - - cmd = self.shm_resize.read() - - if cmd: - - # clear command - self.shm_resize.clear() - - # resize console - if cmd['cmd'] == 'resize': - - - - # only change buffer width if it's larger - if cmd['data']['width'] > self.buffer_width: - self.buffer_width = cmd['data']['width'] - - # always change console width and height - self.window_width = cmd['data']['width'] - self.window_height = cmd['data']['height'] - - # reset the console - buf_info = self.get_buffer_info() - self.reset_console(buf_info, add_block=False) - - # }}} - - # **************************************************************************** - # read from windows console and update output buffer - - def read(self, timeout=0): # {{{ - - # no point really - if self.screen_redraw_ct == 0 and not self.is_alive(): - stats = {'top_offset': 0, 'default_attribute': 0, 'cursor_x': 0, 'cursor_y': self.cursor_line, 'is_alive': 0} - - self.shm_stats.write(stats) - return - - # check for commands - self.check_commands() - - # emulate timeout by sleeping timeout time - if timeout > 0: - read_timeout = float(timeout) / 1000 - - time.sleep(read_timeout) - - # get cursor position - buf_info = self.get_buffer_info() - curs_line = buf_info.dwCursorPosition.Y - curs_col = buf_info.dwCursorPosition.X - - # set update range - if curs_line != self.cursor_line or self.top != buf_info.srWindow.Top or self.screen_redraw_ct == CONQUE_SOLE_SCREEN_REDRAW: - self.screen_redraw_ct = 0 - - read_start = self.top - read_end = buf_info.srWindow.Bottom + 1 - else: - - read_start = curs_line - read_end = curs_line + 1 - - # vars used in for loop - coord = COORD(0, 0) - chars_read = ctypes.c_int(0) - - # read new data - for i in range(read_start, read_end): - - coord.Y = i - - res = ctypes.windll.kernel32.ReadConsoleOutputCharacterW(self.stdout, ctypes.byref(self.tc), self.buffer_width, coord, ctypes.byref(chars_read)) - ctypes.windll.kernel32.ReadConsoleOutputAttribute(self.stdout, ctypes.byref(self.ac), self.buffer_width, coord, ctypes.byref(chars_read)) - - t = self.tc.value - a = self.ac.value - - - - - # add data - if i >= len(self.data): - self.data.append(t) - self.attributes.append(a) - else: - self.data[i] = t - self.attributes[i] = a - - # write new output to shared memory - if self.mem_redraw_ct == CONQUE_SOLE_MEM_REDRAW: - self.mem_redraw_ct = 0 - - self.shm_output.write(''.join(self.data)) - self.shm_attributes.write(''.join(self.attributes)) - else: - - self.shm_output.write(text=''.join(self.data[read_start:read_end]), start=read_start * self.buffer_width) - self.shm_attributes.write(text=''.join(self.attributes[read_start:read_end]), start=read_start * self.buffer_width) - - # write cursor position to shared memory - stats = {'top_offset': buf_info.srWindow.Top, 'default_attribute': buf_info.wAttributes, 'cursor_x': curs_col, 'cursor_y': curs_line, 'is_alive': 1} - self.shm_stats.write(stats) - - - # adjust screen position - self.top = buf_info.srWindow.Top - self.cursor_line = curs_line - - # check for reset - if curs_line > buf_info.dwSize.Y - 200: - self.reset_console(buf_info) - - # increment redraw counters - self.screen_redraw_ct += 1 - self.mem_redraw_ct += 1 - - return None - - # }}} - - # **************************************************************************** - # clear the console and set cursor at home position - - def reset_console(self, buf_info, add_block=True): # {{{ - - # sometimes we just want to change the buffer width, - # in which case no need to add another block - if add_block: - self.output_blocks += 1 - - # close down old memory - self.shm_output.close() - self.shm_output = None - - self.shm_attributes.close() - self.shm_attributes = None - - # new shared memory key - mem_key = 'mk' + str(time.time()) - - # reallocate memory - self.shm_output = ConqueSoleSharedMemory(self.buffer_height * self.buffer_width * self.output_blocks, 'output', mem_key, True) - self.shm_output.create('write') - self.shm_output.clear() - - # backfill data - if len(self.data[0]) < self.buffer_width: - for i in range(0, len(self.data)): - self.data[i] = self.data[i] + ' ' * (self.buffer_width - len(self.data[i])) - self.shm_output.write(''.join(self.data)) - - self.shm_attributes = ConqueSoleSharedMemory(self.buffer_height * self.buffer_width * self.output_blocks, 'attributes', mem_key, True, chr(buf_info.wAttributes), encoding='latin-1') - self.shm_attributes.create('write') - self.shm_attributes.clear() - - # backfill attributes - if len(self.attributes[0]) < self.buffer_width: - for i in range(0, len(self.attributes)): - self.attributes[i] = self.attributes[i] + chr(buf_info.wAttributes) * (self.buffer_width - len(self.attributes[i])) - self.shm_attributes.write(''.join(self.attributes)) - - # notify wrapper of new output block - self.shm_rescroll.write({'cmd': 'new_output', 'data': {'blocks': self.output_blocks, 'mem_key': mem_key}}) - - # set buffer size - size = COORD(X=self.buffer_width, Y=self.buffer_height * self.output_blocks) - - res = ctypes.windll.kernel32.SetConsoleScreenBufferSize(self.stdout, size) - - - - - - - # prev set size call needs to process - time.sleep(0.2) - - # set window size - self.set_window_size(self.window_width, self.window_height) - - # init read buffers - self.tc = ctypes.create_unicode_buffer(self.buffer_width) - self.ac = ctypes.create_unicode_buffer(self.buffer_width) - - # }}} - - # **************************************************************************** - # write text to console. this function just parses out special sequences for - # special key events and passes on the text to the plain or virtual key functions - - def write(self): # {{{ - - # get input from shared mem - text = self.shm_input.read() - - # nothing to do here - if text == '': - return - - - - # clear input queue - self.shm_input.clear() - - # split on VK codes - chunks = CONQUE_SEQ_REGEX_VK.split(text) - - # if len() is one then no vks - if len(chunks) == 1: - self.write_plain(text) - return - - - - # loop over chunks and delegate - for t in chunks: - - if t == '': - continue - - if CONQUE_SEQ_REGEX_VK.match(t): - - self.write_vk(t[2:-2]) - else: - self.write_plain(t) - - # }}} - - # **************************************************************************** - - def write_plain(self, text): # {{{ - - li = INPUT_RECORD * len(text) - list_input = li() - - for i in range(0, len(text)): - # create keyboard input - ke = KEY_EVENT_RECORD() - ke.bKeyDown = ctypes.c_byte(1) - ke.wRepeatCount = ctypes.c_short(1) - - cnum = ord(text[i]) - ke.wVirtualKeyCode = ctypes.windll.user32.VkKeyScanW(cnum) - ke.wVirtualScanCode = ctypes.c_short(ctypes.windll.user32.MapVirtualKeyW(int(cnum), 0)) - - if cnum > 31: - ke.uChar.UnicodeChar = u(chr(cnum)) - elif cnum == 3: - ctypes.windll.kernel32.GenerateConsoleCtrlEvent(0, self.pid) - ke.uChar.UnicodeChar = u(chr(cnum)) - ke.wVirtualKeyCode = ctypes.windll.user32.VkKeyScanW(cnum + 96) - ke.dwControlKeyState = LEFT_CTRL_PRESSED - else: - ke.uChar.UnicodeChar = u(chr(cnum)) - if cnum in CONQUE_WINDOWS_VK_INV: - ke.wVirtualKeyCode = cnum - else: - ke.wVirtualKeyCode = ctypes.windll.user32.VkKeyScanW(cnum + 96) - ke.dwControlKeyState = LEFT_CTRL_PRESSED - - kc = INPUT_RECORD(KEY_EVENT) - kc.Event.KeyEvent = ke - list_input[i] = kc - - - - # write input array - events_written = ctypes.c_int() - res = ctypes.windll.kernel32.WriteConsoleInputW(self.stdin, list_input, len(text), ctypes.byref(events_written)) - - - - - - - - - # }}} - - # **************************************************************************** - - def write_vk(self, vk_code): # {{{ - - - li = INPUT_RECORD * 1 - - # create keyboard input - ke = KEY_EVENT_RECORD() - ke.uChar.UnicodeChar = u(chr(0)) - ke.wVirtualKeyCode = ctypes.c_short(int(vk_code)) - ke.wVirtualScanCode = ctypes.c_short(ctypes.windll.user32.MapVirtualKeyW(int(vk_code), 0)) - ke.bKeyDown = ctypes.c_byte(1) - ke.wRepeatCount = ctypes.c_short(1) - - # set enhanced key mode for arrow keys - if vk_code in CONQUE_WINDOWS_VK_ENHANCED: - - ke.dwControlKeyState = ENHANCED_KEY - - kc = INPUT_RECORD(KEY_EVENT) - kc.Event.KeyEvent = ke - list_input = li(kc) - - # write input array - events_written = ctypes.c_int() - res = ctypes.windll.kernel32.WriteConsoleInputW(self.stdin, list_input, 1, ctypes.byref(events_written)) - - - - - - - - # }}} - - # **************************************************************************** - - def close(self): # {{{ - - # record status - self.is_alive = False - try: - stats = {'top_offset': 0, 'default_attribute': 0, 'cursor_x': 0, 'cursor_y': self.cursor_line, 'is_alive': 0} - self.shm_stats.write(stats) - except: - pass - - pid_list = (ctypes.c_int * 10)() - num = ctypes.windll.kernel32.GetConsoleProcessList(pid_list, 10) - - - - current_pid = os.getpid() - - - - - - # kill subprocess pids - for pid in pid_list[0:num]: - if not pid: - break - - # kill current pid last - if pid == current_pid: - continue - try: - self.close_pid(pid) - except: - - pass - - # kill this process - try: - self.close_pid(current_pid) - except: - - pass - - def close_pid(self, pid): - - handle = ctypes.windll.kernel32.OpenProcess(PROCESS_TERMINATE, 0, pid) - ctypes.windll.kernel32.TerminateProcess(handle, -1) - ctypes.windll.kernel32.CloseHandle(handle) - - # }}} - - # **************************************************************************** - # check process health - - def is_alive(self): # {{{ - - status = ctypes.windll.kernel32.WaitForSingleObject(self.handle, 1) - - if status == 0: - - self.is_alive = False - - return self.is_alive - - # }}} - - - # **************************************************************************** - # return screen data as string - - def get_screen_text(self): # {{{ - - return "\n".join(self.data) - - # }}} - - # **************************************************************************** - - def set_window_size(self, width, height): # {{{ - - - - # get current window size object - window_size = SMALL_RECT(0, 0, 0, 0) - - # buffer info has maximum window size data - buf_info = self.get_buffer_info() - - - # set top left corner - window_size.Top = 0 - window_size.Left = 0 - - # set bottom right corner - if buf_info.dwMaximumWindowSize.X < width: - - window_size.Right = buf_info.dwMaximumWindowSize.X - 1 - else: - window_size.Right = width - 1 - - if buf_info.dwMaximumWindowSize.Y < height: - - window_size.Bottom = buf_info.dwMaximumWindowSize.Y - 1 - else: - window_size.Bottom = height - 1 - - - - # set the window size! - res = ctypes.windll.kernel32.SetConsoleWindowInfo(self.stdout, ctypes.c_bool(True), ctypes.byref(window_size)) - - - - - - - # reread buffer info to get final console max lines - buf_info = self.get_buffer_info() - - self.window_width = buf_info.srWindow.Right + 1 - self.window_height = buf_info.srWindow.Bottom + 1 - - # }}} - - # **************************************************************************** - # get buffer info, used a lot - - def get_buffer_info(self): # {{{ - - buf_info = CONSOLE_SCREEN_BUFFER_INFO() - ctypes.windll.kernel32.GetConsoleScreenBufferInfo(self.stdout, ctypes.byref(buf_info)) - - return buf_info - - # }}} - - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_sole_wrapper.py b/bundle/conque_2.0/autoload/conque_term/conque_sole_wrapper.py deleted file mode 100644 index 3d480c92..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_sole_wrapper.py +++ /dev/null @@ -1,304 +0,0 @@ -# FILE: autoload/conque_term/conque_sole_wrapper.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -""" ConqueSoleSubprocessWrapper {{{ - -Subprocess wrapper to deal with Windows insanity. Launches console based python, -which in turn launches originally requested command. Communicates with cosole -python through shared memory objects. - -}}} """ - -import ctypes -import time - - -class ConqueSoleWrapper(): - - # class properties {{{ - - shm_key = '' - - # process info - handle = None - pid = None - - # queue input in this bucket - bucket = None - - # console size - # NOTE: columns should never change after open() is called - lines = 24 - columns = 80 - - # shared memory objects - shm_input = None - shm_output = None - shm_attributes = None - shm_stats = None - shm_command = None - shm_rescroll = None - shm_resize = None - - # console python process - proc = None - - # }}} - - ######################################################################### - # unused - - def __init__(self): # {{{ - self.bucket = u('') - - # }}} - - ######################################################################### - # run communicator process which will in turn run cmd - - def open(self, cmd, options={}, python_exe='python.exe', communicator_py='conque_sole_communicator.py'): # {{{ - - self.lines = options['LINES'] - self.columns = options['COLUMNS'] - - # create a shm key - self.shm_key = 'mk' + str(time.time()) - - # python command - cmd_line = '%s "%s" %s %d %d %s' % (python_exe, communicator_py, self.shm_key, int(self.columns), int(self.lines), cmd) - - - # console window attributes - flags = NORMAL_PRIORITY_CLASS | DETACHED_PROCESS - si = STARTUPINFO() - pi = PROCESS_INFORMATION() - - # start the stupid process already - try: - res = ctypes.windll.kernel32.CreateProcessW(None, u(cmd_line), None, None, 0, flags, None, u('.'), ctypes.byref(si), ctypes.byref(pi)) - except: - - raise - - # handle - self.pid = pi.dwProcessId - - - - # init shared memory objects - self.init_shared_memory(self.shm_key) - - # }}} - - ######################################################################### - # read output from shared memory - - def read(self, start_line, num_lines, timeout=0): # {{{ - - # emulate timeout by sleeping timeout time - if timeout > 0: - read_timeout = float(timeout) / 1000 - - time.sleep(read_timeout) - - output = [] - attributes = [] - - # get output - for i in range(start_line, start_line + num_lines + 1): - output.append(self.shm_output.read(self.columns, i * self.columns)) - attributes.append(self.shm_attributes.read(self.columns, i * self.columns)) - - return (output, attributes) - - # }}} - - ######################################################################### - # get current cursor/scroll position - - def get_stats(self): # {{{ - - try: - rescroll = self.shm_rescroll.read() - if rescroll != '' and rescroll != None: - - - - self.shm_rescroll.clear() - - # close down old memory - self.shm_output.close() - self.shm_output = None - - self.shm_attributes.close() - self.shm_attributes = None - - # reallocate memory - - self.shm_output = ConqueSoleSharedMemory(CONQUE_SOLE_BUFFER_LENGTH * self.columns * rescroll['data']['blocks'], 'output', rescroll['data']['mem_key'], True) - self.shm_output.create('read') - - self.shm_attributes = ConqueSoleSharedMemory(CONQUE_SOLE_BUFFER_LENGTH * self.columns * rescroll['data']['blocks'], 'attributes', rescroll['data']['mem_key'], True, encoding='latin-1') - self.shm_attributes.create('read') - - stats_str = self.shm_stats.read() - if stats_str != '': - self.stats = stats_str - else: - return False - except: - - return False - - return self.stats - - # }}} - - ######################################################################### - # get process status - - def is_alive(self): # {{{ - if not self.shm_stats: - return True - - stats_str = self.shm_stats.read() - if stats_str: - return (stats_str['is_alive']) - else: - return True - # }}} - - ######################################################################### - # write input to shared memory - - def write(self, text): # {{{ - - self.bucket += u(text, 'ascii', 'replace') - - - - istr = self.shm_input.read() - - if istr == '': - - self.shm_input.write(self.bucket[:500]) - self.bucket = self.bucket[500:] - - # }}} - - ######################################################################### - # write virtual key code to shared memory using proprietary escape seq - - def write_vk(self, vk_code): # {{{ - - seq = "\x1b[" + str(vk_code) + "VK" - self.write(seq) - - # }}} - - ######################################################################### - # idle - - def idle(self): # {{{ - - - self.shm_command.write({'cmd': 'idle', 'data': {}}) - - # }}} - - ######################################################################### - # resume - - def resume(self): # {{{ - - self.shm_command.write({'cmd': 'resume', 'data': {}}) - - # }}} - - ######################################################################### - # shut it all down - - def close(self): # {{{ - - self.shm_command.write({'cmd': 'close', 'data': {}}) - time.sleep(0.2) - - # }}} - - ######################################################################### - # resize console window - - def window_resize(self, lines, columns): # {{{ - - self.lines = lines - - # we don't shrink buffer width - if columns > self.columns: - self.columns = columns - - self.shm_resize.write({'cmd': 'resize', 'data': {'width': columns, 'height': lines}}) - - # }}} - - # **************************************************************************** - # create shared memory objects - - def init_shared_memory(self, mem_key): # {{{ - - self.shm_input = ConqueSoleSharedMemory(CONQUE_SOLE_INPUT_SIZE, 'input', mem_key) - self.shm_input.create('write') - self.shm_input.clear() - - self.shm_output = ConqueSoleSharedMemory(CONQUE_SOLE_BUFFER_LENGTH * self.columns, 'output', mem_key, True) - self.shm_output.create('write') - - self.shm_attributes = ConqueSoleSharedMemory(CONQUE_SOLE_BUFFER_LENGTH * self.columns, 'attributes', mem_key, True, encoding='latin-1') - self.shm_attributes.create('write') - - self.shm_stats = ConqueSoleSharedMemory(CONQUE_SOLE_STATS_SIZE, 'stats', mem_key, serialize=True) - self.shm_stats.create('write') - self.shm_stats.clear() - - self.shm_command = ConqueSoleSharedMemory(CONQUE_SOLE_COMMANDS_SIZE, 'command', mem_key, serialize=True) - self.shm_command.create('write') - self.shm_command.clear() - - self.shm_resize = ConqueSoleSharedMemory(CONQUE_SOLE_RESIZE_SIZE, 'resize', mem_key, serialize=True) - self.shm_resize.create('write') - self.shm_resize.clear() - - self.shm_rescroll = ConqueSoleSharedMemory(CONQUE_SOLE_RESCROLL_SIZE, 'rescroll', mem_key, serialize=True) - self.shm_rescroll.create('write') - self.shm_rescroll.clear() - - return True - - # }}} - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_subprocess.py b/bundle/conque_2.0/autoload/conque_term/conque_subprocess.py deleted file mode 100644 index db2b93c3..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_subprocess.py +++ /dev/null @@ -1,195 +0,0 @@ -# FILE: autoload/conque_term/conque_subprocess.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -""" -ConqueSubprocess - -Create and interact with a subprocess through a pty. - -Usage: - - p = ConqueSubprocess() - p.open('bash', {'TERM':'vt100'}) - output = p.read() - p.write('cd ~/vim' + "\r") - p.write('ls -lha' + "\r") - output += p.read(timeout = 500) - p.close() -""" - -if CONQUE_PLATFORM == 'nix': - import os - import signal - import pty - import tty - import select - import fcntl - import termios - import struct - - -class ConqueSubprocess: - - # process id - pid = 0 - - # stdout+stderr file descriptor - fd = None - - # constructor - def __init__(self): # {{{ - self.pid = 0 - # }}} - - # create pty + subprocess - def open(self, command, env={}): # {{{ - - # parse command - command_arr = command.split() - executable = command_arr[0] - args = command_arr - - # try to fork a new pty - try: - self.pid, self.fd = pty.fork() - - except: - - return False - - # child proc, replace with command after altering terminal attributes - if self.pid == 0: - - # set requested environment variables - for k in env.keys(): - os.environ[k] = env[k] - - # set some attributes - try: - attrs = tty.tcgetattr(1) - attrs[0] = attrs[0] ^ tty.IGNBRK - attrs[0] = attrs[0] | tty.BRKINT | tty.IXANY | tty.IMAXBEL - attrs[2] = attrs[2] | tty.HUPCL - attrs[3] = attrs[3] | tty.ICANON | tty.ECHO | tty.ISIG | tty.ECHOKE - attrs[6][tty.VMIN] = 1 - attrs[6][tty.VTIME] = 0 - tty.tcsetattr(1, tty.TCSANOW, attrs) - except: - - pass - - # replace this process with the subprocess - os.execvp(executable, args) - - # else master, do nothing - else: - pass - - # }}} - - # read from pty - # XXX - select.poll() doesn't work in OS X!!!!!!! - def read(self, timeout=1): # {{{ - - output = '' - read_timeout = float(timeout) / 1000 - - try: - # read from fd until no more output - while 1: - s_read, s_write, s_error = select.select([self.fd], [], [], read_timeout) - - lines = '' - for s_fd in s_read: - try: - lines = os.read(self.fd, 32) - except: - pass - output = output + lines.decode('utf-8') - - if lines == '': - break - except: - pass - - return output - # }}} - - # I guess this one's not bad - def write(self, input): # {{{ - try: - if CONQUE_PYTHON_VERSION == 2: - os.write(self.fd, input) - else: - os.write(self.fd, bytes(input, 'utf-8')) - except: - - pass - # }}} - - # signal process - def signal(self, signum): # {{{ - try: - os.kill(self.pid, signum) - except: - pass - # }}} - - # close process - def close(self): # {{{ - self.signal(15) - # }}} - - # get process status - def is_alive(self): #{{{ - - p_status = True - - try: - if os.waitpid(self.pid, os.WNOHANG)[0]: - p_status = False - except: - p_status = False - - return p_status - - # }}} - - # update window size in kernel, then send SIGWINCH to fg process - def window_resize(self, lines, columns): # {{{ - try: - fcntl.ioctl(self.fd, termios.TIOCSWINSZ, struct.pack("HHHH", lines, columns, 0, 0)) - os.kill(self.pid, signal.SIGWINCH) - except: - pass - - # }}} - - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/autoload/conque_term/conque_win32_util.py b/bundle/conque_2.0/autoload/conque_term/conque_win32_util.py deleted file mode 100644 index c11bdde4..00000000 --- a/bundle/conque_2.0/autoload/conque_term/conque_win32_util.py +++ /dev/null @@ -1,473 +0,0 @@ -# FILE: autoload/conque_term/conque_win32_util.py {{{ -# AUTHOR: Nico Raffo -# WEBSITE: http://conque.googlecode.com -# MODIFIED: 2010-11-15 -# VERSION: 2.0, for Vim 7.0 -# LICENSE: -# Conque - Vim terminal/console emulator -# Copyright (C) 2009-2010 Nico Raffo -# -# MIT License -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. }}} - -"""Python structures used for ctypes interaction""" - -from ctypes import * - -# Constants - -# create process flag constants {{{ - -CREATE_BREAKAWAY_FROM_JOB = 0x01000000 -CREATE_DEFAULT_ERROR_MODE = 0x04000000 -CREATE_NEW_CONSOLE = 0x00000010 -CREATE_NEW_PROCESS_GROUP = 0x00000200 -CREATE_NO_WINDOW = 0x08000000 -CREATE_PROTECTED_PROCESS = 0x00040000 -CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000 -CREATE_SEPARATE_WOW_VDM = 0x00000800 -CREATE_SHARED_WOW_VDM = 0x00001000 -CREATE_SUSPENDED = 0x00000004 -CREATE_UNICODE_ENVIRONMENT = 0x00000400 - - -DETACHED_PROCESS = 0x00000008 -EXTENDED_STARTUPINFO_PRESENT = 0x00080000 -INHERIT_PARENT_AFFINITY = 0x00010000 - -# }}} - -# process priority constants {{{ - -ABOVE_NORMAL_PRIORITY_CLASS = 0x00008000 -BELOW_NORMAL_PRIORITY_CLASS = 0x00004000 -HIGH_PRIORITY_CLASS = 0x00000080 -IDLE_PRIORITY_CLASS = 0x00000040 -NORMAL_PRIORITY_CLASS = 0x00000020 -REALTIME_PRIORITY_CLASS = 0x00000100 - -# }}} - -# startup info constants {{{ - -STARTF_FORCEONFEEDBACK = 0x00000040 -STARTF_FORCEOFFFEEDBACK = 0x00000080 -STARTF_PREVENTPINNING = 0x00002000 -STARTF_RUNFULLSCREEN = 0x00000020 -STARTF_TITLEISAPPID = 0x00001000 -STARTF_TITLEISLINKNAME = 0x00000800 -STARTF_USECOUNTCHARS = 0x00000008 -STARTF_USEFILLATTRIBUTE = 0x00000010 -STARTF_USEHOTKEY = 0x00000200 -STARTF_USEPOSITION = 0x00000004 -STARTF_USESHOWWINDOW = 0x00000001 -STARTF_USESIZE = 0x00000002 -STARTF_USESTDHANDLES = 0x00000100 - -# }}} - -# show window constants {{{ - -SW_FORCEMINIMIZE = 11 -SW_HIDE = 0 -SW_MAXIMIZE = 3 -SW_MINIMIZE = 6 -SW_RESTORE = 9 -SW_SHOW = 5 -SW_SHOWDEFAULT = 10 -SW_SHOWMAXIMIZED = 3 -SW_SHOWMINIMIZED = 2 -SW_SHOWMINNOACTIVE = 7 -SW_SHOWNA = 8 -SW_SHOWNOACTIVATE = 4 -SW_SHOWNORMAL = 1 - -# }}} - -# input event types {{{ - -FOCUS_EVENT = 0x0010 -KEY_EVENT = 0x0001 -MENU_EVENT = 0x0008 -MOUSE_EVENT = 0x0002 -WINDOW_BUFFER_SIZE_EVENT = 0x0004 - -# }}} - -# key event modifiers {{{ - -CAPSLOCK_ON = 0x0080 -ENHANCED_KEY = 0x0100 -LEFT_ALT_PRESSED = 0x0002 -LEFT_CTRL_PRESSED = 0x0008 -NUMLOCK_ON = 0x0020 -RIGHT_ALT_PRESSED = 0x0001 -RIGHT_CTRL_PRESSED = 0x0004 -SCROLLLOCK_ON = 0x0040 -SHIFT_PRESSED = 0x0010 - -# }}} - -# process access {{{ - -PROCESS_CREATE_PROCESS = 0x0080 -PROCESS_CREATE_THREAD = 0x0002 -PROCESS_DUP_HANDLE = 0x0040 -PROCESS_QUERY_INFORMATION = 0x0400 -PROCESS_QUERY_LIMITED_INFORMATION = 0x1000 -PROCESS_SET_INFORMATION = 0x0200 -PROCESS_SET_QUOTA = 0x0100 -PROCESS_SUSPEND_RESUME = 0x0800 -PROCESS_TERMINATE = 0x0001 -PROCESS_VM_OPERATION = 0x0008 -PROCESS_VM_READ = 0x0010 -PROCESS_VM_WRITE = 0x0020 - -# }}} - -# input / output handles {{{ - -STD_INPUT_HANDLE = c_ulong(-10) -STD_OUTPUT_HANDLE = c_ulong(-11) -STD_ERROR_HANDLE = c_ulong(-12) - -# }}} - -CONQUE_WINDOWS_VK = { # {{{ - 'VK_LBUTTON': 0x0001, - 'VK_RBUTTON': 0x0002, - 'VK_CANCEL': 0x0003, - 'VK_BACK': 0x0008, - 'VK_TAB': 0x0009, - 'VK_CLEAR': 0x000C, - 'VK_RETURN': 0x0D, - 'VK_SHIFT': 0x10, - 'VK_CONTROL': 0x11, - 'VK_MENU': 0x12, - 'VK_PAUSE': 0x0013, - 'VK_CAPITAL': 0x0014, - 'VK_ESCAPE': 0x001B, - 'VK_SPACE': 0x0020, - 'VK_PRIOR': 0x0021, - 'VK_NEXT': 0x0022, - 'VK_END': 0x0023, - 'VK_HOME': 0x0024, - 'VK_LEFT': 0x0025, - 'VK_UP': 0x0026, - 'VK_RIGHT': 0x0027, - 'VK_DOWN': 0x0028, - 'VK_SELECT': 0x0029, - 'VK_PRINT': 0x002A, - 'VK_EXECUTE': 0x002B, - 'VK_SNAPSHOT': 0x002C, - 'VK_INSERT': 0x002D, - 'VK_DELETE': 0x002E, - 'VK_HELP': 0x002F, - 'VK_0': 0x0030, - 'VK_1': 0x0031, - 'VK_2': 0x0032, - 'VK_3': 0x0033, - 'VK_4': 0x0034, - 'VK_5': 0x0035, - 'VK_6': 0x0036, - 'VK_7': 0x0037, - 'VK_8': 0x0038, - 'VK_9': 0x0039, - 'VK_A': 0x0041, - 'VK_B': 0x0042, - 'VK_C': 0x0043, - 'VK_D': 0x0044, - 'VK_E': 0x0045, - 'VK_F': 0x0046, - 'VK_G': 0x0047, - 'VK_H': 0x0048, - 'VK_I': 0x0049, - 'VK_J': 0x004A, - 'VK_K': 0x004B, - 'VK_L': 0x004C, - 'VK_M': 0x004D, - 'VK_N': 0x004E, - 'VK_O': 0x004F, - 'VK_P': 0x0050, - 'VK_Q': 0x0051, - 'VK_R': 0x0052, - 'VK_S': 0x0053, - 'VK_T': 0x0054, - 'VK_U': 0x0055, - 'VK_V': 0x0056, - 'VK_W': 0x0057, - 'VK_X': 0x0058, - 'VK_Y': 0x0059, - 'VK_Z': 0x005A, - 'VK_LWIN': 0x005B, - 'VK_RWIN': 0x005C, - 'VK_APPS': 0x005D, - 'VK_SLEEP': 0x005F, - 'VK_NUMPAD0': 0x0060, - 'VK_NUMPAD1': 0x0061, - 'VK_NUMPAD2': 0x0062, - 'VK_NUMPAD3': 0x0063, - 'VK_NUMPAD4': 0x0064, - 'VK_NUMPAD5': 0x0065, - 'VK_NUMPAD6': 0x0066, - 'VK_NUMPAD7': 0x0067, - 'VK_NUMPAD8': 0x0068, - 'VK_MULTIPLY': 0x006A, - 'VK_ADD': 0x006B, - 'VK_SEPARATOR': 0x006C, - 'VK_SUBTRACT': 0x006D, - 'VK_DECIMAL': 0x006E, - 'VK_DIVIDE': 0x006F, - 'VK_F1': 0x0070, - 'VK_F2': 0x0071, - 'VK_F3': 0x0072, - 'VK_F4': 0x0073, - 'VK_F5': 0x0074, - 'VK_F6': 0x0075, - 'VK_F7': 0x0076, - 'VK_F8': 0x0077, - 'VK_F9': 0x0078, - 'VK_F10': 0x0079, - 'VK_F11': 0x007A, - 'VK_F12': 0x007B, - 'VK_F13': 0x007C, - 'VK_F14': 0x007D, - 'VK_F15': 0x007E, - 'VK_F16': 0x007F, - 'VK_F17': 0x0080, - 'VK_F18': 0x0081, - 'VK_F19': 0x0082, - 'VK_F20': 0x0083, - 'VK_F21': 0x0084, - 'VK_F22': 0x0085, - 'VK_F23': 0x0086, - 'VK_F24': 0x0087, - 'VK_NUMLOCK': 0x0090, - 'VK_SCROLL': 0x0091, - 'VK_LSHIFT': 0x00A0, - 'VK_RSHIFT': 0x00A1, - 'VK_LCONTROL': 0x00A2, - 'VK_RCONTROL': 0x00A3, - 'VK_LMENU': 0x00A4, - 'VK_RMENU': 0x00A5 -} - -CONQUE_WINDOWS_VK_INV = dict([v, k] for k, v in CONQUE_WINDOWS_VK.items()) - -CONQUE_WINDOWS_VK_ENHANCED = { - str(int(CONQUE_WINDOWS_VK['VK_UP'])): 1, - str(int(CONQUE_WINDOWS_VK['VK_DOWN'])): 1, - str(int(CONQUE_WINDOWS_VK['VK_LEFT'])): 1, - str(int(CONQUE_WINDOWS_VK['VK_RIGHT'])): 1, - str(int(CONQUE_WINDOWS_VK['VK_HOME'])): 1, - str(int(CONQUE_WINDOWS_VK['VK_END'])): 1 -} - -# }}} - -# structures used for CreateProcess - -# Odd types {{{ - -LPBYTE = POINTER(c_ubyte) -LPTSTR = POINTER(c_char) - -# }}} - - -class STARTUPINFO(Structure): # {{{ - _fields_ = [("cb", c_ulong), - ("lpReserved", LPTSTR), - ("lpDesktop", LPTSTR), - ("lpTitle", LPTSTR), - ("dwX", c_ulong), - ("dwY", c_ulong), - ("dwXSize", c_ulong), - ("dwYSize", c_ulong), - ("dwXCountChars", c_ulong), - ("dwYCountChars", c_ulong), - ("dwFillAttribute", c_ulong), - ("dwFlags", c_ulong), - ("wShowWindow", c_short), - ("cbReserved2", c_short), - ("lpReserved2", LPBYTE), - ("hStdInput", c_void_p), - ("hStdOutput", c_void_p), - ("hStdError", c_void_p),] - - def to_str(self): - return '' - - # }}} - -class PROCESS_INFORMATION(Structure): # {{{ - _fields_ = [("hProcess", c_void_p), - ("hThread", c_void_p), - ("dwProcessId", c_ulong), - ("dwThreadId", c_ulong),] - - def to_str(self): - return '' - - # }}} - -class MEMORY_BASIC_INFORMATION(Structure): # {{{ - _fields_ = [("BaseAddress", c_void_p), - ("AllocationBase", c_void_p), - ("AllocationProtect", c_ulong), - ("RegionSize", c_ulong), - ("State", c_ulong), - ("Protect", c_ulong), - ("Type", c_ulong),] - - def to_str(self): - return '' - - # }}} - -class SECURITY_ATTRIBUTES(Structure): # {{{ - _fields_ = [("Length", c_ulong), - ("SecDescriptor", c_void_p), - ("InheritHandle", c_bool)] - - def to_str(self): - return '' - - # }}} - -class COORD(Structure): # {{{ - _fields_ = [("X", c_short), - ("Y", c_short)] - - def to_str(self): - return '' - - # }}} - -class SMALL_RECT(Structure): # {{{ - _fields_ = [("Left", c_short), - ("Top", c_short), - ("Right", c_short), - ("Bottom", c_short)] - - def to_str(self): - return '' - - # }}} - -class CONSOLE_SCREEN_BUFFER_INFO(Structure): # {{{ - _fields_ = [("dwSize", COORD), - ("dwCursorPosition", COORD), - ("wAttributes", c_short), - ("srWindow", SMALL_RECT), - ("dwMaximumWindowSize", COORD)] - - def to_str(self): - return '' - - # }}} - -class CHAR_UNION(Union): # {{{ - _fields_ = [("UnicodeChar", c_wchar), - ("AsciiChar", c_char)] - - def to_str(self): - return '' - - # }}} - -class CHAR_INFO(Structure): # {{{ - _fields_ = [("Char", CHAR_UNION), - ("Attributes", c_short)] - - def to_str(self): - return '' - - # }}} - -class KEY_EVENT_RECORD(Structure): # {{{ - _fields_ = [("bKeyDown", c_byte), - ("pad2", c_byte), - ('pad1', c_short), - ("wRepeatCount", c_short), - ("wVirtualKeyCode", c_short), - ("wVirtualScanCode", c_short), - ("uChar", CHAR_UNION), - ("dwControlKeyState", c_int)] - - def to_str(self): - return '' - - # }}} - -class MOUSE_EVENT_RECORD(Structure): # {{{ - _fields_ = [("dwMousePosition", COORD), - ("dwButtonState", c_int), - ("dwControlKeyState", c_int), - ("dwEventFlags", c_int)] - - def to_str(self): - return '' - - # }}} - -class WINDOW_BUFFER_SIZE_RECORD(Structure): # {{{ - _fields_ = [("dwSize", COORD)] - - def to_str(self): - return '' - - # }}} - -class MENU_EVENT_RECORD(Structure): # {{{ - _fields_ = [("dwCommandId", c_uint)] - - def to_str(self): - return '' - - # }}} - -class FOCUS_EVENT_RECORD(Structure): # {{{ - _fields_ = [("bSetFocus", c_byte)] - - def to_str(self): - return '' - # }}} - -class INPUT_UNION(Union): # {{{ - _fields_ = [("KeyEvent", KEY_EVENT_RECORD), - ("MouseEvent", MOUSE_EVENT_RECORD), - ("WindowBufferSizeEvent", WINDOW_BUFFER_SIZE_RECORD), - ("MenuEvent", MENU_EVENT_RECORD), - ("FocusEvent", FOCUS_EVENT_RECORD)] - - def to_str(self): - return '' - # }}} - -class INPUT_RECORD(Structure): # {{{ - _fields_ = [("EventType", c_short), - ("Event", INPUT_UNION)] - - def to_str(self): - return '' - # }}} - -# vim:foldmethod=marker diff --git a/bundle/conque_2.0/doc/conque_term.txt b/bundle/conque_2.0/doc/conque_term.txt deleted file mode 100644 index 4213d329..00000000 --- a/bundle/conque_2.0/doc/conque_term.txt +++ /dev/null @@ -1,462 +0,0 @@ -*ConqueTerm* Plugin to run a shell inside a Vim buffer - -The ConqueTerm plugin will turn a Vim buffer into a terminal emulator, allowing -you to run and interact with a shell or shell application inside the buffer. - - 1. Installation |conque-term-installation| - 2. Usage |conque-term-usage| - 3. Config Options |conque-term-options| - 4. VimScript API |conque-term-api| - 5. Misc |conque-term-misc| - -============================================================================== - -1. Installation *conque-term-installation* - -Conque is designed for both Unix and Windows operating systems, however the -requirements are slightly different. Please check section below corresponding -to your installed OS. - -1.1 Requirements for Unix *conque-term-requirements* - - * [G]Vim 7.0+ with +python and/or +python3 - * Python 2.3+ and/or 3.x - * Unix-like OS: Linux, OS X, Solaris, Cygwin, etc - -The most common stumbling block is getting a version of Vim which has the -python interface enabled. Most all software package managers will have a copy -of Vim with Python support, so that is often the easiest way to get it. If -you're compiling Vim from source, be sure to use the --enable-pythoninterp -option, or --enable-python3interp for Python 3. On OS X the best option is -MacVim, which installs with Python support by default. - -1.2 Requirements for Windows *conque-term-windows* - - * [G]Vim 7.3 with +python and/or +python3 - * Python 2.7 and/or 3.1 - * Modern Windows OS (XP or later) - -Conque only officially supports the latest GVim 7.3 Windows installer -available at www.vim.org. If you are currently using Vim 7.2 or earlier you -will need to upgrade to 7.3 for Windows support. The Windows installer already -has the +python/+python3 interface built in. - -The official 7.3 release of Vim for Windows only works with Python versions -2.7 and/or 3.1. You can download and install Python from their website -http://www.python.org/download - -If you are compiling Vim + Python from source on Windows, the requirements -become only Vim 7.3+ and Python 2.7+. - - -1.3 Installation *conque-term-installation-instructions* - -Download the latest vimball from http://conque.googlecode.com - -Open the .vba file with Vim and run the following commands: -> - :so % - :q -< -That's it! The :ConqueTerm command will be available the next time you start -Vim. You can delete the .vba file when you've verified Conque was successfully -installed. - -============================================================================== - -2. Usage *conque-term-usage* - -Type :ConqueTerm to launch an application in the current buffer. Eg: -> - :ConqueTerm bash - :ConqueTerm mysql -h localhost -u joe_lunchbox Menu - :ConqueTerm Powershell.exe -< -Use :ConqueTermSplit or :ConqueTermVSplit to open Conque in a new horizontal -or vertical buffer. Use :ConqueTermTab to open Conque in a new tab. - -In insert mode you can interact with the shell as you would expect in a -normal terminal. All key presses will be sent to the terminal, including -control characters. See |conque-term-special-keys| for more information, -particularly regarding the key. - -In normal mode you can use Vim commands to browse your terminal output and -scroll back through the history. Most all Vim functionality will work, such -as searching, yanking or highlighting text. - - -2.1 Special keys *conque-term-special-keys* - -There are several keys which can be configured to have special behavior with -Conque. - -Send text to Conque *conque-term-F9* - -If you want to send some text from a file you are editing in another buffer -to be run in Conque, select the desired text visually then press the -key. If you have multiple Conque buffers, the text will be sent to the most -recently created buffer. Alternatively you can yank the text, switch to your -terminal, then paste it with the normal 'p' key. This feature can be -configured to use a different key with the |ConqueTerm_SendVisKey| option. - -Toggle terminal input mode *conque-term-F8* - -If you want to use insert mode to edit the terminal screen, press . You -will now be able to edit the terminal output freely without your cursor -jumping the the active prompt line. This may be useful if you want to reformat -terminal output for readability. - -While the terminal is paused new output will not be displayed on the screen -until you press again to resume. - -You can configure Conque to use a different key with the |ConqueTerm_ToggleKey| -option. - -Sending the key press *conque-term-Esc* - -By default if you press the key in a Conque buffer you will leave insert -mode. But what if you want the key press to be sent to your terminal? There -are two options. By default, pressing twice will send one key -press to the terminal, while pressing it once will leave insert mode. - -Alternatively you can use the |ConqueTerm_EscKey| option to choose a -different key for leaving insert mode. If a custom key is set, then all -key presses will be sent to the terminal. - - -============================================================================== - -3. Options *conque-term-options* - -You can set the following options in your .vimrc (default values shown) - - -3.1 Insert mode when entering buffer *ConqueTerm_InsertOnEnter* - -If set to 1 then you will automatically go into insert mode when you enter the -buffer. This diverges from normal Vim behavior. If 0 you will still be in -normal mode. -> - let g:ConqueTerm_InsertOnEnter = 0 -< -3.2 Enable in insert mode *ConqueTerm_CWInsert* - -If set to 1 then you can leave the Conque buffer using the commands -while you're still in insert mode. If set to 0 then the character will -be sent to the terminal. If both this option and ConqueTerm_InsertOnEnter are -set you can go in and out of the terminal buffer while never leaving insert -mode. -> - let g:ConqueTerm_CWInsert = 0 -< -3.3 Use a custom key for leaving insert mode *ConqueTerm_EscKey* - -If a custom key is set, then all key presses will be sent to the -terminal and you must use this custom key to leave insert mode. If left to the -default value of '' then you must press it twice to send the escape -character to the terminal, while pressing it once will leave insert mode. - -Note: You cannot use a key which is internally coded with the escape -character. This includes the keys and often the and keys. -Picking a control key, such as will be your best bet. -> - let g:ConqueTerm_EscKey = '' -< -3.4 Send selected text to Conque *ConqueTerm_SendVisKey* - -Use this key to send the currently selected text to the most recently created -Conque buffer. -> - let g:ConqueTerm_SendVisKey = '' -< -3.5 Toggle terminal input mode *ConqueTerm_ToggleKey* - -Press this key to pause terminal input and output display. You will then be -able to edit the terminal screen as if it were a normal text buffer. Press -this key again to resume terminal mode. -> - let g:ConqueTerm_ToggleKey = '' -< -3.6 Enable or disable colors *ConqueTerm_Color* - -Set to 1 to enable colors, 0 to disable. Syntax highlighting in Vim can be -slow if your terminal is color intensive. Disabling color can make the -terminal render significantly faster. -> - let g:ConqueTerm_Color = 1 -< -3.7 Choose your terminal type, Unix ONLY *ConqueTerm_TERM* - -Use this option to tell Conque what type of terminal it should identify itself -as. Conque officially uses the more limited VT100 terminal type for -developement and testing, although it supports some more advanced features -such as colors and title strings. - -You can change this setting to a more advanced type, namely 'xterm', but your -results may vary depending on which programs you're running. -> - let g:ConqueTerm_TERM = 'vt100' -< -3.8 Choose Vim syntax type *ConqueTerm_Syntax* - -Set the buffer syntax. The default 'conque' has highlighting for MySQL, but -not much else. -> - let g:ConqueTerm_Syntax = 'conque' -< -3.9 Keep updating terminal buffer *ConqueTerm_ReadUnfocused* - -If set to 1 then your Conque buffers will continue to update after you've -switched to another buffer. - -Note: Conque buffers may continue to update, but they will not scroll down as -new lines are added beyond the bottom of the visible buffer area. This is a -limitation of the Vim scripting language for which I haven't found a -workaround. -> - let g:ConqueTerm_ReadUnfocused = 1 -< -3.10 Regex for highlighting your prompt *ConqueTerm_PromptRegex* - -Use this regular expression for sytax highlighting your terminal prompt. Your -terminal will generally run faster if you use Vim highlighting instead of -terminal colors for your prompt. You can also use it to do more advanced -syntax highlighting for the prompt line. -> - let g:ConqueTerm_PromptRegex = '^\w\+@[0-9A-Za-z_.-]\+:[0-9A-Za-z_./\~,:-]\+\$' -< -3.11 Close buffer when program exits *ConqueTerm_CloseOnEnd* - -If you want your terminal buffer to be closed and permanently deleted when the -program running inside of it exits, set this option to 1. Otherwise the buffer -will become a simple text buffer after the program exits, and you can edit the -program output in insert mode. -> - let g:ConqueTerm_CloseOnEnd = 0 -< -3.12 Python version *ConqueTerm_PyVersion* - -Conque will work with either Python 2.x or 3.x, assuming the interfaces have -been installed. By default it will try to use Python 2 first, then will try -Python 3. If you want Conque to use Python 3, set this variable to 3. - -Note: even if you set this to 3, if you don't have the python3 interface -Conque will fall back to using Python 2. -> - let g:ConqueTerm_PyVersion = 2 -< -3.13 Python executable, Windows ONLY *ConqueTerm_PyExe* - -The Windows version of Conque needs to know the path to the python.exe -executable for the version of Python Conque is using. If you installed Python -in the default location, or added the Python directory to your system path, -Conque should be able to find python.exe without you changing this variable. - -For example, you might set this to 'C:\Program Files\Python27\python.exe' -> - let g:ConqueTerm_PyExe = '' -< -3.14 Function Keys *ConqueTerm_SendFunctionKeys* - -By default, function keys (the F1-F12 row at the top of your keyboard) are not -passed to the terminal. Set this option to 1 to send these key events. - -Note: Unless you configured |ConqueTerm_SendVisKey| and |ConqueTerm_ToggleKey| -to use different keys, and will not be sent to the terminal even if -you set this option to 1. -> - let g:ConqueTerm_SendFunctionKeys = 0 -< - -============================================================================== - -4. VimScript API (Beta) *conque-term-api* - -The Conque scripting API allows you to create and interact with Conque -terminals with the VimScript language. This API is still in beta stage. - -4.1 conque_term#open({command}, [buf_opts], [remain]) *conque-term-open* - -The open() function will create a new terminal buffer and start your command. - -The {command} must be an executable, either an absolute path or relative to -your system path. - -You can pass in a list of vim commands [buf_opts] which will be executed after -the new buffer is created but before the command is started. These are -typically commands to alter the size, position or configuration of the buffer -window. - -Note: If you don't pass in a command such as 'split', the terminal will open -in the current buffer. - -If you don't want the new terminal buffer to become the new active buffer, set - [remain] to 1. Only works if you create a split screen using [options]. - -Returns a Conque terminal object. - -Examples: -> - let my_terminal = conque_term#open('/bin/bash') - let my_terminal = conque_term#open('ipython', ['split', 'resize 20'], 1) -< -4.2 conque_term#subprocess({command}) *conque-term-subprocess* - -Starts a new subprocess with your {command}, but no terminal buffer is ever -created. This may be useful if you need asynchronous interaction with a -subprocess, but want to handle the output on your own. - -Returns a Conque terminal object. - -Example: -> - let my_subprocess = conque_term#subprocess('tail -f /var/log/foo.log') -< -4.3 conque_term#get_instance( [terminal_number] ) *conque-term-get-instance* - -Use the get_instance() function to retrieve an existing terminal object. The -terminal could have been created either with the user command :ConqueTerm or -with an API call to conque_term#open() or subprocess(). - -Use the optional [terminal_number] to retrieve a specific terminal instance. -Otherwise if the current buffer is a Conque terminal, it will be returned, -else the most recently created terminal. The terminal number is what you see -at the end of a terminal buffer name, e.g. "bash - 2". - -Returns a Conque terminal object. - -Example: -> - nnoremap :call conque_term#get_instance().writeln('clear') -< -4.4 CONQUE_OBJECT.write(text) *conque-term-write* - -Once you have a terminal object from open(), subprocess() or get_instance() -you can send text input to it with the write() method. - -No return value. - -Examples: -> - call my_terminal.write("whoami\n") - call my_terminal.write("\") -< -4.5 CONQUE_OBJECT.writeln(text) *conque-term-writeln* - -The same as write() except adds a \n character to the end if your input. - -Examples: -> - call my_subprocess.writeln('make') -< -4.6 CONQUE_OBJECT.read( [timeout], [update_buffer] ) *conque-term-read* - -Read new output from a Conque terminal subprocess. New output will be returned -as a string, and the terminal buffer will also be updated by default. - -If you are reading immediately after calling the write() method, you may want -to wait [timeout] milliseconds for output to be ready. - -If you want to prevent the output from being displayed in the terminal buffer, -set [update_buffer] to 0. This option has no effect if the terminal was -created with the subprocess() function, since there never is a buffer to -update. - -Returns output string. - -Note: The terminal buffer will not automatically scroll down if the new output -extends beyond the bottom of the visible buffer. Vim doesn't allow "unfocused" -buffers to be scrolled at the current version, although hopefully this will -change. - -Examples: -> - call my_terminal.writeln('whoami') - let output = my_terminal.read(500) - call my_terminal.writeln('ls -lha') - let output = my_terminal.read(1000, 1) -< -4.7 CONQUE_OBJECT.set_callback( {funcname} ) *conque-term-set-callback* - -Register a callback function for this subprocess instance. This function will -automatically be called whenever new output is available. Only practical with -subprocess() objects. - -Conque checkes for new subprocess output once a second when Vim is idle. If -new output is found your function will be called. - -Pass in the callback function name {funcname} as a string. - -No return value. - -Note: this method requires the g:ConqueTerm_ReadUnfocused option to be set. - -Note: this method is experimental, results may vary. - -Example: -> - let sp = conque_term#subprocess('tail -f /home/joe/log/error_log') - - function! MyErrorAlert(output) - echo a:output - endfunction - - call sp.set_callback('MyErrorAlert') -< -4.8 CONQUE_OBJECT.close() *conque-term-close* - -Kill your terminal subprocess. Sends the ABORT signal. You probably want to -close your subprocess in a more graceful manner with the write() method, but -this can be used when needed. Does not close the terminal buffer, if it -exists. - -This method will be called on all existing Conque subprocesses when Vim exits. - -Example: -> - let term = conque_term#open('ping google.com', ['belowright split']) - call term.read(5000) - call term.close() -< - -============================================================================== - -5. Misc *conque-term-misc* - - -5.1 Known bugs *conque-term-bugs* - -The following are known limitations: - - - Font/color highlighting is imperfect and slow. If you don't care about - color in your shell, set g:ConqueTerm_Color = 0 in your .vimrc - - Conque only supports the extended ASCII character set for input, not utf-8. - - VT100 escape sequence support is not complete. - - Alt/Meta key support in Vim isn't great in general, and conque is no - exception. Pressing x or instead of works in - most cases. - - -5.2 Contribute *conque-term-contribute* - -The two contributions most in need are improvements to Vim itself. I currently -use hacks to capture key press input from the user, and to poll the terminal -for more output. The Vim todo.txt document lists proposed improvements to give -users this behavior without hacks. Having a key press event should allow -Conque to work with multi- byte input. If you are a Vim developer, please -consider prioritizing these two items: - - - todo.txt (Autocommands, line ~3137) - 8 Add an event like CursorHold that is triggered repeatedly, not just - once after typing something. - - -5.3 Feedback *conque-term-feedback* - -Bugs, suggestions and patches are all welcome. - -For more information visit http://conque.googlecode.com - -Check out the latest from svn at http://conque.googlecode.com/svn/trunk/ - - vim:tw=78:ts=8:ft=help:norl: diff --git a/bundle/conque_2.0/doc/tags b/bundle/conque_2.0/doc/tags deleted file mode 100644 index a30d67de..00000000 --- a/bundle/conque_2.0/doc/tags +++ /dev/null @@ -1,38 +0,0 @@ -ConqueTerm conque_term.txt /*ConqueTerm* -ConqueTerm_CWInsert conque_term.txt /*ConqueTerm_CWInsert* -ConqueTerm_CloseOnEnd conque_term.txt /*ConqueTerm_CloseOnEnd* -ConqueTerm_Color conque_term.txt /*ConqueTerm_Color* -ConqueTerm_EscKey conque_term.txt /*ConqueTerm_EscKey* -ConqueTerm_InsertOnEnter conque_term.txt /*ConqueTerm_InsertOnEnter* -ConqueTerm_PromptRegex conque_term.txt /*ConqueTerm_PromptRegex* -ConqueTerm_PyExe conque_term.txt /*ConqueTerm_PyExe* -ConqueTerm_PyVersion conque_term.txt /*ConqueTerm_PyVersion* -ConqueTerm_ReadUnfocused conque_term.txt /*ConqueTerm_ReadUnfocused* -ConqueTerm_SendFunctionKeys conque_term.txt /*ConqueTerm_SendFunctionKeys* -ConqueTerm_SendVisKey conque_term.txt /*ConqueTerm_SendVisKey* -ConqueTerm_Syntax conque_term.txt /*ConqueTerm_Syntax* -ConqueTerm_TERM conque_term.txt /*ConqueTerm_TERM* -ConqueTerm_ToggleKey conque_term.txt /*ConqueTerm_ToggleKey* -conque-term-Esc conque_term.txt /*conque-term-Esc* -conque-term-F8 conque_term.txt /*conque-term-F8* -conque-term-F9 conque_term.txt /*conque-term-F9* -conque-term-api conque_term.txt /*conque-term-api* -conque-term-bugs conque_term.txt /*conque-term-bugs* -conque-term-close conque_term.txt /*conque-term-close* -conque-term-contribute conque_term.txt /*conque-term-contribute* -conque-term-feedback conque_term.txt /*conque-term-feedback* -conque-term-get-instance conque_term.txt /*conque-term-get-instance* -conque-term-installation conque_term.txt /*conque-term-installation* -conque-term-installation-instructions conque_term.txt /*conque-term-installation-instructions* -conque-term-misc conque_term.txt /*conque-term-misc* -conque-term-open conque_term.txt /*conque-term-open* -conque-term-options conque_term.txt /*conque-term-options* -conque-term-read conque_term.txt /*conque-term-read* -conque-term-requirements conque_term.txt /*conque-term-requirements* -conque-term-set-callback conque_term.txt /*conque-term-set-callback* -conque-term-special-keys conque_term.txt /*conque-term-special-keys* -conque-term-subprocess conque_term.txt /*conque-term-subprocess* -conque-term-usage conque_term.txt /*conque-term-usage* -conque-term-windows conque_term.txt /*conque-term-windows* -conque-term-write conque_term.txt /*conque-term-write* -conque-term-writeln conque_term.txt /*conque-term-writeln* diff --git a/bundle/conque_2.0/plugin/conque_term.vim b/bundle/conque_2.0/plugin/conque_term.vim deleted file mode 100644 index 2ed9e732..00000000 --- a/bundle/conque_2.0/plugin/conque_term.vim +++ /dev/null @@ -1,139 +0,0 @@ -" FILE: plugin/conque_term.vim {{{ -" AUTHOR: Nico Raffo -" WEBSITE: http://conque.googlecode.com -" MODIFIED: 2010-11-15 -" VERSION: 2.0, for Vim 7.0 -" LICENSE: -" Conque - Vim terminal/console emulator -" Copyright (C) 2009-2010 Nico Raffo -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to deal -" in the Software without restriction, including without limitation the rights -" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -" copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -" THE SOFTWARE. -" }}} - -" See docs/conque_term.txt for help or type :help conque_term - -if exists('g:ConqueTerm_Loaded') || v:version < 700 - finish -endif - -" ********************************************************************************************************** -" **** CONFIG ********************************************************************************************** -" ********************************************************************************************************** - -" {{{ - -" automatically go into insert mode when entering buffer {{{ -if !exists('g:ConqueTerm_InsertOnEnter') - let g:ConqueTerm_InsertOnEnter = 0 -endif " }}} - -" Allow user to use keys to switch window in insert mode. {{{ -if !exists('g:ConqueTerm_CWInsert') - let g:ConqueTerm_CWInsert = 0 -endif " }}} - -" Choose key mapping to leave insert mode {{{ -" If you choose something other than '', then will be sent to terminal -" Using a different key will usually fix Alt/Meta key issues -if !exists('g:ConqueTerm_EscKey') - let g:ConqueTerm_EscKey = '' -endif " }}} - -" Use this key to send selected text to conque. {{{ -if !exists('g:ConqueTerm_SendVisKey') - let g:ConqueTerm_SendVisKey = '' -endif " }}} - -" Use this key to toggle terminal key mappings. {{{ -if !exists('g:ConqueTerm_ToggleKey') - let g:ConqueTerm_ToggleKey = '' -endif " }}} - -" Enable color. {{{ -" If your apps use a lot of color it will slow down the shell. -if !exists('g:ConqueTerm_Color') - let g:ConqueTerm_Color = 1 -endif " }}} - -" TERM environment setting {{{ -if !exists('g:ConqueTerm_TERM') - let g:ConqueTerm_TERM = 'vt100' -endif " }}} - -" Syntax for your buffer {{{ -if !exists('g:ConqueTerm_Syntax') - let g:ConqueTerm_Syntax = 'conque_term' -endif " }}} - -" Keep on updating the shell window after you've switched to another buffer {{{ -if !exists('g:ConqueTerm_ReadUnfocused') - let g:ConqueTerm_ReadUnfocused = 0 -endif " }}} - -" Use this regular expression to highlight prompt {{{ -if !exists('g:ConqueTerm_PromptRegex') - let g:ConqueTerm_PromptRegex = '^\w\+@[0-9A-Za-z_.-]\+:[0-9A-Za-z_./\~,:-]\+\$' -endif " }}} - -" Choose which Python version to attempt to load first {{{ -" Valid values are 2, 3 or 0 (no preference) -if !exists('g:ConqueTerm_PyVersion') - let g:ConqueTerm_PyVersion = 2 -endif " }}} - -" Path to python.exe. (Windows only) {{{ -" By default, Conque will check C:\PythonNN\python.exe then will search system path -" If you have installed Python in an unusual location and it's not in your path, fill in the full path below -" E.g. 'C:\Program Files\Python\Python27\python.exe' -if !exists('g:ConqueTerm_PyExe') - let g:ConqueTerm_PyExe = '' -endif " }}} - -" Automatically close buffer when program exits {{{ -if !exists('g:ConqueTerm_CloseOnEnd') - let g:ConqueTerm_CloseOnEnd = 0 -endif " }}} - -" Send function key presses to terminal {{{ -if !exists('g:ConqueTerm_SendFunctionKeys') - let g:ConqueTerm_SendFunctionKeys = 0 -endif " }}} - -" }}} - -" ********************************************************************************************************** -" **** Startup ********************************************************************************************* -" ********************************************************************************************************** - -" Startup {{{ - -let g:ConqueTerm_Loaded = 1 -let g:ConqueTerm_Idx = 0 -let g:ConqueTerm_Version = 200 - -command! -nargs=+ -complete=shellcmd ConqueTerm call conque_term#open() -command! -nargs=+ -complete=shellcmd ConqueTermSplit call conque_term#open(, ['belowright split']) -command! -nargs=+ -complete=shellcmd ConqueTermVSplit call conque_term#open(, ['belowright vsplit']) -command! -nargs=+ -complete=shellcmd ConqueTermTab call conque_term#open(, ['tabnew']) - -" }}} - -" vim:foldmethod=marker diff --git a/bundle/conque_2.0/syntax/conque_term.vim b/bundle/conque_2.0/syntax/conque_term.vim deleted file mode 100644 index 927cbd5e..00000000 --- a/bundle/conque_2.0/syntax/conque_term.vim +++ /dev/null @@ -1,113 +0,0 @@ -" FILE: syntax/conque_term.vim {{{ -" AUTHOR: Nico Raffo -" WEBSITE: http://conque.googlecode.com -" MODIFIED: 2010-11-15 -" VERSION: 2.0, for Vim 7.0 -" LICENSE: -" Conque - Vim terminal/console emulator -" Copyright (C) 2009-2010 Nico Raffo -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to deal -" in the Software without restriction, including without limitation the rights -" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -" copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -" THE SOFTWARE. -" }}} - - -" ******************************************************************************************************************* -" MySQL ************************************************************************************************************* -" ******************************************************************************************************************* - -" TODO Move these to syntax which is only executed for mysql -"syn match MySQLTableBodyG "^\s*\w\+:\(.\+\)\=$" contains=MySQLTableHeadG,MySQLNullG,MySQLBool,MySQLNumberG,MySQLStorageClass oneline skipwhite skipnl -"syn match MySQLTableHeadG "^\s*\w\+:" contains=MySQLTableColon skipwhite contained -"syn match MySQLTableColon ":" contained - -syn match MySQLTableHead "^ *|.*| *$" nextgroup=MySQLTableDivide contains=MySQLTableBar oneline skipwhite skipnl -syn match MySQLTableBody "^ *|.*| *$" nextgroup=MySQLTableBody,MySQLTableEnd contains=MySQLTableBar,MySQLNull,MySQLBool,MySQLNumber,MySQLStorageClass oneline skipwhite skipnl -syn match MySQLTableEnd "^ *+[+=-]\++ *$" oneline -syn match MySQLTableDivide "^ *+[+=-]\++ *$" nextgroup=MySQLTableBody oneline skipwhite skipnl -syn match MySQLTableStart "^ *+[+=-]\++ *$" nextgroup=MySQLTableHead oneline skipwhite skipnl -syn match MySQLNull " NULL " contained contains=MySQLTableBar -syn match MySQLStorageClass " PRI " contained -syn match MySQLStorageClass " MUL " contained -syn match MySQLStorageClass " UNI " contained -syn match MySQLStorageClass " CURRENT_TIMESTAMP " contained -syn match MySQLStorageClass " auto_increment " contained -syn match MySQLTableBar "|" contained -syn match MySQLNumber "|\? *\d\+\(\.\d\+\)\? *|" contained contains=MySQLTableBar -syn match MySQLQueryStat "^\d\+ rows\? in set.*" oneline -syn match MySQLPromptLine "^.\?mysql> .*$" contains=MySQLKeyword,MySQLPrompt,MySQLString oneline -syn match MySQLPromptLine "^ -> .*$" contains=MySQLKeyword,MySQLPrompt,MySQLString oneline -syn match MySQLPrompt "^.\?mysql>" contained oneline -syn match MySQLPrompt "^ ->" contained oneline -syn case ignore -syn keyword MySQLKeyword select count max sum avg date show table tables status like as from left right outer inner join contained -syn keyword MySQLKeyword where group by having limit offset order desc asc show contained and interval is null on -syn case match -syn region MySQLString start=+'+ end=+'+ skip=+\\'+ contained oneline -syn region MySQLString start=+"+ end=+"+ skip=+\\"+ contained oneline -syn region MySQLString start=+`+ end=+`+ skip=+\\`+ contained oneline - - -hi def link MySQLPrompt Identifier -hi def link MySQLTableHead Title -hi def link MySQLTableBody Normal -hi def link MySQLBool Boolean -hi def link MySQLStorageClass StorageClass -hi def link MySQLNumber Number -hi def link MySQLKeyword Keyword -hi def link MySQLString String - -" terms which have no reasonable default highlight group to link to -hi MySQLTableHead term=bold cterm=bold gui=bold -if &background == 'dark' - hi MySQLTableEnd term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444 - hi MySQLTableDivide term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444 - hi MySQLTableStart term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444 - hi MySQLTableBar term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444 - hi MySQLNull term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444 - hi MySQLQueryStat term=NONE cterm=NONE gui=NONE ctermfg=238 guifg=#444444 -elseif &background == 'light' - hi MySQLTableEnd term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e - hi MySQLTableDivide term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e - hi MySQLTableStart term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e - hi MySQLTableBar term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e - hi MySQLNull term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e - hi MySQLQueryStat term=NONE cterm=NONE gui=NONE ctermfg=247 guifg=#9e9e9e -endif - - -" ******************************************************************************************************************* -" Bash ************************************************************************************************************** -" ******************************************************************************************************************* - -" Typical Prompt -if g:ConqueTerm_PromptRegex != '' - silent execute "syn match ConquePromptLine '" . g:ConqueTerm_PromptRegex . ".*$' contains=ConquePrompt,ConqueString oneline" - silent execute "syn match ConquePrompt '" . g:ConqueTerm_PromptRegex . "' contained oneline" - hi def link ConquePrompt Identifier -endif - -" Strings -syn region ConqueString start=+'+ end=+'+ skip=+\\'+ contained oneline -syn region ConqueString start=+"+ end=+"+ skip=+\\"+ contained oneline -syn region ConqueString start=+`+ end=+`+ skip=+\\`+ contained oneline -hi def link ConqueString String - -" vim: foldmethod=marker diff --git a/bundle/csv.vim b/bundle/csv.vim deleted file mode 160000 index 1af96441..00000000 --- a/bundle/csv.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1af96441969b376612b040886e0e13705d304483 diff --git a/bundle/ctrlp b/bundle/ctrlp deleted file mode 160000 index daf0c01b..00000000 --- a/bundle/ctrlp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit daf0c01bd850dbd7337c469251c13b0bc779c762 diff --git a/bundle/cucumbertables/ftplugin b/bundle/cucumbertables/ftplugin deleted file mode 160000 index e0e754fa..00000000 --- a/bundle/cucumbertables/ftplugin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e0e754faab7d0414ef468e1dd03f76ac18fd4e27 diff --git a/bundle/diffthese b/bundle/diffthese deleted file mode 160000 index d74d4b37..00000000 --- a/bundle/diffthese +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d74d4b37fa46ab83703e12a602f1a3099e0f19e9 diff --git a/bundle/edit-plus b/bundle/edit-plus deleted file mode 160000 index d2b962d7..00000000 --- a/bundle/edit-plus +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d2b962d717beb9c64338c13eecc31b1cbcc4a756 diff --git a/bundle/gundo b/bundle/gundo deleted file mode 160000 index 4c376a80..00000000 --- a/bundle/gundo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4c376a8061fa335228da420937ce385b847dd56a diff --git a/bundle/hammer.vim b/bundle/hammer.vim deleted file mode 160000 index 78de6b9a..00000000 --- a/bundle/hammer.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 78de6b9a42cfce81634adcff21bab0b673e186f4 diff --git a/bundle/handlebars b/bundle/handlebars deleted file mode 160000 index e1a7f8af..00000000 --- a/bundle/handlebars +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e1a7f8af27c4c7337ffaab151ce0b3968cf09cf5 diff --git a/bundle/insert_mode_background_color/plugin/insert_mode_background_color.vim b/bundle/insert_mode_background_color/plugin/insert_mode_background_color.vim deleted file mode 100644 index 3e861869..00000000 --- a/bundle/insert_mode_background_color/plugin/insert_mode_background_color.vim +++ /dev/null @@ -1,12 +0,0 @@ -" Set g:insert_mode_background_color to a Vim color to set the background to -" that color when in Insert mode. -" -" By Peter Jaros - -if exists("g:insert_mode_background_color") - augroup HighlightOnInsert - autocmd! - autocmd InsertEnter * execute "highlight Normal guibg=" . g:insert_mode_background_color - autocmd InsertLeave * execute "colorscheme " . g:colors_name - augroup END -endif diff --git a/bundle/j-split b/bundle/j-split deleted file mode 160000 index 6cd55438..00000000 --- a/bundle/j-split +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6cd55438a63c56d796f421641645291de85ade66 diff --git a/bundle/matcher b/bundle/matcher deleted file mode 160000 index 62b6393c..00000000 --- a/bundle/matcher +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62b6393c3336bfa69252c4fbce88fc47d17c8b5f diff --git a/bundle/matchit/doc/matchit.txt b/bundle/matchit/doc/matchit.txt deleted file mode 100644 index 8a3a96e2..00000000 --- a/bundle/matchit/doc/matchit.txt +++ /dev/null @@ -1,406 +0,0 @@ -*matchit.txt* Extended "%" matching - -For instructions on installing this file, type - :help matchit-install -inside Vim. - -For Vim version 6.3. Last change: 2007 Aug 29 - - - VIM REFERENCE MANUAL by Benji Fisher - -*matchit* *matchit.vim* - -1. Extended matching with "%" |matchit-intro| -2. Activation |matchit-activate| -3. Configuration |matchit-configure| -4. Supporting a New Language |matchit-newlang| -5. Known Bugs and Limitations |matchit-bugs| - -The functionality mentioned here is a plugin, see |add-plugin|. -This plugin is only available if 'compatible' is not set. -You can avoid loading this plugin by setting the "loaded_matchit" variable -in your |vimrc| file: > - :let loaded_matchit = 1 - -{Vi does not have any of this} - -============================================================================== -1. Extended matching with "%" *matchit-intro* - - *matchit-%* -% Cycle forward through matching groups, such as "if", "else", "endif", - as specified by |b:match_words|. - - *g%* *v_g%* *o_g%* -g% Cycle backwards through matching groups, as specified by - |b:match_words|. For example, go from "if" to "endif" to "else". - - *[%* *v_[%* *o_[%* -[% Go to [count] previous unmatched group, as specified by - |b:match_words|. Similar to |[{|. - - *]%* *v_]%* *o_]%* -]% Go to [count] next unmatched group, as specified by - |b:match_words|. Similar to |]}|. - - *v_a%* -a% In Visual mode, select the matching group, as specified by - |b:match_words|, containing the cursor. Similar to |v_a[|. - A [count] is ignored, and only the first character of the closing - pattern is selected. - -In Vim, as in plain vi, the percent key, |%|, jumps the cursor from a brace, -bracket, or paren to its match. This can be configured with the 'matchpairs' -option. The matchit plugin extends this in several ways: - - You can match whole words, such as "if" and "endif", not just - single characters. You can also specify a |regular-expression|. - You can define groups with more than two words, such as "if", - "else", "endif". Banging on the "%" key will cycle from the "if" to - the first "else", the next "else", ..., the closing "endif", and back - to the opening "if". Nested structures are skipped. Using |g%| goes - in the reverse direction. - By default, words inside comments and strings are ignored, unless - the cursor is inside a comment or string when you type "%". If the - only thing you want to do is modify the behavior of "%" so that it - behaves this way, you do not have to define |b:match_words|, since the - script uses the 'matchpairs' option as well as this variable. - -See |matchit-details| for details on what the script does, and |b:match_words| -for how to specify matching patterns. - -MODES: *matchit-modes* *matchit-v_%* *matchit-o_%* - -Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in -|motion| commands in |Operator-pending| and |Visual| modes. However, you -cannot make these motions |linewise| or |characterwise|, since the |:omap|s -that define them start with "v" in order to make the default behavior -inclusive. (See |o_v|.) In other words, "dV%" will not work. The -work-around is to go through Visual mode: "V%d" will work. - -LANGUAGES: *matchit-languages* - -Currently, the following languages are supported: Ada, ASP with VBS, Csh, -DTD, Entity, Essbase, Fortran, HTML, JSP (same as HTML), LaTeX, Lua, Pascal, -SGML, Shell, Tcsh, Vim, XML. Other languages may already have support via -the default |filetype-plugin|s in the standard vim distribution. - -To support a new language, see |matchit-newlang| below. - -DETAILS: *matchit-details* *matchit-parse* - -Here is an outline of what matchit.vim does each time you hit the "%" key. If -there are |backref|s in |b:match_words| then the first step is to produce a -version in which these back references have been eliminated; if there are no -|backref|s then this step is skipped. This step is called parsing. For -example, "\(foo\|bar\):end\1" is parsed to yield -"\(foo\|bar\):end\(foo\|bar\)". This can get tricky, especially if there are -nested groups. If debugging is turned on, the parsed version is saved as -|b:match_pat|. - - *matchit-choose* -Next, the script looks for a word on the current line that matches the pattern -just constructed. It includes the patterns from the 'matchpairs' option. -The goal is to do what you expect, which turns out to be a little complicated. -The script follows these rules: - - Insist on a match that ends on or after the cursor. - Prefer a match that includes the cursor position (that is, one that - starts on or before the cursor). - Prefer a match that starts as close to the cursor as possible. - If more than one pattern in |b:match_words| matches, choose the one - that is listed first. - -Examples: - - Suppose you > - :let b:match_words = '<:>,:' -< and hit "%" with the cursor on or before the "<" in "a is born". - The pattern '<' comes first, so it is preferred over '', which - also matches. If the cursor is on the "t", however, then '' is - preferred, because this matches a bit of text containing the cursor. - If the two groups of patterns were reversed then '<' would never be - preferred. - - Suppose you > - :let b:match_words = 'if:end if' -< (Note the space!) and hit "%" with the cursor at the end of "end if". - Then "if" matches, which is probably not what you want, but if the - cursor starts on the "end " then "end if" is chosen. (You can avoid - this problem by using a more complicated pattern.) - -If there is no match, the cursor does not move. (Before version 1.13 of the -script, it would fall back on the usual behavior of |%|). If debugging is -turned on, the matched bit of text is saved as |b:match_match| and the cursor -column of the start of the match is saved as |b:match_col|. - -Next, the script looks through |b:match_words| (original and parsed versions) -for the group and pattern that match. If debugging is turned on, the group is -saved as |b:match_ini| (the first pattern) and |b:match_tail| (the rest). If -there are |backref|s then, in addition, the matching pattern is saved as -|b:match_word| and a table of translations is saved as |b:match_table|. If -there are |backref|s, these are determined from the matching pattern and -|b:match_match| and substituted into each pattern in the matching group. - -The script decides whether to search forwards or backwards and chooses -arguments for the |searchpair()| function. Then, the cursor is moved to the -start of the match, and |searchpair()| is called. By default, matching -structures inside strings and comments are ignored. This can be changed by -setting |b:match_skip|. - -============================================================================== -2. Activation *matchit-activate* - -You can use this script as a plugin, by copying it to your plugin directory. -See |add-global-plugin| for instructions. You can also add a line to your -|vimrc| file, such as > - :source $VIMRUNTIME/macros/matchit.vim -or > - :runtime macros/matchit.vim -Either way, the script should start working the next time you start up Vim. - -(Earlier versions of the script did nothing unless a |buffer-variable| named -|b:match_words| was defined. Even earlier versions contained autocommands -that set this variable for various file types. Now, |b:match_words| is -defined in many of the default |filetype-plugin|s instead.) - -For a new language, you can add autocommands to the script or to your vimrc -file, but the recommended method is to add a line such as > - let b:match_words = '\:\' -to the |filetype-plugin| for your language. See |b:match_words| below for how -this variable is interpreted. - -TROUBLESHOOTING *matchit-troubleshoot* - -The script should work in most installations of Vim. It may not work if Vim -was compiled with a minimal feature set, for example if the |+syntax| option -was not enabled. If your Vim has support for syntax compiled in, but you do -not have |syntax| highlighting turned on, matchit.vim should work, but it may -fail to skip matching groups in comments and strings. If the |filetype| -mechanism is turned off, the |b:match_words| variable will probably not be -defined automatically. - -============================================================================== -3. Configuration *matchit-configure* - -There are several variables that govern the behavior of matchit.vim. Note -that these are variables local to the buffer, not options, so use |:let| to -define them, not |:set|. Some of these variables have values that matter; for -others, it only matters whether the variable has been defined. All of these -can be defined in the |filetype-plugin| or autocommand that defines -|b:match_words| or "on the fly." - -The main variable is |b:match_words|. It is described in the section below on -supporting a new language. - - *MatchError* *matchit-hl* *matchit-highlight* -MatchError is the highlight group for error messages from the script. By -default, it is linked to WarningMsg. If you do not want to be bothered by -error messages, you can define this to be something invisible. For example, -if you use the GUI version of Vim and your command line is normally white, you -can do > - :hi MatchError guifg=white guibg=white -< - *b:match_ignorecase* -If you > - :let b:match_ignorecase = 1 -then matchit.vim acts as if 'ignorecase' is set: for example, "end" and "END" -are equivalent. If you > - :let b:match_ignorecase = 0 -then matchit.vim treats "end" and "END" differently. (There will be no -b:match_infercase option unless someone requests it.) - - *b:match_debug* -Define b:match_debug if you want debugging information to be saved. See -|matchit-debug|, below. - - *b:match_skip* -If b:match_skip is defined, it is passed as the skip argument to -|searchpair()|. This controls when matching structures are skipped, or -ignored. By default, they are ignored inside comments and strings, as -determined by the |syntax| mechanism. (If syntax highlighting is turned off, -nothing is skipped.) You can set b:match_skip to a string, which evaluates to -a non-zero, numerical value if the match is to be skipped or zero if the match -should not be skipped. In addition, the following special values are -supported by matchit.vim: - s:foo becomes (current syntax item) =~ foo - S:foo becomes (current syntax item) !~ foo - r:foo becomes (line before cursor) =~ foo - R:foo becomes (line before cursor) !~ foo -(The "s" is meant to suggest "syntax", and the "r" is meant to suggest -"regular expression".) - -Examples: - - You can get the default behavior with > - :let b:match_skip = 's:comment\|string' -< - If you want to skip matching structures unless they are at the start - of the line (ignoring whitespace) then you can > - :let b:match_skip = 'R:^\s*' -< Do not do this if strings or comments can span several lines, since - the normal syntax checking will not be done if you set b:match_skip. - - In LaTeX, since "%" is used as the comment character, you can > - :let b:match_skip = 'r:%' -< Unfortunately, this will skip anything after "\%", an escaped "%". To - allow for this, and also "\\%" (an excaped backslash followed by the - comment character) you can > - :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%' -< - See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both - syntax and a regular expression. - -============================================================================== -4. Supporting a New Language *matchit-newlang* - *b:match_words* -In order for matchit.vim to support a new language, you must define a suitable -pattern for |b:match_words|. You may also want to set some of the -|matchit-configure| variables, as described above. If your language has a -complicated syntax, or many keywords, you will need to know something about -Vim's |regular-expression|s. - -The format for |b:match_words| is similar to that of the 'matchpairs' option: -it is a comma (,)-separated list of groups; each group is a colon(:)-separated -list of patterns (regular expressions). Commas and backslashes that are part -of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to -have only one group; the effect is undefined if a group has only one pattern. -A simple example is > - :let b:match_words = '\:\,' - \ . '\:\:\:\' -(In Vim regular expressions, |\<| and |\>| denote word boundaries. Thus "if" -matches the end of "endif" but "\" does not.) Then banging on the "%" -key will bounce the cursor between "if" and the matching "endif"; and from -"while" to any matching "continue" or "break", then to the matching "endwhile" -and back to the "while". It is almost always easier to use |literal-string|s -(single quotes) as above: '\' rather than "\\" and so on. - -Exception: If the ":" character does not appear in b:match_words, then it is -treated as an expression to be evaluated. For example, > - :let b:match_words = 'GetMatchWords()' -allows you to define a function. This can return a different string depending -on the current syntax, for example. - -Once you have defined the appropriate value of |b:match_words|, you will -probably want to have this set automatically each time you edit the -appropriate file type. The recommended way to do this is by adding the -definition to a |filetype-plugin| file. - -Tips: Be careful that your initial pattern does not match your final pattern. -See the example above for the use of word-boundary expressions. It is usually -better to use ".\{-}" (as many as necessary) instead of ".*" (as many as -possible). See |\{-|. For example, in the string "label", "<.*>" -matches the whole string whereas "<.\{-}>" and "<[^>]*>" match "" and -"". - - *matchit-spaces* *matchit-s:notend* -If "if" is to be paired with "end if" (Note the space!) then word boundaries -are not enough. Instead, define a regular expression s:notend that will match -anything but "end" and use it as follows: > - :let s:notend = '\%(\:\' -< *matchit-s:sol* -This is a simplified version of what is done for Ada. The s:notend is a -|script-variable|. Similarly, you may want to define a start-of-line regular -expression > - :let s:sol = '\%(^\|;\)\s*' -if keywords are only recognized after the start of a line or after a -semicolon (;), with optional white space. - - *matchit-backref* *matchit-\1* -In any group, the expressions |\1|, |\2|, ..., |\9| refer to parts of the -INITIAL pattern enclosed in |\(|escaped parentheses|\)|. These are referred -to as back references, or backrefs. For example, > - :let b:match_words = '\:\(h\)\1\>' -means that "bo" pairs with "ho" and "boo" pairs with "hoo" and so on. Note -that "\1" does not refer to the "\(h\)" in this example. If you have -"\(nested \(parentheses\)\) then "\d" refers to the d-th "\(" and everything -up to and including the matching "\)": in "\(nested\(parentheses\)\)", "\1" -refers to everything and "\2" refers to "\(parentheses\)". If you use a -variable such as |s:notend| or |s:sol| in the previous paragraph then remember -to count any "\(" patterns in this variable. You do not have to count groups -defined by |\%(\)|. - -It should be possible to resolve back references from any pattern in the -group. For example, > - :let b:match_words = '\(foo\)\(bar\):more\1:and\2:end\1\2' -would not work because "\2" cannot be determined from "morefoo" and "\1" -cannot be determined from "andbar". On the other hand, > - :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1' -should work (and have the same effect as "foobar:barfoo:endfoobar"), although -this has not been thoroughly tested. - -You can use |zero-width| patterns such as |\@<=| and |\zs|. (The latter has -not been thouroughly tested in matchit.vim.) For example, if the keyword "if" -must occur at the start of the line, with optional white space, you might use -the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of -at the start of the line. For another example, if HTML had only one tag then -one could > - :let b:match_words = '<:>,<\@<=tag>:<\@<=/tag>' -so that "%" can bounce between matching "<" and ">" pairs or (starting on -"tag" or "/tag") between matching tags. Without the |\@<=|, the script would -bounce from "tag" to the "<" in "", and another "%" would not take you -back to where you started. - -DEBUGGING *matchit-debug* *:MatchDebug* - -If you are having trouble figuring out the appropriate definition of -|b:match_words| then you can take advantage of the same information I use when -debugging the script. This is especially true if you are not sure whether -your patterns or my script are at fault! To make this more convenient, I have -made the command :MatchDebug, which defines the variable |b:match_debug| and -creates a Matchit menu. This menu makes it convenient to check the values of -the variables described below. You will probably also want to read -|matchit-details| above. - -Defining the variable |b:match_debug| causes the script to set the following -variables, each time you hit the "%" key. Several of these are only defined -if |b:match_words| includes |backref|s. - - *b:match_pat* -The b:match_pat variable is set to |b:match_words| with |backref|s parsed. - *b:match_match* -The b:match_match variable is set to the bit of text that is recognized as a -match. - *b:match_col* -The b:match_col variable is set to the cursor column of the start of the -matching text. - *b:match_wholeBR* -The b:match_wholeBR variable is set to the comma-separated group of patterns -that matches, with |backref|s unparsed. - *b:match_iniBR* -The b:match_iniBR variable is set to the first pattern in |b:match_wholeBR|. - *b:match_ini* -The b:match_ini variable is set to the first pattern in |b:match_wholeBR|, -with |backref|s resolved from |b:match_match|. - *b:match_tail* -The b:match_tail variable is set to the remaining patterns in -|b:match_wholeBR|, with |backref|s resolved from |b:match_match|. - *b:match_word* -The b:match_word variable is set to the pattern from |b:match_wholeBR| that -matches |b:match_match|. - *b:match_table* -The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in -|b:match_word|. - -============================================================================== -5. Known Bugs and Limitations *matchit-bugs* - -Just because I know about a bug does not mean that it is on my todo list. I -try to respond to reports of bugs that cause real problems. If it does not -cause serious problems, or if there is a work-around, a bug may sit there for -a while. Moral: if a bug (known or not) bothers you, let me know. - -The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may -have undesired effects in Select mode |Select-mode-mapping|. At least, if you -want to replace the selection with any character in "ag%[]" there will be a -pause of |'updatetime'| first. - -It would be nice if "\0" were recognized as the entire pattern. That is, it -would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1". I may -try to implement this in a future version. (This is not so easy to arrange as -you might think!) - -============================================================================== -vim:tw=78:fo=tcq2: diff --git a/bundle/matchit/doc/tags b/bundle/matchit/doc/tags deleted file mode 100644 index 4ccdc872..00000000 --- a/bundle/matchit/doc/tags +++ /dev/null @@ -1,50 +0,0 @@ -:MatchDebug matchit.txt /*:MatchDebug* -MatchError matchit.txt /*MatchError* -[% matchit.txt /*[%* -]% matchit.txt /*]%* -b:match_col matchit.txt /*b:match_col* -b:match_debug matchit.txt /*b:match_debug* -b:match_ignorecase matchit.txt /*b:match_ignorecase* -b:match_ini matchit.txt /*b:match_ini* -b:match_iniBR matchit.txt /*b:match_iniBR* -b:match_match matchit.txt /*b:match_match* -b:match_pat matchit.txt /*b:match_pat* -b:match_skip matchit.txt /*b:match_skip* -b:match_table matchit.txt /*b:match_table* -b:match_tail matchit.txt /*b:match_tail* -b:match_wholeBR matchit.txt /*b:match_wholeBR* -b:match_word matchit.txt /*b:match_word* -b:match_words matchit.txt /*b:match_words* -g% matchit.txt /*g%* -matchit matchit.txt /*matchit* -matchit-% matchit.txt /*matchit-%* -matchit-\1 matchit.txt /*matchit-\\1* -matchit-activate matchit.txt /*matchit-activate* -matchit-backref matchit.txt /*matchit-backref* -matchit-bugs matchit.txt /*matchit-bugs* -matchit-choose matchit.txt /*matchit-choose* -matchit-configure matchit.txt /*matchit-configure* -matchit-debug matchit.txt /*matchit-debug* -matchit-details matchit.txt /*matchit-details* -matchit-highlight matchit.txt /*matchit-highlight* -matchit-hl matchit.txt /*matchit-hl* -matchit-intro matchit.txt /*matchit-intro* -matchit-languages matchit.txt /*matchit-languages* -matchit-modes matchit.txt /*matchit-modes* -matchit-newlang matchit.txt /*matchit-newlang* -matchit-o_% matchit.txt /*matchit-o_%* -matchit-parse matchit.txt /*matchit-parse* -matchit-s:notend matchit.txt /*matchit-s:notend* -matchit-s:sol matchit.txt /*matchit-s:sol* -matchit-spaces matchit.txt /*matchit-spaces* -matchit-troubleshoot matchit.txt /*matchit-troubleshoot* -matchit-v_% matchit.txt /*matchit-v_%* -matchit.txt matchit.txt /*matchit.txt* -matchit.vim matchit.txt /*matchit.vim* -o_[% matchit.txt /*o_[%* -o_]% matchit.txt /*o_]%* -o_g% matchit.txt /*o_g%* -v_[% matchit.txt /*v_[%* -v_]% matchit.txt /*v_]%* -v_a% matchit.txt /*v_a%* -v_g% matchit.txt /*v_g%* diff --git a/bundle/matchit/plugin/matchit.vim b/bundle/matchit/plugin/matchit.vim deleted file mode 100644 index e41cda9e..00000000 --- a/bundle/matchit/plugin/matchit.vim +++ /dev/null @@ -1,812 +0,0 @@ -" matchit.vim: (global plugin) Extended "%" matching -" Last Change: Fri Jan 25 10:00 AM 2008 EST -" Maintainer: Benji Fisher PhD -" Version: 1.13.2, for Vim 6.3+ -" URL: http://www.vim.org/script.php?script_id=39 - -" Documentation: -" The documentation is in a separate file, matchit.txt . - -" Credits: -" Vim editor by Bram Moolenaar (Thanks, Bram!) -" Original script and design by Raul Segura Acevedo -" Support for comments by Douglas Potts -" Support for back references and other improvements by Benji Fisher -" Support for many languages by Johannes Zellner -" Suggestions for improvement, bug reports, and support for additional -" languages by Jordi-Albert Batalla, Neil Bird, Servatius Brandt, Mark -" Collett, Stephen Wall, Dany St-Amant, Yuheng Xie, and Johannes Zellner. - -" Debugging: -" If you'd like to try the built-in debugging commands... -" :MatchDebug to activate debugging for the current buffer -" This saves the values of several key script variables as buffer-local -" variables. See the MatchDebug() function, below, for details. - -" TODO: I should think about multi-line patterns for b:match_words. -" This would require an option: how many lines to scan (default 1). -" This would be useful for Python, maybe also for *ML. -" TODO: Maybe I should add a menu so that people will actually use some of -" the features that I have implemented. -" TODO: Eliminate the MultiMatch function. Add yet another argument to -" Match_wrapper() instead. -" TODO: Allow :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1' -" TODO: Make backrefs safer by using '\V' (very no-magic). -" TODO: Add a level of indirection, so that custom % scripts can use my -" work but extend it. - -" allow user to prevent loading -" and prevent duplicate loading -if exists("loaded_matchit") || &cp - finish -endif -let loaded_matchit = 1 -let s:last_mps = "" -let s:last_words = ":" - -let s:save_cpo = &cpo -set cpo&vim - -nnoremap % :call Match_wrapper('',1,'n') -nnoremap g% :call Match_wrapper('',0,'n') -vnoremap % :call Match_wrapper('',1,'v') m'gv`` -vnoremap g% :call Match_wrapper('',0,'v') m'gv`` -onoremap % v:call Match_wrapper('',1,'o') -onoremap g% v:call Match_wrapper('',0,'o') - -" Analogues of [{ and ]} using matching patterns: -nnoremap [% :call MultiMatch("bW", "n") -nnoremap ]% :call MultiMatch("W", "n") -vmap [% [%m'gv`` -vmap ]% ]%m'gv`` -" vnoremap [% :call MultiMatch("bW", "v") m'gv`` -" vnoremap ]% :call MultiMatch("W", "v") m'gv`` -onoremap [% v:call MultiMatch("bW", "o") -onoremap ]% v:call MultiMatch("W", "o") - -" text object: -vmap a% [%v]% - -" Auto-complete mappings: (not yet "ready for prime time") -" TODO Read :help write-plugin for the "right" way to let the user -" specify a key binding. -" let g:match_auto = '' -" let g:match_autoCR = '' -" if exists("g:match_auto") -" execute "inoremap " . g:match_auto . ' x"=Autocomplete()Pls' -" endif -" if exists("g:match_autoCR") -" execute "inoremap " . g:match_autoCR . ' =Autocomplete()' -" endif -" if exists("g:match_gthhoh") -" execute "inoremap " . g:match_gthhoh . ' :call Gthhoh()' -" endif " gthhoh = "Get the heck out of here!" - -let s:notslash = '\\\@" - endif - " In s:CleanUp(), we may need to check whether the cursor moved forward. - let startline = line(".") - let startcol = col(".") - " Use default behavior if called with a count. - if v:count - exe "normal! " . v:count . "%" - return s:CleanUp(restore_options, a:mode, startline, startcol) - end - - " First step: if not already done, set the script variables - " s:do_BR flag for whether there are backrefs - " s:pat parsed version of b:match_words - " s:all regexp based on s:pat and the default groups - " - if !exists("b:match_words") || b:match_words == "" - let match_words = "" - " Allow b:match_words = "GetVimMatchWords()" . - elseif b:match_words =~ ":" - let match_words = b:match_words - else - execute "let match_words =" b:match_words - endif -" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion! - if (match_words != s:last_words) || (&mps != s:last_mps) || - \ exists("b:match_debug") - let s:last_words = match_words - let s:last_mps = &mps - " The next several lines were here before - " BF started messing with this script. - " quote the special chars in 'matchpairs', replace [,:] with \| and then - " append the builtin pairs (/*, */, #if, #ifdef, #else, #elif, #endif) - " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+', - " \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>' - let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . - \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' - " s:all = pattern with all the keywords - let match_words = match_words . (strlen(match_words) ? "," : "") . default - if match_words !~ s:notslash . '\\\d' - let s:do_BR = 0 - let s:pat = match_words - else - let s:do_BR = 1 - let s:pat = s:ParseWords(match_words) - endif - let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g') - let s:all = '\%(' . s:all . '\)' - " let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)' - if exists("b:match_debug") - let b:match_pat = s:pat - endif - endif - - " Second step: set the following local variables: - " matchline = line on which the cursor started - " curcol = number of characters before match - " prefix = regexp for start of line to start of match - " suffix = regexp for end of match to end of line - " Require match to end on or after the cursor and prefer it to - " start on or before the cursor. - let matchline = getline(startline) - if a:word != '' - " word given - if a:word !~ s:all - echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE - return s:CleanUp(restore_options, a:mode, startline, startcol) - endif - let matchline = a:word - let curcol = 0 - let prefix = '^\%(' - let suffix = '\)$' - " Now the case when "word" is not given - else " Find the match that ends on or after the cursor and set curcol. - let regexp = s:Wholematch(matchline, s:all, startcol-1) - let curcol = match(matchline, regexp) - " If there is no match, give up. - if curcol == -1 - return s:CleanUp(restore_options, a:mode, startline, startcol) - endif - let endcol = matchend(matchline, regexp) - let suf = strlen(matchline) - endcol - let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(') - let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$') - endif - if exists("b:match_debug") - let b:match_match = matchstr(matchline, regexp) - let b:match_col = curcol+1 - endif - - " Third step: Find the group and single word that match, and the original - " (backref) versions of these. Then, resolve the backrefs. - " Set the following local variable: - " group = colon-separated list of patterns, one of which matches - " = ini:mid:fin or ini:fin - " - " Reconstruct the version with unresolved backrefs. - let patBR = substitute(match_words.',', - \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g') - let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g') - " Now, set group and groupBR to the matching group: 'if:endif' or - " 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns - " group . "," . groupBR, and we pick it apart. - let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR) - let i = matchend(group, s:notslash . ",") - let groupBR = strpart(group, i) - let group = strpart(group, 0, i-1) - " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix - if s:do_BR " Do the hard part: resolve those backrefs! - let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline) - endif - if exists("b:match_debug") - let b:match_wholeBR = groupBR - let i = matchend(groupBR, s:notslash . ":") - let b:match_iniBR = strpart(groupBR, 0, i-1) - endif - - " Fourth step: Set the arguments for searchpair(). - let i = matchend(group, s:notslash . ":") - let j = matchend(group, '.*' . s:notslash . ":") - let ini = strpart(group, 0, i-1) - let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g') - let fin = strpart(group, j) - "Un-escape the remaining , and : characters. - let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') - let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') - let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g') - " searchpair() requires that these patterns avoid \(\) groups. - let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g') - let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g') - let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g') - " Set mid. This is optimized for readability, not micro-efficiency! - if a:forward && matchline =~ prefix . fin . suffix - \ || !a:forward && matchline =~ prefix . ini . suffix - let mid = "" - endif - " Set flag. This is optimized for readability, not micro-efficiency! - if a:forward && matchline =~ prefix . fin . suffix - \ || !a:forward && matchline !~ prefix . ini . suffix - let flag = "bW" - else - let flag = "W" - endif - " Set skip. - if exists("b:match_skip") - let skip = b:match_skip - elseif exists("b:match_comment") " backwards compatibility and testing! - let skip = "r:" . b:match_comment - else - let skip = 's:comment\|string' - endif - let skip = s:ParseSkip(skip) - if exists("b:match_debug") - let b:match_ini = ini - let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin - endif - - " Fifth step: actually start moving the cursor and call searchpair(). - " Later, :execute restore_cursor to get to the original screen. - let restore_cursor = virtcol(".") . "|" - normal! g0 - let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor - normal! H - let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor - execute restore_cursor - call cursor(0, curcol + 1) - " normal! 0 - " if curcol - " execute "normal!" . curcol . "l" - " endif - if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on")) - let skip = "0" - else - execute "if " . skip . "| let skip = '0' | endif" - endif - let sp_return = searchpair(ini, mid, fin, flag, skip) - let final_position = "call cursor(" . line(".") . "," . col(".") . ")" - " Restore cursor position and original screen. - execute restore_cursor - normal! m' - if sp_return > 0 - execute final_position - endif - return s:CleanUp(restore_options, a:mode, startline, startcol, mid.'\|'.fin) -endfun - -" Restore options and do some special handling for Operator-pending mode. -" The optional argument is the tail of the matching group. -fun! s:CleanUp(options, mode, startline, startcol, ...) - execute "set" a:options - " Open folds, if appropriate. - if a:mode != "o" - if &foldopen =~ "percent" - normal! zv - endif - " In Operator-pending mode, we want to include the whole match - " (for example, d%). - " This is only a problem if we end up moving in the forward direction. - elseif (a:startline < line(".")) || - \ (a:startline == line(".") && a:startcol < col(".")) - if a:0 - " Check whether the match is a single character. If not, move to the - " end of the match. - let matchline = getline(".") - let currcol = col(".") - let regexp = s:Wholematch(matchline, a:1, currcol-1) - let endcol = matchend(matchline, regexp) - if endcol > currcol " This is NOT off by one! - execute "normal!" . (endcol - currcol) . "l" - endif - endif " a:0 - endif " a:mode != "o" && etc. - return 0 -endfun - -" Example (simplified HTML patterns): if -" a:groupBR = '<\(\k\+\)>:' -" a:prefix = '^.\{3}\(' -" a:group = '<\(\k\+\)>:' -" a:suffix = '\).\{2}$' -" a:matchline = "12312" or "12312" -" then extract "tag" from a:matchline and return ":" . -fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline) - if a:matchline !~ a:prefix . - \ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix - return a:group - endif - let i = matchend(a:groupBR, s:notslash . ':') - let ini = strpart(a:groupBR, 0, i-1) - let tailBR = strpart(a:groupBR, i) - let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix, - \ a:groupBR) - let i = matchend(word, s:notslash . ":") - let wordBR = strpart(word, i) - let word = strpart(word, 0, i-1) - " Now, a:matchline =~ a:prefix . word . a:suffix - if wordBR != ini - let table = s:Resolve(ini, wordBR, "table") - else - " let table = "----------" - let table = "" - let d = 0 - while d < 10 - if tailBR =~ s:notslash . '\\' . d - " let table[d] = d - let table = table . d - else - let table = table . "-" - endif - let d = d + 1 - endwhile - endif - let d = 9 - while d - if table[d] != "-" - let backref = substitute(a:matchline, a:prefix.word.a:suffix, - \ '\'.table[d], "") - " Are there any other characters that should be escaped? - let backref = escape(backref, '*,:') - execute s:Ref(ini, d, "start", "len") - let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len) - let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d, - \ escape(backref, '\\'), 'g') - endif - let d = d-1 - endwhile - if exists("b:match_debug") - if s:do_BR - let b:match_table = table - let b:match_word = word - else - let b:match_table = "" - let b:match_word = "" - endif - endif - return ini . ":" . tailBR -endfun - -" Input a comma-separated list of groups with backrefs, such as -" a:groups = '\(foo\):end\1,\(bar\):end\1' -" and return a comma-separated list of groups with backrefs replaced: -" return '\(foo\):end\(foo\),\(bar\):end\(bar\)' -fun! s:ParseWords(groups) - let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g') - let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g') - let parsed = "" - while groups =~ '[^,:]' - let i = matchend(groups, s:notslash . ':') - let j = matchend(groups, s:notslash . ',') - let ini = strpart(groups, 0, i-1) - let tail = strpart(groups, i, j-i-1) . ":" - let groups = strpart(groups, j) - let parsed = parsed . ini - let i = matchend(tail, s:notslash . ':') - while i != -1 - " In 'if:else:endif', ini='if' and word='else' and then word='endif'. - let word = strpart(tail, 0, i-1) - let tail = strpart(tail, i) - let i = matchend(tail, s:notslash . ':') - let parsed = parsed . ":" . s:Resolve(ini, word, "word") - endwhile " Now, tail has been used up. - let parsed = parsed . "," - endwhile " groups =~ '[^,:]' - let parsed = substitute(parsed, ',$', '', '') - return parsed -endfun - -" TODO I think this can be simplified and/or made more efficient. -" TODO What should I do if a:start is out of range? -" Return a regexp that matches all of a:string, such that -" matchstr(a:string, regexp) represents the match for a:pat that starts -" as close to a:start as possible, before being preferred to after, and -" ends after a:start . -" Usage: -" let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1) -" let i = match(getline("."), regexp) -" let j = matchend(getline("."), regexp) -" let match = matchstr(getline("."), regexp) -fun! s:Wholematch(string, pat, start) - let group = '\%(' . a:pat . '\)' - let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^') - let len = strlen(a:string) - let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$') - if a:string !~ prefix . group . suffix - let prefix = '' - endif - return prefix . group . suffix -endfun - -" No extra arguments: s:Ref(string, d) will -" find the d'th occurrence of '\(' and return it, along with everything up -" to and including the matching '\)'. -" One argument: s:Ref(string, d, "start") returns the index of the start -" of the d'th '\(' and any other argument returns the length of the group. -" Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be -" executed, having the effect of -" :let foo = s:Ref(string, d, "start") -" :let bar = s:Ref(string, d, "len") -fun! s:Ref(string, d, ...) - let len = strlen(a:string) - if a:d == 0 - let start = 0 - else - let cnt = a:d - let match = a:string - while cnt - let cnt = cnt - 1 - let index = matchend(match, s:notslash . '\\(') - if index == -1 - return "" - endif - let match = strpart(match, index) - endwhile - let start = len - strlen(match) - if a:0 == 1 && a:1 == "start" - return start - 2 - endif - let cnt = 1 - while cnt - let index = matchend(match, s:notslash . '\\(\|\\)') - 1 - if index == -2 - return "" - endif - " Increment if an open, decrement if a ')': - let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')' - " let cnt = stridx('0(', match[index]) + cnt - let match = strpart(match, index+1) - endwhile - let start = start - 2 - let len = len - start - strlen(match) - endif - if a:0 == 1 - return len - elseif a:0 == 2 - return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len - else - return strpart(a:string, start, len) - endif -endfun - -" Count the number of disjoint copies of pattern in string. -" If the pattern is a literal string and contains no '0' or '1' characters -" then s:Count(string, pattern, '0', '1') should be faster than -" s:Count(string, pattern). -fun! s:Count(string, pattern, ...) - let pat = escape(a:pattern, '\\') - if a:0 > 1 - let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g") - let foo = substitute(a:string, pat, a:2, "g") - let foo = substitute(foo, '[^' . a:2 . ']', "", "g") - return strlen(foo) - endif - let result = 0 - let foo = a:string - let index = matchend(foo, pat) - while index != -1 - let result = result + 1 - let foo = strpart(foo, index) - let index = matchend(foo, pat) - endwhile - return result -endfun - -" s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where -" word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first -" '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this -" indicates that all other instances of '\1' in target are to be replaced -" by '\3'. The hard part is dealing with nesting... -" Note that ":" is an illegal character for source and target, -" unless it is preceded by "\". -fun! s:Resolve(source, target, output) - let word = a:target - let i = matchend(word, s:notslash . '\\\d') - 1 - let table = "----------" - while i != -2 " There are back references to be replaced. - let d = word[i] - let backref = s:Ref(a:source, d) - " The idea is to replace '\d' with backref. Before we do this, - " replace any \(\) groups in backref with :1, :2, ... if they - " correspond to the first, second, ... group already inserted - " into backref. Later, replace :1 with \1 and so on. The group - " number w+b within backref corresponds to the group number - " s within a:source. - " w = number of '\(' in word before the current one - let w = s:Count( - \ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1') - let b = 1 " number of the current '\(' in backref - let s = d " number of the current '\(' in a:source - while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1') - \ && s < 10 - if table[s] == "-" - if w + b < 10 - " let table[s] = w + b - let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1) - endif - let b = b + 1 - let s = s + 1 - else - execute s:Ref(backref, b, "start", "len") - let ref = strpart(backref, start, len) - let backref = strpart(backref, 0, start) . ":". table[s] - \ . strpart(backref, start+len) - let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1') - endif - endwhile - let word = strpart(word, 0, i-1) . backref . strpart(word, i+1) - let i = matchend(word, s:notslash . '\\\d') - 1 - endwhile - let word = substitute(word, s:notslash . '\zs:', '\\', 'g') - if a:output == "table" - return table - elseif a:output == "word" - return word - else - return table . word - endif -endfun - -" Assume a:comma = ",". Then the format for a:patterns and a:1 is -" a:patterns = ",,..." -" a:1 = ",,..." -" If is the first pattern that matches a:string then return -" if no optional arguments are given; return , if a:1 is given. -fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...) - let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma) - let i = matchend(tail, s:notslash . a:comma) - if a:0 - let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma) - let j = matchend(alttail, s:notslash . a:comma) - endif - let current = strpart(tail, 0, i-1) - if a:branch == "" - let currpat = current - else - let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') - endif - while a:string !~ a:prefix . currpat . a:suffix - let tail = strpart(tail, i) - let i = matchend(tail, s:notslash . a:comma) - if i == -1 - return -1 - endif - let current = strpart(tail, 0, i-1) - if a:branch == "" - let currpat = current - else - let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g') - endif - if a:0 - let alttail = strpart(alttail, j) - let j = matchend(alttail, s:notslash . a:comma) - endif - endwhile - if a:0 - let current = current . a:comma . strpart(alttail, 0, j-1) - endif - return current -endfun - -" Call this function to turn on debugging information. Every time the main -" script is run, buffer variables will be saved. These can be used directly -" or viewed using the menu items below. -if !exists(":MatchDebug") - command! -nargs=0 MatchDebug call s:Match_debug() -endif - -fun! s:Match_debug() - let b:match_debug = 1 " Save debugging information. - " pat = all of b:match_words with backrefs parsed - amenu &Matchit.&pat :echo b:match_pat - " match = bit of text that is recognized as a match - amenu &Matchit.&match :echo b:match_match - " curcol = cursor column of the start of the matching text - amenu &Matchit.&curcol :echo b:match_col - " wholeBR = matching group, original version - amenu &Matchit.wh&oleBR :echo b:match_wholeBR - " iniBR = 'if' piece, original version - amenu &Matchit.ini&BR :echo b:match_iniBR - " ini = 'if' piece, with all backrefs resolved from match - amenu &Matchit.&ini :echo b:match_ini - " tail = 'else\|endif' piece, with all backrefs resolved from match - amenu &Matchit.&tail :echo b:match_tail - " fin = 'endif' piece, with all backrefs resolved from match - amenu &Matchit.&word :echo b:match_word - " '\'.d in ini refers to the same thing as '\'.table[d] in word. - amenu &Matchit.t&able :echo '0:' . b:match_table . ':9' -endfun - -" Jump to the nearest unmatched "(" or "if" or "" if a:spflag == "bW" -" or the nearest unmatched "" or "endif" or ")" if a:spflag == "W". -" Return a "mark" for the original position, so that -" let m = MultiMatch("bW", "n") ... execute m -" will return to the original position. If there is a problem, do not -" move the cursor and return "", unless a count is given, in which case -" go up or down as many levels as possible and again return "". -" TODO This relies on the same patterns as % matching. It might be a good -" idea to give it its own matching patterns. -fun! s:MultiMatch(spflag, mode) - if !exists("b:match_words") || b:match_words == "" - return "" - end - let restore_options = (&ic ? "" : "no") . "ignorecase" - if exists("b:match_ignorecase") - let &ignorecase = b:match_ignorecase - endif - let startline = line(".") - let startcol = col(".") - - " First step: if not already done, set the script variables - " s:do_BR flag for whether there are backrefs - " s:pat parsed version of b:match_words - " s:all regexp based on s:pat and the default groups - " This part is copied and slightly modified from s:Match_wrapper(). - let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . - \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' - " Allow b:match_words = "GetVimMatchWords()" . - if b:match_words =~ ":" - let match_words = b:match_words - else - execute "let match_words =" b:match_words - endif - if (match_words != s:last_words) || (&mps != s:last_mps) || - \ exists("b:match_debug") - let s:last_words = match_words - let s:last_mps = &mps - if match_words !~ s:notslash . '\\\d' - let s:do_BR = 0 - let s:pat = match_words - else - let s:do_BR = 1 - let s:pat = s:ParseWords(match_words) - endif - let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default, - \ '[,:]\+','\\|','g') . '\)' - if exists("b:match_debug") - let b:match_pat = s:pat - endif - endif - - " Second step: figure out the patterns for searchpair() - " and save the screen, cursor position, and 'ignorecase'. - " - TODO: A lot of this is copied from s:Match_wrapper(). - " - maybe even more functionality should be split off - " - into separate functions! - let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default - let open = substitute(s:pat . cdefault, - \ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g') - let open = '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '') - let close = substitute(s:pat . cdefault, - \ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g') - let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)' - if exists("b:match_skip") - let skip = b:match_skip - elseif exists("b:match_comment") " backwards compatibility and testing! - let skip = "r:" . b:match_comment - else - let skip = 's:comment\|string' - endif - let skip = s:ParseSkip(skip) - " let restore_cursor = line(".") . "G" . virtcol(".") . "|" - " normal! H - " let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor - let restore_cursor = virtcol(".") . "|" - normal! g0 - let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor - normal! H - let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor - execute restore_cursor - - " Third step: call searchpair(). - " Replace '\('--but not '\\('--with '\%(' and ',' with '\|'. - let openpat = substitute(open, '\(\\\@" or ... -" and return "endif" or "endwhile" or "" or ... . -" For now, this uses b:match_words and the same script variables -" as s:Match_wrapper() . Later, it may get its own patterns, -" either from a buffer variable or passed as arguments. -" fun! s:Autocomplete() -" echo "autocomplete not yet implemented :-(" -" if !exists("b:match_words") || b:match_words == "" -" return "" -" end -" let startpos = s:MultiMatch("bW") -" -" if startpos == "" -" return "" -" endif -" " - TODO: figure out whether 'if' or '' matched, and construct -" " - the appropriate closing. -" let matchline = getline(".") -" let curcol = col(".") - 1 -" " - TODO: Change the s:all argument if there is a new set of match pats. -" let regexp = s:Wholematch(matchline, s:all, curcol) -" let suf = strlen(matchline) - matchend(matchline, regexp) -" let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(') -" let suffix = (suf ? '\).\{' . suf . '}$' : '\)$') -" " Reconstruct the version with unresolved backrefs. -" let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g') -" let patBR = substitute(patBR, ':\{2,}', ':', "g") -" " Now, set group and groupBR to the matching group: 'if:endif' or -" " 'while:endwhile' or whatever. -" let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR) -" let i = matchend(group, s:notslash . ",") -" let groupBR = strpart(group, i) -" let group = strpart(group, 0, i-1) -" " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix -" if s:do_BR -" let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline) -" endif -" " let g:group = group -" -" " - TODO: Construct the closing from group. -" let fake = "end" . expand("") -" execute startpos -" return fake -" endfun - -" Close all open structures. "Get the heck out of here!" -" fun! s:Gthhoh() -" let close = s:Autocomplete() -" while strlen(close) -" put=close -" let close = s:Autocomplete() -" endwhile -" endfun - -" Parse special strings as typical skip arguments for searchpair(): -" s:foo becomes (current syntax item) =~ foo -" S:foo becomes (current syntax item) !~ foo -" r:foo becomes (line before cursor) =~ foo -" R:foo becomes (line before cursor) !~ foo -fun! s:ParseSkip(str) - let skip = a:str - if skip[1] == ":" - if skip[0] == "s" - let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" . - \ strpart(skip,2) . "'" - elseif skip[0] == "S" - let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" . - \ strpart(skip,2) . "'" - elseif skip[0] == "r" - let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'" - elseif skip[0] == "R" - let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'" - endif - endif - return skip -endfun - -let &cpo = s:save_cpo - -" vim:sts=2:sw=2: diff --git a/bundle/mustache b/bundle/mustache deleted file mode 160000 index 17b4c7be..00000000 --- a/bundle/mustache +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 17b4c7be276a5bb31f8c494f7d3e5e1b7294cab9 diff --git a/bundle/nerdcommenter b/bundle/nerdcommenter deleted file mode 160000 index 0b3d928d..00000000 --- a/bundle/nerdcommenter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b3d928dce8262dedfc2f83b9aeb59a94e4f0ae4 diff --git a/bundle/nerdtree b/bundle/nerdtree deleted file mode 160000 index b0bb781f..00000000 --- a/bundle/nerdtree +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b0bb781fc73ef40365e4c996a16f04368d64fc9d diff --git a/bundle/quickfixfix b/bundle/quickfixfix deleted file mode 160000 index c6f5e607..00000000 --- a/bundle/quickfixfix +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c6f5e607675a15a7d146bd9bd41af14719535678 diff --git a/bundle/regreplop/plugin/regreplop.vim b/bundle/regreplop/plugin/regreplop.vim deleted file mode 100644 index 5e447d07..00000000 --- a/bundle/regreplop/plugin/regreplop.vim +++ /dev/null @@ -1,109 +0,0 @@ -"============================================================================= -" regreplop.vim - a operator to replace something with a register -"============================================================================= -" -" Author: Takahiro SUZUKI -" Version: 1.1 (Vim 7.1) -" Licence: MIT Licence -" -"============================================================================= -" Document: {{{1 -" -"----------------------------------------------------------------------------- -" Description: -" This plugin provides a operator to replace something(motion/visual) with a -" specified register. -" By default, the operator is mapped at -" ReplaceMotion " for normal mode -" ReplaceLine " for normal mode (replace a line) -" ReplaceVisual " for visual mode -" and if there are no key mapping for , is mapped to these -" operators. (and for ReplaceLine) -" -" If you want to map them to another keys, add like below in your vimrc. -" nmap YOURKEY ReplaceMotion -" nmap YOURKEY ReplaceLine -" vmap YOURKEY ReplaceVisual -" -"----------------------------------------------------------------------------- -" Installation: -" Place this file in /usr/share/vim/vim*/plugin or ~/.vim/plugin/ -" Now replacing operator is available. -" -"----------------------------------------------------------------------------- -" Examples: -" in normal mode: -" iw " replaces inner word with default register -" "aiw " replaces inner word with register a -" $ " replaces whole text right the cursor -" " replaces the line under cursor -" -" in visual mode: -" " replace visual selection with default register -" "a " replace visual selection with register a -" -"----------------------------------------------------------------------------- -" ChangeLog: -" 1.1: -" - added ReplaceLine (default: ) -" 1.0.1: -" - code refinement -" 1.0: -" - Initial release -" -" }}}1 -"============================================================================= - -" replace selection with register -function! s:ReplaceMotion(type, ...) - let reg = empty(s:lastreg) ? '"' : s:lastreg - let op_mode = 'v' " default: character - let marks = '<>' " default: visual mode - - if !a:0 " normal mode - let marks = '[]' - if a:type == 'line' - let op_mode = 'V' - call setreg(reg[:-2], getreg(reg), getregtype(reg)) - endif - endif - - let ai_back = &autoindent - exe 'normal! `'.marks[1].'$' - exe 'normal! `'.marks[0].'"_c'.op_mode.'`'.marks[1]."\".reg."\" -endfunction - -function! s:ReplaceLine(type, ...) - let reg = empty(s:lastreg) ? '"' : s:lastreg - exe 'normal! "_d' . (s:lastcnt==1 ? 'd' : s:lastcnt.'j') - if getregtype(reg)=='V' - " linewise - exe 'normal! "'.reg.'P' - else - " emulate linewise - exe "normal! O\".reg."\" - endif -endfunction - -function! s:SaveReg() - let s:lastreg = v:register - let s:lastcnt = v:count1 -endfunction - -" default mapping -if !hasmapto('ReplaceMotion', 'n') - nmap ReplaceMotion -endif -if !hasmapto('ReplaceLine', 'n') - nmap ReplaceLine -endif -if !hasmapto('ReplaceVisual', 'v') - vmap ReplaceVisual -endif - -" export the plugin mapping -nnoremap ReplaceMotion :call SaveReg():set opfunc=ReplaceMotiong@ -nnoremap ReplaceLine :call SaveReg():call ReplaceLine('line') -vnoremap ReplaceVisual :call SaveReg():call ReplaceMotion('', 1) - -" vim: set foldmethod=marker et ts=2 sts=2 sw=2: diff --git a/bundle/snipMate/after/plugin/snipMate.vim b/bundle/snipMate/after/plugin/snipMate.vim deleted file mode 100644 index 03e79ae2..00000000 --- a/bundle/snipMate/after/plugin/snipMate.vim +++ /dev/null @@ -1,35 +0,0 @@ -" These are the mappings for snipMate.vim. Putting it here ensures that it -" will be mapped after other plugins such as supertab.vim. -if !exists('loaded_snips') || exists('s:did_snips_mappings') - finish -endif -let s:did_snips_mappings = 1 - -ino =TriggerSnippet() -snor i=TriggerSnippet() -ino =BackwardsSnippet() -snor i=BackwardsSnippet() -ino =ShowAvailableSnips() - -" The default mappings for these are annoying & sometimes break snipMate. -" You can change them back if you want, I've put them here for convenience. -snor b -snor a -snor bi -snor ' b' -snor ` b` -snor % b% -snor U bU -snor ^ b^ -snor \ b\ -snor b - -" By default load snippets in snippets_dir -if empty(snippets_dir) - finish -endif - -call GetSnippets(snippets_dir, '_') " Get global snippets - -au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif -" vim:noet:sw=4:ts=4:ft=vim diff --git a/bundle/snipMate/autoload/snipMate.vim b/bundle/snipMate/autoload/snipMate.vim deleted file mode 100644 index dcd28f66..00000000 --- a/bundle/snipMate/autoload/snipMate.vim +++ /dev/null @@ -1,433 +0,0 @@ -fun! Filename(...) - let filename = expand('%:t:r') - if filename == '' | return a:0 == 2 ? a:2 : '' | endif - return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g') -endf - -fun s:RemoveSnippet() - unl! g:snipPos s:curPos s:snipLen s:endCol s:endLine s:prevLen - \ s:lastBuf s:oldWord - if exists('s:update') - unl s:startCol s:origWordLen s:update - if exists('s:oldVars') | unl s:oldVars s:oldEndCol | endif - endif - aug! snipMateAutocmds -endf - -fun snipMate#expandSnip(snip, col) - let lnum = line('.') | let col = a:col - - let snippet = s:ProcessSnippet(a:snip) - " Avoid error if eval evaluates to nothing - if snippet == '' | return '' | endif - - " Expand snippet onto current position with the tab stops removed - let snipLines = split(substitute(snippet, '$\d\+\|${\d\+.\{-}}', '', 'g'), "\n", 1) - - let line = getline(lnum) - let afterCursor = strpart(line, col - 1) - " Keep text after the cursor - if afterCursor != "\t" && afterCursor != ' ' - let line = strpart(line, 0, col - 1) - let snipLines[-1] .= afterCursor - else - let afterCursor = '' - " For some reason the cursor needs to move one right after this - if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' - let col += 1 - endif - endif - - call setline(lnum, line.snipLines[0]) - - " Autoindent snippet according to previous indentation - let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1 - call append(lnum, map(snipLines[1:], "'".strpart(line, 0, indent - 1)."'.v:val")) - - " Open any folds snippet expands into - if &fen | sil! exe lnum.','.(lnum + len(snipLines) - 1).'foldopen' | endif - - let [g:snipPos, s:snipLen] = s:BuildTabStops(snippet, lnum, col - indent, indent) - - if s:snipLen - aug snipMateAutocmds - au CursorMovedI * call s:UpdateChangedSnip(0) - au InsertEnter * call s:UpdateChangedSnip(1) - aug END - let s:lastBuf = bufnr(0) " Only expand snippet while in current buffer - let s:curPos = 0 - let s:endCol = g:snipPos[s:curPos][1] - let s:endLine = g:snipPos[s:curPos][0] - - call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) - let s:prevLen = [line('$'), col('$')] - if g:snipPos[s:curPos][2] != -1 | return s:SelectWord() | endif - else - unl g:snipPos s:snipLen - " Place cursor at end of snippet if no tab stop is given - let newlines = len(snipLines) - 1 - call cursor(lnum + newlines, indent + len(snipLines[-1]) - len(afterCursor) - \ + (newlines ? 0: col - 1)) - endif - return '' -endf - -" Prepare snippet to be processed by s:BuildTabStops -fun s:ProcessSnippet(snip) - let snippet = a:snip - " Evaluate eval (`...`) expressions. - " Using a loop here instead of a regex fixes a bug with nested "\=". - if stridx(snippet, '`') != -1 - while match(snippet, '`.\{-}`') != -1 - let snippet = substitute(snippet, '`.\{-}`', - \ substitute(eval(matchstr(snippet, '`\zs.\{-}\ze`')), - \ "\n\\%$", '', ''), '') - endw - let snippet = substitute(snippet, "\r", "\n", 'g') - endif - - " Place all text after a colon in a tab stop after the tab stop - " (e.g. "${#:foo}" becomes "${:foo}foo"). - " This helps tell the position of the tab stops later. - let snippet = substitute(snippet, '${\d\+:\(.\{-}\)}', '&\1', 'g') - - " Update the a:snip so that all the $# become the text after - " the colon in their associated ${#}. - " (e.g. "${1:foo}" turns all "$1"'s into "foo") - let i = 1 - while stridx(snippet, '${'.i) != -1 - let s = matchstr(snippet, '${'.i.':\zs.\{-}\ze}') - if s != '' - let snippet = substitute(snippet, '$'.i, s.'&', 'g') - endif - let i += 1 - endw - - if &et " Expand tabs to spaces if 'expandtab' is set. - return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g') - endif - return snippet -endf - -" Counts occurences of haystack in needle -fun s:Count(haystack, needle) - let counter = 0 - let index = stridx(a:haystack, a:needle) - while index != -1 - let index = stridx(a:haystack, a:needle, index+1) - let counter += 1 - endw - return counter -endf - -" Builds a list of a list of each tab stop in the snippet containing: -" 1.) The tab stop's line number. -" 2.) The tab stop's column number -" (by getting the length of the string between the last "\n" and the -" tab stop). -" 3.) The length of the text after the colon for the current tab stop -" (e.g. "${1:foo}" would return 3). If there is no text, -1 is returned. -" 4.) If the "${#:}" construct is given, another list containing all -" the matches of "$#", to be replaced with the placeholder. This list is -" composed the same way as the parent; the first item is the line number, -" and the second is the column. -fun s:BuildTabStops(snip, lnum, col, indent) - let snipPos = [] - let i = 1 - let withoutVars = substitute(a:snip, '$\d\+', '', 'g') - while stridx(a:snip, '${'.i) != -1 - let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D') - let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g') - - let j = i - 1 - call add(snipPos, [0, 0, -1]) - let snipPos[j][0] = a:lnum + s:Count(beforeTabStop, "\n") - let snipPos[j][1] = a:indent + len(matchstr(withoutOthers, '.*\(\n\|^\)\zs.*\ze${'.i.'\D')) - if snipPos[j][0] == a:lnum | let snipPos[j][1] += a:col | endif - - " Get all $# matches in another list, if ${#:name} is given - if stridx(withoutVars, '${'.i.':') != -1 - let snipPos[j][2] = len(matchstr(withoutVars, '${'.i.':\zs.\{-}\ze}')) - let dots = repeat('.', snipPos[j][2]) - call add(snipPos[j], []) - let withoutOthers = substitute(a:snip, '${\d\+.\{-}}\|$'.i.'\@!\d\+', '', 'g') - while match(withoutOthers, '$'.i.'\(\D\|$\)') != -1 - let beforeMark = matchstr(withoutOthers, '^.\{-}\ze'.dots.'$'.i.'\(\D\|$\)') - call add(snipPos[j][3], [0, 0]) - let snipPos[j][3][-1][0] = a:lnum + s:Count(beforeMark, "\n") - let snipPos[j][3][-1][1] = a:indent + (snipPos[j][3][-1][0] > a:lnum - \ ? len(matchstr(beforeMark, '.*\n\zs.*')) - \ : a:col + len(beforeMark)) - let withoutOthers = substitute(withoutOthers, '$'.i.'\ze\(\D\|$\)', '', '') - endw - endif - let i += 1 - endw - return [snipPos, i - 1] -endf - -fun snipMate#jumpTabStop(backwards) - let leftPlaceholder = exists('s:origWordLen') - \ && s:origWordLen != g:snipPos[s:curPos][2] - if leftPlaceholder && exists('s:oldEndCol') - let startPlaceholder = s:oldEndCol + 1 - endif - - if exists('s:update') - call s:UpdatePlaceholderTabStops() - else - call s:UpdateTabStops() - endif - - " Don't reselect placeholder if it has been modified - if leftPlaceholder && g:snipPos[s:curPos][2] != -1 - if exists('startPlaceholder') - let g:snipPos[s:curPos][1] = startPlaceholder - else - let g:snipPos[s:curPos][1] = col('.') - let g:snipPos[s:curPos][2] = 0 - endif - endif - - let s:curPos += a:backwards ? -1 : 1 - " Loop over the snippet when going backwards from the beginning - if s:curPos < 0 | let s:curPos = s:snipLen - 1 | endif - - if s:curPos == s:snipLen - let sMode = s:endCol == g:snipPos[s:curPos-1][1]+g:snipPos[s:curPos-1][2] - call s:RemoveSnippet() - return sMode ? "\" : TriggerSnippet() - endif - - call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) - - let s:endLine = g:snipPos[s:curPos][0] - let s:endCol = g:snipPos[s:curPos][1] - let s:prevLen = [line('$'), col('$')] - - return g:snipPos[s:curPos][2] == -1 ? '' : s:SelectWord() -endf - -fun s:UpdatePlaceholderTabStops() - let changeLen = s:origWordLen - g:snipPos[s:curPos][2] - unl s:startCol s:origWordLen s:update - if !exists('s:oldVars') | return | endif - " Update tab stops in snippet if text has been added via "$#" - " (e.g., in "${1:foo}bar$1${2}"). - if changeLen != 0 - let curLine = line('.') - - for pos in g:snipPos - if pos == g:snipPos[s:curPos] | continue | endif - let changed = pos[0] == curLine && pos[1] > s:oldEndCol - let changedVars = 0 - let endPlaceholder = pos[2] - 1 + pos[1] - " Subtract changeLen from each tab stop that was after any of - " the current tab stop's placeholders. - for [lnum, col] in s:oldVars - if lnum > pos[0] | break | endif - if pos[0] == lnum - if pos[1] > col || (pos[2] == -1 && pos[1] == col) - let changed += 1 - elseif col < endPlaceholder - let changedVars += 1 - endif - endif - endfor - let pos[1] -= changeLen * changed - let pos[2] -= changeLen * changedVars " Parse variables within placeholders - " e.g., "${1:foo} ${2:$1bar}" - - if pos[2] == -1 | continue | endif - " Do the same to any placeholders in the other tab stops. - for nPos in pos[3] - let changed = nPos[0] == curLine && nPos[1] > s:oldEndCol - for [lnum, col] in s:oldVars - if lnum > nPos[0] | break | endif - if nPos[0] == lnum && nPos[1] > col - let changed += 1 - endif - endfor - let nPos[1] -= changeLen * changed - endfor - endfor - endif - unl s:endCol s:oldVars s:oldEndCol -endf - -fun s:UpdateTabStops() - let changeLine = s:endLine - g:snipPos[s:curPos][0] - let changeCol = s:endCol - g:snipPos[s:curPos][1] - if exists('s:origWordLen') - let changeCol -= s:origWordLen - unl s:origWordLen - endif - let lnum = g:snipPos[s:curPos][0] - let col = g:snipPos[s:curPos][1] - " Update the line number of all proceeding tab stops if has - " been inserted. - if changeLine != 0 - let changeLine -= 1 - for pos in g:snipPos - if pos[0] >= lnum - if pos[0] == lnum | let pos[1] += changeCol | endif - let pos[0] += changeLine - endif - if pos[2] == -1 | continue | endif - for nPos in pos[3] - if nPos[0] >= lnum - if nPos[0] == lnum | let nPos[1] += changeCol | endif - let nPos[0] += changeLine - endif - endfor - endfor - elseif changeCol != 0 - " Update the column of all proceeding tab stops if text has - " been inserted/deleted in the current line. - for pos in g:snipPos - if pos[1] >= col && pos[0] == lnum - let pos[1] += changeCol - endif - if pos[2] == -1 | continue | endif - for nPos in pos[3] - if nPos[0] > lnum | break | endif - if nPos[0] == lnum && nPos[1] >= col - let nPos[1] += changeCol - endif - endfor - endfor - endif -endf - -fun s:SelectWord() - let s:origWordLen = g:snipPos[s:curPos][2] - let s:oldWord = strpart(getline('.'), g:snipPos[s:curPos][1] - 1, - \ s:origWordLen) - let s:prevLen[1] -= s:origWordLen - if !empty(g:snipPos[s:curPos][3]) - let s:update = 1 - let s:endCol = -1 - let s:startCol = g:snipPos[s:curPos][1] - 1 - endif - if !s:origWordLen | return '' | endif - let l = col('.') != 1 ? 'l' : '' - if &sel == 'exclusive' - return "\".l.'v'.s:origWordLen."l\" - endif - return s:origWordLen == 1 ? "\".l.'gh' - \ : "\".l.'v'.(s:origWordLen - 1)."l\" -endf - -" This updates the snippet as you type when text needs to be inserted -" into multiple places (e.g. in "${1:default text}foo$1bar$1", -" "default text" would be highlighted, and if the user types something, -" UpdateChangedSnip() would be called so that the text after "foo" & "bar" -" are updated accordingly) -" -" It also automatically quits the snippet if the cursor is moved out of it -" while in insert mode. -fun s:UpdateChangedSnip(entering) - if exists('g:snipPos') && bufnr(0) != s:lastBuf - call s:RemoveSnippet() - elseif exists('s:update') " If modifying a placeholder - if !exists('s:oldVars') && s:curPos + 1 < s:snipLen - " Save the old snippet & word length before it's updated - " s:startCol must be saved too, in case text is added - " before the snippet (e.g. in "foo$1${2}bar${1:foo}"). - let s:oldEndCol = s:startCol - let s:oldVars = deepcopy(g:snipPos[s:curPos][3]) - endif - let col = col('.') - 1 - - if s:endCol != -1 - let changeLen = col('$') - s:prevLen[1] - let s:endCol += changeLen - else " When being updated the first time, after leaving select mode - if a:entering | return | endif - let s:endCol = col - 1 - endif - - " If the cursor moves outside the snippet, quit it - if line('.') != g:snipPos[s:curPos][0] || col < s:startCol || - \ col - 1 > s:endCol - unl! s:startCol s:origWordLen s:oldVars s:update - return s:RemoveSnippet() - endif - - call s:UpdateVars() - let s:prevLen[1] = col('$') - elseif exists('g:snipPos') - if !a:entering && g:snipPos[s:curPos][2] != -1 - let g:snipPos[s:curPos][2] = -2 - endif - - let col = col('.') - let lnum = line('.') - let changeLine = line('$') - s:prevLen[0] - - if lnum == s:endLine - let s:endCol += col('$') - s:prevLen[1] - let s:prevLen = [line('$'), col('$')] - endif - if changeLine != 0 - let s:endLine += changeLine - let s:endCol = col - endif - - " Delete snippet if cursor moves out of it in insert mode - if (lnum == s:endLine && (col > s:endCol || col < g:snipPos[s:curPos][1])) - \ || lnum > s:endLine || lnum < g:snipPos[s:curPos][0] - call s:RemoveSnippet() - endif - endif -endf - -" This updates the variables in a snippet when a placeholder has been edited. -" (e.g., each "$1" in "${1:foo} $1bar $1bar") -fun s:UpdateVars() - let newWordLen = s:endCol - s:startCol + 1 - let newWord = strpart(getline('.'), s:startCol, newWordLen) - if newWord == s:oldWord || empty(g:snipPos[s:curPos][3]) - return - endif - - let changeLen = g:snipPos[s:curPos][2] - newWordLen - let curLine = line('.') - let startCol = col('.') - let oldStartSnip = s:startCol - let updateTabStops = changeLen != 0 - let i = 0 - - for [lnum, col] in g:snipPos[s:curPos][3] - if updateTabStops - let start = s:startCol - if lnum == curLine && col <= start - let s:startCol -= changeLen - let s:endCol -= changeLen - endif - for nPos in g:snipPos[s:curPos][3][(i):] - " This list is in ascending order, so quit if we've gone too far. - if nPos[0] > lnum | break | endif - if nPos[0] == lnum && nPos[1] > col - let nPos[1] -= changeLen - endif - endfor - if lnum == curLine && col > start - let col -= changeLen - let g:snipPos[s:curPos][3][i][1] = col - endif - let i += 1 - endif - - " "Very nomagic" is used here to allow special characters. - call setline(lnum, substitute(getline(lnum), '\%'.col.'c\V'. - \ escape(s:oldWord, '\'), escape(newWord, '\&'), '')) - endfor - if oldStartSnip != s:startCol - call cursor(0, startCol + s:startCol - oldStartSnip) - endif - - let s:oldWord = newWord - let g:snipPos[s:curPos][2] = newWordLen -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/bundle/snipMate/doc/snipMate.txt b/bundle/snipMate/doc/snipMate.txt deleted file mode 100644 index 704d44a6..00000000 --- a/bundle/snipMate/doc/snipMate.txt +++ /dev/null @@ -1,286 +0,0 @@ -*snipMate.txt* Plugin for using TextMate-style snippets in Vim. - -snipMate *snippet* *snippets* *snipMate* -Last Change: July 13, 2009 - -|snipMate-description| Description -|snipMate-syntax| Snippet syntax -|snipMate-usage| Usage -|snipMate-settings| Settings -|snipMate-features| Features -|snipMate-disadvantages| Disadvantages to TextMate -|snipMate-contact| Contact - -For Vim version 7.0 or later. -This plugin only works if 'compatible' is not set. -{Vi does not have any of these features.} - -============================================================================== -DESCRIPTION *snipMate-description* - -snipMate.vim implements some of TextMate's snippets features in Vim. A -snippet is a piece of often-typed text that you can insert into your -document using a trigger word followed by a . - -For instance, in a C file using the default installation of snipMate.vim, if -you type "for" in insert mode, it will expand a typical for loop in C: > - - for (i = 0; i < count; i++) { - - } - - -To go to the next item in the loop, simply over to it; if there is -repeated code, such as the "i" variable in this example, you can simply -start typing once it's highlighted and all the matches specified in the -snippet will be updated. To go in reverse, use . - -============================================================================== -SYNTAX *snippet-syntax* - -Snippets can be defined in two ways. They can be in their own file, named -after their trigger in 'snippets//.snippet', or they can be -defined together in a 'snippets/.snippets' file. Note that dotted -'filetype' syntax is supported -- e.g., you can use > - - :set ft=html.eruby - -to activate snippets for both HTML and eRuby for the current file. - -The syntax for snippets in *.snippets files is the following: > - - snippet trigger - expanded text - more expanded text - -Note that the first hard tab after the snippet trigger is required, and not -expanded in the actual snippet. The syntax for *.snippet files is the same, -only without the trigger declaration and starting indentation. - -Also note that snippets must be defined using hard tabs. They can be expanded -to spaces later if desired (see |snipMate-indenting|). - -"#" is used as a line-comment character in *.snippets files; however, they can -only be used outside of a snippet declaration. E.g.: > - - # this is a correct comment - snippet trigger - expanded text - snippet another_trigger - # this isn't a comment! - expanded text -< -This should hopefully be obvious with the included syntax highlighting. - - *snipMate-${#}* -Tab stops ~ - -By default, the cursor is placed at the end of a snippet. To specify where the -cursor is to be placed next, use "${#}", where the # is the number of the tab -stop. E.g., to place the cursor first on the id of a
tag, and then allow -the user to press to go to the middle of it: - > - snippet div -
- ${2} -
-< - *snipMate-placeholders* *snipMate-${#:}* *snipMate-$#* -Placeholders ~ - -Placeholder text can be supplied using "${#:text}", where # is the number of -the tab stop. This text then can be copied throughout the snippet using "$#", -given # is the same number as used before. So, to make a C for loop: > - - snippet for - for (${2:i}; $2 < ${1:count}; $1++) { - ${4} - } - -This will cause "count" to first be selected and change if the user starts -typing. When is pressed, the "i" in ${2}'s position will be selected; -all $2 variables will default to "i" and automatically be updated if the user -starts typing. -NOTE: "$#" syntax is used only for variables, not for tab stops as in TextMate. - -Variables within variables are also possible. For instance: > - - snippet opt - - -Will, as usual, cause "option" to first be selected and update all the $1 -variables if the user starts typing. Since one of these variables is inside of -${2}, this text will then be used as a placeholder for the next tab stop, -allowing the user to change it if he wishes. - -To copy a value throughout a snippet without supplying default text, simply -use the "${#:}" construct without the text; e.g.: > - - snippet foo - ${1:}bar$1 -< *snipMate-commands* -Interpolated Vim Script ~ - -Snippets can also contain Vim script commands that are executed (via |eval()|) -when the snippet is inserted. Commands are given inside backticks (`...`); for -TextMates's functionality, use the |system()| function. E.g.: > - - snippet date - `system("date +%Y-%m-%d")` - -will insert the current date, assuming you are on a Unix system. Note that you -can also (and should) use |strftime()| for this example. - -Filename([{expr}] [, {defaultText}]) *snipMate-filename* *Filename()* - -Since the current filename is used often in snippets, a default function -has been defined for it in snipMate.vim, appropriately called Filename(). - -With no arguments, the default filename without an extension is returned; -the first argument specifies what to place before or after the filename, -and the second argument supplies the default text to be used if the file -has not been named. "$1" in the first argument is replaced with the filename; -if you only want the filename to be returned, the first argument can be left -blank. Examples: > - - snippet filename - `Filename()` - snippet filename_with_default - `Filename('', 'name')` - snippet filename_foo - `filename('$1_foo')` - -The first example returns the filename if it the file has been named, and an -empty string if it hasn't. The second returns the filename if it's been named, -and "name" if it hasn't. The third returns the filename followed by "_foo" if -it has been named, and an empty string if it hasn't. - - *multi_snip* -To specify that a snippet can have multiple matches in a *.snippets file, use -this syntax: > - - snippet trigger A description of snippet #1 - expand this text - snippet trigger A description of snippet #2 - expand THIS text! - -In this example, when "trigger" is typed, a numbered menu containing all -of the descriptions of the "trigger" will be shown; when the user presses the -corresponding number, that snippet will then be expanded. - -To create a snippet with multiple matches using *.snippet files, -simply place all the snippets in a subdirectory with the trigger name: -'snippets///.snippet'. - -============================================================================== -USAGE *snipMate-usage* - - *'snippets'* *g:snippets_dir* -Snippets are by default looked for any 'snippets' directory in your -'runtimepath'. Typically, it is located at '~/.vim/snippets/' on *nix or -'$HOME\vimfiles\snippets\' on Windows. To change that location or add another -one, change the g:snippets_dir variable in your |.vimrc| to your preferred -directory, or use the |ExtractSnips()|function. This will be used by the -|globpath()| function, and so accepts the same syntax as it (e.g., -comma-separated paths). - -ExtractSnipsFile({directory}, {filetype}) *ExtractSnipsFile()* *.snippets* - -ExtractSnipsFile() extracts the specified *.snippets file for the given -filetype. A .snippets file contains multiple snippet declarations for the -filetype. It is further explained above, in |snippet-syntax|. - -ExtractSnips({directory}, {filetype}) *ExtractSnips()* *.snippet* - -ExtractSnips() extracts *.snippet files from the specified directory and -defines them as snippets for the given filetype. The directory tree should -look like this: 'snippets//.snippet'. If the snippet has -multiple matches, it should look like this: -'snippets///.snippet' (see |multi_snip|). - - *ResetSnippets()* -The ResetSnippets() function removes all snippets from memory. This is useful -to put at the top of a snippet setup file for if you would like to |:source| -it multiple times. - - *list-snippets* *i_CTRL-R_* -If you would like to see what snippets are available, simply type -in the current buffer to show a list via |popupmenu-completion|. - -============================================================================== -SETTINGS *snipMate-settings* *g:snips_author* - -The g:snips_author string (similar to $TM_FULLNAME in TextMate) should be set -to your name; it can then be used in snippets to automatically add it. E.g.: > - - let g:snips_author = 'Hubert Farnsworth' - snippet name - `g:snips_author` -< - *snipMate-expandtab* *snipMate-indenting* -If you would like your snippets to be expanded using spaces instead of tabs, -just enable 'expandtab' and set 'softtabstop' to your preferred amount of -spaces. If 'softtabstop' is not set, 'shiftwidth' is used instead. - - *snipMate-remap* -snipMate does not come with a setting to customize the trigger key, but you -can remap it easily in the two lines it's defined in the 'after' directory -under 'plugin/snipMate.vim'. For instance, to change the trigger key -to CTRL-J, just change this: > - - ino =TriggerSnippet() - snor i=TriggerSnippet() - -to this: > - ino =TriggerSnippet() - snor i=TriggerSnippet() - -============================================================================== -FEATURES *snipMate-features* - -snipMate.vim has the following features among others: - - The syntax of snippets is very similar to TextMate's, allowing - easy conversion. - - The position of the snippet is kept transparently (i.e. it does not use - markers/placeholders written to the buffer), which allows you to escape - out of an incomplete snippet, something particularly useful in Vim. - - Variables in snippets are updated as-you-type. - - Snippets can have multiple matches. - - Snippets can be out of order. For instance, in a do...while loop, the - condition can be added before the code. - - [New] File-based snippets are supported. - - [New] Triggers after non-word delimiters are expanded, e.g. "foo" - in "bar.foo". - - [New] can now be used to jump tab stops in reverse order. - -============================================================================== -DISADVANTAGES *snipMate-disadvantages* - -snipMate.vim currently has the following disadvantages to TextMate's snippets: - - There is no $0; the order of tab stops must be explicitly stated. - - Placeholders within placeholders are not possible. E.g.: > - - '${3}
' -< - In TextMate this would first highlight ' id="some_id"', and if - you hit delete it would automatically skip ${2} and go to ${3} - on the next , but if you didn't delete it it would highlight - "some_id" first. You cannot do this in snipMate.vim. - - Regex cannot be performed on variables, such as "${1/.*/\U&}" - - Placeholders cannot span multiple lines. - - Activating snippets in different scopes of the same file is - not possible. - -Perhaps some of these features will be added in a later release. - -============================================================================== -CONTACT *snipMate-contact* *snipMate-author* - -To contact the author (Michael Sanders), please email: - msanders42+snipmate gmail com - -I greatly appreciate any suggestions or improvements offered for the script. - -============================================================================== - -vim:tw=78:ts=8:ft=help:norl: diff --git a/bundle/snipMate/doc/tags b/bundle/snipMate/doc/tags deleted file mode 100644 index b21f751b..00000000 --- a/bundle/snipMate/doc/tags +++ /dev/null @@ -1,33 +0,0 @@ -'snippets' snipMate.txt /*'snippets'* -.snippet snipMate.txt /*.snippet* -.snippets snipMate.txt /*.snippets* -ExtractSnips() snipMate.txt /*ExtractSnips()* -ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()* -Filename() snipMate.txt /*Filename()* -ResetSnippets() snipMate.txt /*ResetSnippets()* -g:snippets_dir snipMate.txt /*g:snippets_dir* -g:snips_author snipMate.txt /*g:snips_author* -i_CTRL-R_ snipMate.txt /*i_CTRL-R_* -list-snippets snipMate.txt /*list-snippets* -multi_snip snipMate.txt /*multi_snip* -snipMate snipMate.txt /*snipMate* -snipMate-$# snipMate.txt /*snipMate-$#* -snipMate-${#:} snipMate.txt /*snipMate-${#:}* -snipMate-${#} snipMate.txt /*snipMate-${#}* -snipMate-author snipMate.txt /*snipMate-author* -snipMate-commands snipMate.txt /*snipMate-commands* -snipMate-contact snipMate.txt /*snipMate-contact* -snipMate-description snipMate.txt /*snipMate-description* -snipMate-disadvantages snipMate.txt /*snipMate-disadvantages* -snipMate-expandtab snipMate.txt /*snipMate-expandtab* -snipMate-features snipMate.txt /*snipMate-features* -snipMate-filename snipMate.txt /*snipMate-filename* -snipMate-indenting snipMate.txt /*snipMate-indenting* -snipMate-placeholders snipMate.txt /*snipMate-placeholders* -snipMate-remap snipMate.txt /*snipMate-remap* -snipMate-settings snipMate.txt /*snipMate-settings* -snipMate-usage snipMate.txt /*snipMate-usage* -snipMate.txt snipMate.txt /*snipMate.txt* -snippet snipMate.txt /*snippet* -snippet-syntax snipMate.txt /*snippet-syntax* -snippets snipMate.txt /*snippets* diff --git a/bundle/snipMate/ftplugin/html_snip_helper.vim b/bundle/snipMate/ftplugin/html_snip_helper.vim deleted file mode 100644 index 2e545707..00000000 --- a/bundle/snipMate/ftplugin/html_snip_helper.vim +++ /dev/null @@ -1,10 +0,0 @@ -" Helper function for (x)html snippets -if exists('s:did_snip_helper') || &cp || !exists('loaded_snips') - finish -endif -let s:did_snip_helper = 1 - -" Automatically closes tag if in xhtml -fun! Close() - return stridx(&ft, 'xhtml') == -1 ? '' : ' /' -endf diff --git a/bundle/snipMate/plugin/snipMate.vim b/bundle/snipMate/plugin/snipMate.vim deleted file mode 100644 index 3efee2a4..00000000 --- a/bundle/snipMate/plugin/snipMate.vim +++ /dev/null @@ -1,247 +0,0 @@ -" File: snipMate.vim -" Author: Michael Sanders -" Last Updated: July 13, 2009 -" Version: 0.83 -" Description: snipMate.vim implements some of TextMate's snippets features in -" Vim. A snippet is a piece of often-typed text that you can -" insert into your document using a trigger word followed by a "". -" -" For more help see snipMate.txt; you can do this by using: -" :helptags ~/.vim/doc -" :h snipMate.txt - -if exists('loaded_snips') || &cp || version < 700 - finish -endif -let loaded_snips = 1 -if !exists('snips_author') | let snips_author = 'Me' | endif - -au BufRead,BufNewFile *.snippets\= set ft=snippet -au FileType snippet setl noet fdm=indent - -let s:snippets = {} | let s:multi_snips = {} - -if !exists('snippets_dir') - let snippets_dir = substitute(globpath(&rtp, 'snippets/'), "\n", ',', 'g') -endif - -fun! MakeSnip(scope, trigger, content, ...) - let multisnip = a:0 && a:1 != '' - let var = multisnip ? 's:multi_snips' : 's:snippets' - if !has_key({var}, a:scope) | let {var}[a:scope] = {} | endif - if !has_key({var}[a:scope], a:trigger) - let {var}[a:scope][a:trigger] = multisnip ? [[a:1, a:content]] : a:content - elseif multisnip | let {var}[a:scope][a:trigger] += [[a:1, a:content]] - else - echom 'Warning in snipMate.vim: Snippet '.a:trigger.' is already defined.' - \ .' See :h multi_snip for help on snippets with multiple matches.' - endif -endf - -fun! ExtractSnips(dir, ft) - for path in split(globpath(a:dir, '*'), "\n") - if isdirectory(path) - let pathname = fnamemodify(path, ':t') - for snipFile in split(globpath(path, '*.snippet'), "\n") - call s:ProcessFile(snipFile, a:ft, pathname) - endfor - elseif fnamemodify(path, ':e') == 'snippet' - call s:ProcessFile(path, a:ft) - endif - endfor -endf - -" Processes a single-snippet file; optionally add the name of the parent -" directory for a snippet with multiple matches. -fun s:ProcessFile(file, ft, ...) - let keyword = fnamemodify(a:file, ':t:r') - if keyword == '' | return | endif - try - let text = join(readfile(a:file), "\n") - catch /E484/ - echom "Error in snipMate.vim: couldn't read file: ".a:file - endtry - return a:0 ? MakeSnip(a:ft, a:1, text, keyword) - \ : MakeSnip(a:ft, keyword, text) -endf - -fun! ExtractSnipsFile(file, ft) - if !filereadable(a:file) | return | endif - let text = readfile(a:file) - let inSnip = 0 - for line in text + ["\n"] - if inSnip && (line[0] == "\t" || line == '') - let content .= strpart(line, 1)."\n" - continue - elseif inSnip - call MakeSnip(a:ft, trigger, content[:-2], name) - let inSnip = 0 - endif - - if line[:6] == 'snippet' - let inSnip = 1 - let trigger = strpart(line, 8) - let name = '' - let space = stridx(trigger, ' ') + 1 - if space " Process multi snip - let name = strpart(trigger, space) - let trigger = strpart(trigger, 0, space - 1) - endif - let content = '' - endif - endfor -endf - -fun! ResetSnippets() - let s:snippets = {} | let s:multi_snips = {} | let g:did_ft = {} -endf - -let g:did_ft = {} -fun! GetSnippets(dir, filetypes) - for ft in split(a:filetypes, '\.') - if has_key(g:did_ft, ft) | continue | endif - call s:DefineSnips(a:dir, ft, ft) - if ft == 'objc' || ft == 'cpp' || ft == 'cs' - call s:DefineSnips(a:dir, 'c', ft) - elseif ft == 'xhtml' - call s:DefineSnips(a:dir, 'html', 'xhtml') - endif - let g:did_ft[ft] = 1 - endfor -endf - -" Define "aliasft" snippets for the filetype "realft". -fun s:DefineSnips(dir, aliasft, realft) - for path in split(globpath(a:dir, a:aliasft.'/')."\n". - \ globpath(a:dir, a:aliasft.'-*/'), "\n") - call ExtractSnips(path, a:realft) - endfor - for path in split(globpath(a:dir, a:aliasft.'.snippets')."\n". - \ globpath(a:dir, a:aliasft.'-*.snippets'), "\n") - call ExtractSnipsFile(path, a:realft) - endfor -endf - -fun! TriggerSnippet() - if exists('g:SuperTabMappingForward') - if g:SuperTabMappingForward == "" - let SuperTabKey = "\" - elseif g:SuperTabMappingBackward == "" - let SuperTabKey = "\" - endif - endif - - if pumvisible() " Update snippet if completion is used, or deal with supertab - if exists('SuperTabKey') - call feedkeys(SuperTabKey) | return '' - endif - call feedkeys("\a", 'n') " Close completion menu - call feedkeys("\") | return '' - endif - - if exists('g:snipPos') | return snipMate#jumpTabStop(0) | endif - - let word = matchstr(getline('.'), '\S\+\%'.col('.').'c') - for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] - let [trigger, snippet] = s:GetSnippet(word, scope) - " If word is a trigger for a snippet, delete the trigger & expand - " the snippet. - if snippet != '' - let col = col('.') - len(trigger) - sil exe 's/\V'.escape(trigger, '/.').'\%#//' - return snipMate#expandSnip(snippet, col) - endif - endfor - - if exists('SuperTabKey') - call feedkeys(SuperTabKey) - return '' - endif - return "\" -endf - -fun! BackwardsSnippet() - if exists('g:snipPos') | return snipMate#jumpTabStop(1) | endif - - if exists('g:SuperTabMappingForward') - if g:SuperTabMappingBackward == "" - let SuperTabKey = "\" - elseif g:SuperTabMappingForward == "" - let SuperTabKey = "\" - endif - endif - if exists('SuperTabKey') - call feedkeys(SuperTabKey) - return '' - endif - return "\" -endf - -" Check if word under cursor is snippet trigger; if it isn't, try checking if -" the text after non-word characters is (e.g. check for "foo" in "bar.foo") -fun s:GetSnippet(word, scope) - let word = a:word | let snippet = '' - while snippet == '' - if exists('s:snippets["'.a:scope.'"]["'.escape(word, '\"').'"]') - let snippet = s:snippets[a:scope][word] - elseif exists('s:multi_snips["'.a:scope.'"]["'.escape(word, '\"').'"]') - let snippet = s:ChooseSnippet(a:scope, word) - if snippet == '' | break | endif - else - if match(word, '\W') == -1 | break | endif - let word = substitute(word, '.\{-}\W', '', '') - endif - endw - if word == '' && a:word != '.' && stridx(a:word, '.') != -1 - let [word, snippet] = s:GetSnippet('.', a:scope) - endif - return [word, snippet] -endf - -fun s:ChooseSnippet(scope, trigger) - let snippet = [] - let i = 1 - for snip in s:multi_snips[a:scope][a:trigger] - let snippet += [i.'. '.snip[0]] - let i += 1 - endfor - if i == 2 | return s:multi_snips[a:scope][a:trigger][0][1] | endif - let num = inputlist(snippet) - 1 - return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1] -endf - -fun! ShowAvailableSnips() - let line = getline('.') - let col = col('.') - let word = matchstr(getline('.'), '\S\+\%'.col.'c') - let words = [word] - if stridx(word, '.') - let words += split(word, '\.', 1) - endif - let matchlen = 0 - let matches = [] - for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] - let triggers = has_key(s:snippets, scope) ? keys(s:snippets[scope]) : [] - if has_key(s:multi_snips, scope) - let triggers += keys(s:multi_snips[scope]) - endif - for trigger in triggers - for word in words - if word == '' - let matches += [trigger] " Show all matches if word is empty - elseif trigger =~ '^'.word - let matches += [trigger] - let len = len(word) - if len > matchlen | let matchlen = len | endif - endif - endfor - endfor - endfor - - " This is to avoid a bug with Vim when using complete(col - matchlen, matches) - " (Issue#46 on the Google Code snipMate issue tracker). - call setline(line('.'), substitute(line, repeat('.', matchlen).'\%'.col.'c', '', '')) - call complete(col, matches) - return '' -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/bundle/snipMate/snippets/_.snippets b/bundle/snipMate/snippets/_.snippets deleted file mode 100644 index c3925a59..00000000 --- a/bundle/snipMate/snippets/_.snippets +++ /dev/null @@ -1,7 +0,0 @@ -# Global snippets - -# (c) holds no legal value ;) -snippet c) - `&enc[:2] == "utf" ? "©" : "(c)"` Copyright `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} -snippet date - `strftime("%Y-%m-%d")` diff --git a/bundle/snipMate/snippets/autoit.snippets b/bundle/snipMate/snippets/autoit.snippets deleted file mode 100644 index 690018ce..00000000 --- a/bundle/snipMate/snippets/autoit.snippets +++ /dev/null @@ -1,66 +0,0 @@ -snippet if - If ${1:condition} Then - ${2:; True code} - EndIf -snippet el - Else - ${1} -snippet elif - ElseIf ${1:condition} Then - ${2:; True code} -# If/Else block -snippet ifel - If ${1:condition} Then - ${2:; True code} - Else - ${3:; Else code} - EndIf -# If/ElseIf/Else block -snippet ifelif - If ${1:condition 1} Then - ${2:; True code} - ElseIf ${3:condition 2} Then - ${4:; True code} - Else - ${5:; Else code} - EndIf -# Switch block -snippet switch - Switch (${1:condition}) - Case {$2:case1}: - {$3:; Case 1 code} - Case Else: - {$4:; Else code} - EndSwitch -# Select block -snippet select - Select (${1:condition}) - Case {$2:case1}: - {$3:; Case 1 code} - Case Else: - {$4:; Else code} - EndSelect -# While loop -snippet while - While (${1:condition}) - ${2:; code...} - WEnd -# For loop -snippet for - For ${1:n} = ${3:1} to ${2:count} - ${4:; code...} - Next -# New Function -snippet func - Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - ${4:Return} - EndFunc -# Message box -snippet msg - MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) -# Debug Message -snippet debug - MsgBox(0, "Debug", ${1:"Debug Message"}) -# Show Variable Debug Message -snippet showvar - MsgBox(0, "${1:VarName}", $1) diff --git a/bundle/snipMate/snippets/c.snippets b/bundle/snipMate/snippets/c.snippets deleted file mode 100644 index 89b81ba6..00000000 --- a/bundle/snipMate/snippets/c.snippets +++ /dev/null @@ -1,110 +0,0 @@ -# main() -snippet main - int main(int argc, const char *argv[]) - { - ${1} - return 0; - } -# #include <...> -snippet inc - #include <${1:stdio}.h>${2} -# #include "..." -snippet Inc - #include "${1:`Filename("$1.h")`}"${2} -# #ifndef ... #define ... #endif -snippet Def - #ifndef $1 - #define ${1:SYMBOL} ${2:value} - #endif${3} -snippet def - #define -snippet ifdef - #ifdef ${1:FOO} - ${2:#define } - #endif -snippet #if - #if ${1:FOO} - ${2} - #endif -# Header Include-Guard -# (the randomizer code is taken directly from TextMate; it could probably be -# cleaner, I don't know how to do it in vim script) -snippet once - #ifndef ${1:`toupper(Filename('', 'UNTITLED').'_'.system("/usr/bin/ruby -e 'print (rand * 2821109907455).round.to_s(36)'"))`} - - #define $1 - - ${2} - - #endif /* end of include guard: $1 */ -# If Condition -snippet if - if (${1:/* condition */}) { - ${2:/* code */} - } -snippet el - else { - ${1} - } -# Tertiary conditional -snippet t - ${1:/* condition */} ? ${2:a} : ${3:b} -# Do While Loop -snippet do - do { - ${2:/* code */} - } while (${1:/* condition */}); -# While Loop -snippet wh - while (${1:/* condition */}) { - ${2:/* code */} - } -# For Loop -snippet for - for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { - ${4:/* code */} - } -# Custom For Loop -snippet forr - for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { - ${5:/* code */} - } -# Function -snippet fun - ${1:void} ${2:function_name}(${3}) - { - ${4:/* code */} - } -# Function Declaration -snippet fund - ${1:void} ${2:function_name}(${3});${4} -# Typedef -snippet td - typedef ${1:int} ${2:MyCustomType};${3} -# Struct -snippet st - struct ${1:`Filename('$1_t', 'name')`} { - ${2:/* data */} - }${3: /* optional variable list */};${4} -# Typedef struct -snippet tds - typedef struct ${2:_$1 }{ - ${3:/* data */} - } ${1:`Filename('$1_t', 'name')`}; -# Typdef enum -snippet tde - typedef enum { - ${1:/* data */} - } ${2:foo}; -# printf -# unfortunately version this isn't as nice as TextMates's, given the lack of a -# dynamic `...` -snippet pr - printf("${1:%s}\n"${2});${3} -# fprintf (again, this isn't as nice as TextMate's version, but it works) -snippet fpr - fprintf(${1:stderr}, "${2:%s}\n"${3});${4} -snippet . - [${1}]${2} -snippet un - unsigned diff --git a/bundle/snipMate/snippets/cpp.snippets b/bundle/snipMate/snippets/cpp.snippets deleted file mode 100644 index e4850cd2..00000000 --- a/bundle/snipMate/snippets/cpp.snippets +++ /dev/null @@ -1,30 +0,0 @@ -# Read File Into Vector -snippet readfile - std::vector v; - if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { - char buf[1024]; - while (size_t len = fread(buf, 1, sizeof(buf), $2)) - v.insert(v.end(), buf, buf + len); - fclose($2); - }${3} -# std::map -snippet map - std::map<${1:key}, ${2:value}> map${3}; -# std::vector -snippet vector - std::vector<${1:char}> v${2}; -# Namespace -snippet ns - namespace ${1:`Filename('', 'my')`} { - ${2} - } /* $1 */ -# Class -snippet cl - class ${1:`Filename('$1_t', 'name')`} { - public: - $1 (${2:arguments}); - virtual ~$1 (); - - private: - ${3:/* data */} - }; diff --git a/bundle/snipMate/snippets/html.snippets b/bundle/snipMate/snippets/html.snippets deleted file mode 100644 index aefb9db1..00000000 --- a/bundle/snipMate/snippets/html.snippets +++ /dev/null @@ -1,190 +0,0 @@ -# Some useful Unicode entities -# Non-Breaking Space -snippet nbs -   -# ← -snippet left - ← -# → -snippet right - → -# ↑ -snippet up - ↑ -# ↓ -snippet down - ↓ -# ↩ -snippet return - ↩ -# ⇤ -snippet backtab - ⇤ -# ⇥ -snippet tab - ⇥ -# ⇧ -snippet shift - ⇧ -# ⌃ -snippet control - ⌃ -# ⌅ -snippet enter - ⌅ -# ⌘ -snippet command - ⌘ -# ⌥ -snippet option - ⌥ -# ⌦ -snippet delete - ⌦ -# ⌫ -snippet backspace - ⌫ -# ⎋ -snippet escape - ⎋ -# Generic Doctype -snippet doctype HTML 4.01 Strict - -snippet doctype HTML 4.01 Transitional - -snippet doctype HTML 5 - -snippet doctype XHTML 1.0 Frameset - -snippet doctype XHTML 1.0 Strict - -snippet doctype XHTML 1.0 Transitional - -snippet doctype XHTML 1.1 - -# HTML Doctype 4.01 Strict -snippet docts - -# HTML Doctype 4.01 Transitional -snippet doct - -# HTML Doctype 5 -snippet doct5 - -# XHTML Doctype 1.0 Frameset -snippet docxf - -# XHTML Doctype 1.0 Strict -snippet docxs - -# XHTML Doctype 1.0 Transitional -snippet docxt - -# XHTML Doctype 1.1 -snippet docx - -snippet html - - ${1} - -snippet xhtml - - ${1} - -snippet body - - ${1} - -snippet head - - - - ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} - ${2} - -snippet title - ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}${2} -snippet script - ${2} -snippet scriptsrc - ${2} -snippet style - ${3} -snippet base - -snippet r - -snippet div -
- ${2} -
-# Embed QT Movie -snippet movie - - - - - - ${6} -snippet fieldset -
- ${1:name} - - ${3} -
-snippet form -
- ${3} - - -

-
-snippet h1 -

${2:$1}

-snippet input - ${4} -snippet label - ${7} -snippet link - ${4} -snippet mailto - ${3:email me} -snippet meta - ${3} -snippet opt - ${3} -snippet optt - ${2} -snippet select - ${5} -snippet table - - - -
${2:Header}
${3:Data}
${4} -snippet textarea - ${5} diff --git a/bundle/snipMate/snippets/java.snippets b/bundle/snipMate/snippets/java.snippets deleted file mode 100644 index fd705cb5..00000000 --- a/bundle/snipMate/snippets/java.snippets +++ /dev/null @@ -1,78 +0,0 @@ -snippet main - public static void main (String [] args) - { - ${1:/* code */} - } -snippet pu - public -snippet po - protected -snippet pr - private -snippet st - static -snippet fi - final -snippet ab - abstract -snippet re - return -snippet br - break; -snippet de - default: - ${1} -snippet ca - catch(${1:Exception} ${2:e}) ${3} -snippet th - throw -snippet sy - synchronized -snippet im - import -snippet j.u - java.util -snippet j.i - java.io. -snippet j.b - java.beans. -snippet j.n - java.net. -snippet j.m - java.math. -snippet if - if (${1}) ${2} -snippet el - else -snippet elif - else if (${1}) ${2} -snippet wh - while (${1}) ${2} -snippet for - for (${1}; ${2}; ${3}) ${4} -snippet fore - for (${1} : ${2}) ${3} -snippet sw - switch (${1}) ${2} -snippet cs - case ${1}: - ${2} - ${3} -snippet tc - public class ${1:`Filename()`} extends ${2:TestCase} -snippet t - public void test${1:Name}() throws Exception ${2} -snippet cl - class ${1:`Filename("", "untitled")`} ${2} -snippet in - interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} -snippet m - ${1:void} ${2:method}(${3}) ${4:throws }${5} -snippet v - ${1:String} ${2:var}${3: = null}${4};${5} -snippet co - static public final ${1:String} ${2:var} = ${3};${4} -snippet cos - static public final String ${1:var} = "${2}";${3} -snippet as - assert ${1:test} : "${2:Failure message}";${3} diff --git a/bundle/snipMate/snippets/javascript.snippets b/bundle/snipMate/snippets/javascript.snippets deleted file mode 100644 index 6325e207..00000000 --- a/bundle/snipMate/snippets/javascript.snippets +++ /dev/null @@ -1,74 +0,0 @@ -# Prototype -snippet proto - ${1:class_name}.prototype.${2:method_name} = - function(${3:first_argument}) { - ${4:// body...} - }; -# Function -snippet fun - function ${1:function_name} (${2:argument}) { - ${3:// body...} - } -# Anonymous Function -#snippet f -# function(${1}) {${2}}; -# if -snippet if - if (${1:true}) {${2}}; -# if ... else -snippet ife - if (${1:true}) {${2}} - else{${3}}; -# tertiary conditional -snippet t - ${1:/* condition */} ? ${2:a} : ${3:b} -# switch -snippet switch - switch(${1:expression}) { - case '${3:case}': - ${4:// code} - break; - ${5} - default: - ${2:// code} - } -# case -snippet case - case '${1:case}': - ${2:// code} - break; - ${3} -# for (...) {...} -snippet for - for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) { - ${4:$1[$2]} - }; -# for (...) {...} (Improved Native For-Loop) -snippet forr - for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { - ${4:$1[$2]} - }; -# while (...) {...} -snippet wh - while (${1:/* condition */}) { - ${2:/* code */} - } -# do...while -snippet do - do { - ${2:/* code */} - } while (${1:/* condition */}); -# Object Method -snippet :f - ${1:method_name}: function(${2:attribute}) { - ${4} - }${3:,} -# setTimeout function -snippet timeout - setTimeout(function() {${3}}${2}, ${1:10}; -# Get Elements -snippet get - getElementsBy${1:TagName}('${2}')${3} -# Get Element -snippet gett - getElementBy${1:Id}('${2}')${3} diff --git a/bundle/snipMate/snippets/mako.snippets b/bundle/snipMate/snippets/mako.snippets deleted file mode 100644 index 2a0aef9c..00000000 --- a/bundle/snipMate/snippets/mako.snippets +++ /dev/null @@ -1,54 +0,0 @@ -snippet def - <%def name="${1:name}"> - ${2:} - -snippet call - <%call expr="${1:name}"> - ${2:} - -snippet doc - <%doc> - ${1:} - -snippet text - <%text> - ${1:} - -snippet for - % for ${1:i} in ${2:iter}: - ${3:} - % endfor -snippet if if - % if ${1:condition}: - ${2:} - % endif -snippet if if/else - % if ${1:condition}: - ${2:} - % else: - ${3:} - % endif -snippet try - % try: - ${1:} - % except${2:}: - ${3:pass} - % endtry -snippet wh - % while ${1:}: - ${2:} - % endwhile -snippet $ - ${ ${1:} } -snippet <% - <% ${1:} %> -snippet -snippet inherit - <%inherit file="${1:filename}" /> -snippet include - <%include file="${1:filename}" /> -snippet namespace - <%namespace file="${1:name}" /> -snippet page - <%page args="${1:}" /> diff --git a/bundle/snipMate/snippets/objc.snippets b/bundle/snipMate/snippets/objc.snippets deleted file mode 100644 index 4749bb77..00000000 --- a/bundle/snipMate/snippets/objc.snippets +++ /dev/null @@ -1,184 +0,0 @@ -# #import <...> -snippet Imp - #import <${1:Cocoa/Cocoa.h}>${2} -# #import "..." -snippet imp - #import "${1:`Filename()`.h}"${2} -# @selector(...) -snippet sel - @selector(${1:method}:)${3} -# @"..." string -snippet s - @"${1}"${2} -# Object -snippet o - ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} -# NSLog(...) -snippet log - NSLog(@"${1:%@}"${2});${3} -# Class -snippet objc - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - { - } - @end - - @implementation $1 - ${3} - @end -# Class Interface -snippet int - @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} - {${3} - } - ${4} - @end -# Class Implementation -snippet impl - @implementation ${1:`Filename('', 'someClass')`} - ${2} - @end -snippet init - - (id)init - { - [super init]; - return self; - } -snippet ifself - if (self = [super init]) { - ${1:/* code */} - } - return self; -snippet ibo - IBOutlet ${1:NSSomeClass} *${2:$1};${3} -# Category -snippet cat - @interface ${1:NSObject} (${2:Category}) - @end - - @implementation $1 ($2) - ${3} - @end -# Category Interface -snippet cath - @interface ${1:NSObject} (${2:Category}) - ${3} - @end -# NSArray -snippet array - NSMutableArray *${1:array} = [NSMutable array];${2} -# NSDictionary -snippet dict - NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} -# NSBezierPath -snippet bez - NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2} -# Method -snippet m - - (${1:id})${2:method} - { - ${3} - } -# Method declaration -snippet md - - (${1:id})${2:method};${3} -# IBAction declaration -snippet ibad - - (IBAction)${1:method}:(${2:id})sender;${3} -# IBAction method -snippet iba - - (IBAction)${1:method}:(${2:id})sender - { - ${3} - } -# awakeFromNib method -snippet wake - - (void)awakeFromNib - { - ${1} - } -# Class Method -snippet M - + (${1:id})${2:method} - {${3} - return nil; - } -# Sub-method (Call super) -snippet sm - - (${1:id})${2:method} - { - [super $2];${3} - return self; - } -# Method: Initialize -snippet I - + (void) initialize - { - [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys: - ${1}@"value", @"key", - nil]]; - } -# Accessor Methods For: -# Object -snippet objacc - - (${1:id})${2:thing} - { - return $2; - } - - - (void)set$2:($1)${3:new$2} - { - [$3 retain]; - [$2 release]; - $2 = $3; - }${4} -# for (object in array) -snippet forin - for (${1:Class} *${2:some$1} in ${3:array}) { - ${4} - } -snippet forarray - unsigned int ${1:object}Count = [${2:array} count]; - - for (unsigned int index = 0; index < $1Count; index++) { - ${3:id} $1 = [$2 $1AtIndex:index]; - ${4} - } -# IBOutlet -# @property (Objective-C 2.0) -snippet prop - @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} -# @synthesize (Objective-C 2.0) -snippet syn - @synthesize ${1:property};${2} -# [[ alloc] init] -snippet alloc - [[${1:foo} alloc] init${2}];${3} -# retain -snippet ret - [${1:foo} retain];${2} -# release -snippet rel - [${1:foo} release]; - ${2:$1 = nil;} -# autorelease -snippet arel - [${1:foo} autorelease]; -# autorelease pool -snippet pool - NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; - ${2:/* code */} - [$1 drain]; -# Throw an exception -snippet except - NSException *${1:badness}; - $1 = [NSException exceptionWithName:@"${2:$1Name}" - reason:@"${3}" - userInfo:nil]; - [$1 raise]; -snippet prag - #pragma mark ${1:foo} -snippet cl - @class ${1:Foo};${2} -snippet color - [[NSColor ${1:blackColor}] set]; diff --git a/bundle/snipMate/snippets/perl.snippets b/bundle/snipMate/snippets/perl.snippets deleted file mode 100644 index cf8f9fc8..00000000 --- a/bundle/snipMate/snippets/perl.snippets +++ /dev/null @@ -1,91 +0,0 @@ -# #!/usr/bin/perl -snippet #! - #!/usr/bin/perl - -# Hash Pointer -snippet . - => -# Function -snippet sub - sub ${1:function_name} { - ${2:#body ...} - } -# Conditional -snippet if - if (${1}) { - ${2:# body...} - } -# Conditional if..else -snippet ife - if (${1}) { - ${2:# body...} - } else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if (${1}) { - ${2:# body...} - } elsif (${3}) { - ${4:# elsif...} - } else { - ${5:# else...} - } -# Conditional One-line -snippet xif - ${1:expression} if ${2:condition};${3} -# Unless conditional -snippet unless - unless (${1}) { - ${2:# body...} - } -# Unless conditional One-line -snippet xunless - ${1:expression} unless ${2:condition};${3} -# Try/Except -snippet eval - eval { - ${1:# do something risky...} - }; - if ($@) { - ${2:# handle failure...} - } -# While Loop -snippet wh - while (${1}) { - ${2:# body...} - } -# While Loop One-line -snippet xwh - ${1:expression} while ${2:condition};${3} -# For Loop -snippet for - for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4:# body...} - } -# Foreach Loop -snippet fore - foreach my $${1:x} (@${2:array}) { - ${3:# body...} - } -# Foreach Loop One-line -snippet xfore - ${1:expression} foreach @${2:array};${3} -# Package -snippet cl - package ${1:ClassName}; - - use base qw(${2:ParentClass}); - - sub new { - my $class = shift; - $class = ref $class if ref $class; - my $self = bless {}, $class; - $self; - } - - 1;${3} -# Read File -snippet slurp - my $${1:var}; - { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} diff --git a/bundle/snipMate/snippets/php.snippets b/bundle/snipMate/snippets/php.snippets deleted file mode 100644 index 3ce9e26c..00000000 --- a/bundle/snipMate/snippets/php.snippets +++ /dev/null @@ -1,216 +0,0 @@ -snippet php - -snippet ec - echo "${1:string}"${2}; -snippet inc - include '${1:file}';${2} -snippet inc1 - include_once '${1:file}';${2} -snippet req - require '${1:file}';${2} -snippet req1 - require_once '${1:file}';${2} -# $GLOBALS['...'] -snippet globals - $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} -snippet $_ COOKIE['...'] - $_COOKIE['${1:variable}']${2} -snippet $_ ENV['...'] - $_ENV['${1:variable}']${2} -snippet $_ FILES['...'] - $_FILES['${1:variable}']${2} -snippet $_ Get['...'] - $_GET['${1:variable}']${2} -snippet $_ POST['...'] - $_POST['${1:variable}']${2} -snippet $_ REQUEST['...'] - $_REQUEST['${1:variable}']${2} -snippet $_ SERVER['...'] - $_SERVER['${1:variable}']${2} -snippet $_ SESSION['...'] - $_SESSION['${1:variable}']${2} -# Start Docblock -snippet /* - /** - * ${1} - **/ -# Class - post doc -snippet doc_cp - /** - * ${1:undocumented class} - * - * @package ${2:default} - * @author ${3:`g:snips_author`} - **/${4} -# Class Variable - post doc -snippet doc_vp - /** - * ${1:undocumented class variable} - * - * @var ${2:string} - **/${3} -# Class Variable -snippet doc_v - /** - * ${3:undocumented class variable} - * - * @var ${4:string} - **/ - ${1:var} $${2};${5} -# Class -snippet doc_c - /** - * ${3:undocumented class} - * - * @packaged ${4:default} - * @author ${5:`g:snips_author`} - **/ - ${1:}class ${2:} - {${6} - } // END $1class $2 -# Constant Definition - post doc -snippet doc_dp - /** - * ${1:undocumented constant} - **/${2} -# Constant Definition -snippet doc_d - /** - * ${3:undocumented constant} - **/ - define(${1}, ${2});${4} -# Function - post doc -snippet doc_fp - /** - * ${1:undocumented function} - * - * @return ${2:void} - * @author ${3:`g:snips_author`} - **/${4} -# Function signature -snippet doc_s - /** - * ${4:undocumented function} - * - * @return ${5:void} - * @author ${6:`g:snips_author`} - **/ - ${1}function ${2}(${3});${7} -# Function -snippet doc_f - /** - * ${4:undocumented function} - * - * @return ${5:void} - * @author ${6:`g:snips_author`} - **/ - ${1}function ${2}(${3}) - {${7} - } -# Header -snippet doc_h - /** - * ${1} - * - * @author ${2:`g:snips_author`} - * @version ${3:$Id$} - * @copyright ${4:$2}, `strftime('%d %B, %Y')` - * @package ${5:default} - **/ - - /** - * Define DocBlock - *// -# Interface -snippet doc_i - /** - * ${2:undocumented class} - * - * @package ${3:default} - * @author ${4:`g:snips_author`} - **/ - interface ${1:} - {${5} - } // END interface $1 -# class ... -snippet class - /** - * ${1} - **/ - class ${2:ClassName} - { - ${3} - function ${4:__construct}(${5:argument}) - { - ${6:// code...} - } - } -# define(...) -snippet def - define('${1}'${2});${3} -# defined(...) -snippet def? - ${1}defined('${2}')${3} -snippet wh - while (${1:/* condition */}) { - ${2:// code...} - } -# do ... while -snippet do - do { - ${2:// code... } - } while (${1:/* condition */}); -snippet if - if (${1:/* condition */}) { - ${2:// code...} - } -snippet ife - if (${1:/* condition */}) { - ${2:// code...} - } else { - ${3:// code...} - } - ${4} -snippet else - else { - ${1:// code...} - } -snippet elseif - elseif (${1:/* condition */}) { - ${2:// code...} - } -# Tertiary conditional -snippet t - $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} -snippet switch - switch ($${1:variable}) { - case '${2:value}': - ${3:// code...} - break; - ${5} - default: - ${4:// code...} - break; - } -snippet case - case '${1:value}': - ${2:// code...} - break;${3} -snippet for - for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { - ${4: // code...} - } -snippet foreach - foreach ($${1:variable} as $${2:key}) { - ${3:// code...} - } -snippet fun - ${1:public }function ${2:FunctionName}(${3}) - { - ${4:// code...} - } -# $... = array (...) -snippet array - $${1:arrayName} = array('${2}' => ${3});${4} diff --git a/bundle/snipMate/snippets/python.snippets b/bundle/snipMate/snippets/python.snippets deleted file mode 100644 index d511184a..00000000 --- a/bundle/snipMate/snippets/python.snippets +++ /dev/null @@ -1,86 +0,0 @@ -snippet #! - #!/usr/bin/python - -snippet imp - import ${1:module} -# Module Docstring -snippet docs - ''' - File: ${1:`Filename('$1.py', 'foo.py')`} - Author: ${2:`g:snips_author`} - Description: ${3} - ''' -snippet wh - while ${1:condition}: - ${2:# code...} -snippet for - for ${1:needle} in ${2:haystack}: - ${3:# code...} -# New Class -snippet cl - class ${1:ClassName}(${2:object}): - """${3:docstring for $1}""" - def __init__(self, ${4:arg}): - ${5:super($1, self).__init__()} - self.$4 = $4 - ${6} -# New Function -snippet def - def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - """${3:docstring for $1}""" - ${4:pass} -snippet deff - def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - ${3} -# New Method -snippet defs - def ${1:mname}(self, ${2:arg}): - ${3:pass} -# New Property -snippet property - def ${1:foo}(): - doc = "${2:The $1 property.}" - def fget(self): - ${3:return self._$1} - def fset(self, value): - ${4:self._$1 = value} -# Lambda -snippet ld - ${1:var} = lambda ${2:vars} : ${3:action} -snippet . - self. -snippet try Try/Except - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} -snippet try Try/Except/Else - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} - else: - ${5:pass} -snippet try Try/Except/Finally - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} - finally: - ${5:pass} -snippet try Try/Except/Else/Finally - try: - ${1:pass} - except ${2:Exception}, ${3:e}: - ${4:raise $3} - else: - ${5:pass} - finally: - ${6:pass} -# if __name__ == '__main__': -snippet ifmain - if __name__ == '__main__': - ${1:main()} -# __magic__ -snippet _ - __${1:init}__${2} diff --git a/bundle/snipMate/snippets/ruby.snippets b/bundle/snipMate/snippets/ruby.snippets deleted file mode 100644 index bf1d7f17..00000000 --- a/bundle/snipMate/snippets/ruby.snippets +++ /dev/null @@ -1,420 +0,0 @@ -# #!/usr/bin/ruby -snippet #! - #!/usr/bin/ruby - -# New Block -snippet =b - =begin rdoc - ${1} - =end -snippet y - :yields: ${1:arguments} -snippet rb - #!/usr/bin/env ruby -wKU - -snippet req - require "${1}"${2} -snippet # - # => -snippet end - __END__ -snippet case - case ${1:object} - when ${2:condition} - ${3} - end -snippet when - when ${1:condition} - ${2} -snippet def - def ${1:method_name} - ${2} - end -snippet deft - def test_${1:case_name} - ${2} - end -snippet if - if ${1:condition} - ${2} - end -snippet ife - if ${1:condition} - ${2} - else - ${3} - end -snippet elsif - elsif ${1:condition} - ${2} -snippet unless - unless ${1:condition} - ${2} - end -snippet while - while ${1:condition} - ${2} - end -snippet until - until ${1:condition} - ${2} - end -snippet cla class .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} - ${2} - end -snippet cla class .. initialize .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} - def initialize(${2:args}) - ${3} - end - - - end -snippet cla class .. < ParentClass .. initialize .. end - class ${1:`substitute(Filename(), '^.', '\u&', '')`} < ${2:ParentClass} - def initialize(${3:args}) - ${4} - end - - - end -snippet cla ClassName = Struct .. do .. end - ${1:`substitute(Filename(), '^.', '\u&', '')`} = Struct.new(:${2:attr_names}) do - def ${3:method_name} - ${4} - end - - - end -snippet cla class BlankSlate .. initialize .. end - class ${1:BlankSlate} - instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } -snippet cla class << self .. end - class << ${1:self} - ${2} - end -# class .. < DelegateClass .. initialize .. end -snippet cla- - class ${1:`substitute(Filename(), '^.', '\u&', '')`} < DelegateClass(${2:ParentClass}) - def initialize(${3:args}) - super(${4:del_obj}) - - ${5} - end - - - end -snippet mod module .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - ${2} - end -snippet mod module .. module_function .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - module_function - - ${2} - end -snippet mod module .. ClassMethods .. end - module ${1:`substitute(Filename(), '^.', '\u&', '')`} - module ClassMethods - ${2} - end - - module InstanceMethods - - end - - def self.included(receiver) - receiver.extend ClassMethods - receiver.send :include, InstanceMethods - end - end -# attr_reader -snippet r - attr_reader :${1:attr_names} -# attr_writer -snippet w - attr_writer :${1:attr_names} -# attr_accessor -snippet rw - attr_accessor :${1:attr_names} -# include Enumerable -snippet Enum - include Enumerable - - def each(&block) - ${1} - end -# include Comparable -snippet Comp - include Comparable - - def <=>(other) - ${1} - end -# extend Forwardable -snippet Forw- - extend Forwardable -# def self -snippet defs - def self.${1:class_method_name} - ${2} - end -# def method_missing -snippet defmm - def method_missing(meth, *args, &blk) - ${1} - end -snippet defd - def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} -snippet defds - def_delegators :${1:@del_obj}, :${2:del_methods} -snippet am - alias_method :${1:new_name}, :${2:old_name} -snippet app - if __FILE__ == $PROGRAM_NAME - ${1} - end -# usage_if() -snippet usai - if ARGV.${1} - abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} - end -# usage_unless() -snippet usau - unless ARGV.${1} - abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} - end -snippet array - Array.new(${1:10}) { |${2:i}| ${3} } -snippet hash - Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} } -snippet file File.foreach() { |line| .. } - File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} } -snippet file File.read() - File.read(${1:"path/to/file"})${2} -snippet Dir Dir.global() { |file| .. } - Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} } -snippet Dir Dir[".."] - Dir[${1:"glob/**/*.rb"}]${2} -snippet dir - Filename.dirname(__FILE__) -snippet deli - delete_if { |${1:e}| ${2} } -snippet fil - fill(${1:range}) { |${2:i}| ${3} } -# flatten_once() -snippet flao - inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3} -snippet zip - zip(${1:enums}) { |${2:row}| ${3} } -# downto(0) { |n| .. } -snippet dow - downto(${1:0}) { |${2:n}| ${3} } -snippet ste - step(${1:2}) { |${2:n}| ${3} } -snippet tim - times { |${1:n}| ${2} } -snippet upt - upto(${1:1.0/0.0}) { |${2:n}| ${3} } -snippet loo - loop { ${1} } -snippet ea - each { |${1:e}| ${2} } -snippet eab - each_byte { |${1:byte}| ${2} } -snippet eac- each_char { |chr| .. } - each_char { |${1:chr}| ${2} } -snippet eac- each_cons(..) { |group| .. } - each_cons(${1:2}) { |${2:group}| ${3} } -snippet eai - each_index { |${1:i}| ${2} } -snippet eak - each_key { |${1:key}| ${2} } -snippet eal - each_line { |${1:line}| ${2} } -snippet eap - each_pair { |${1:name}, ${2:val}| ${3} } -snippet eas- - each_slice(${1:2}) { |${2:group}| ${3} } -snippet eav - each_value { |${1:val}| ${2} } -snippet eawi - each_with_index { |${1:e}, ${2:i}| ${3} } -snippet reve - reverse_each { |${1:e}| ${2} } -snippet inj - inject(${1:init}) { |${2:mem}, ${3:var}| ${4} } -snippet map - map { |${1:e}| ${2} } -snippet mapwi- - enum_with_index.map { |${1:e}, ${2:i}| ${3} } -snippet sor - sort { |a, b| ${1} } -snippet sorb - sort_by { |${1:e}| ${2} } -snippet ran - sort_by { rand } -snippet all - all? { |${1:e}| ${2} } -snippet any - any? { |${1:e}| ${2} } -snippet cl - classify { |${1:e}| ${2} } -snippet col - collect { |${1:e}| ${2} } -snippet det - detect { |${1:e}| ${2} } -snippet fet - fetch(${1:name}) { |${2:key}| ${3} } -snippet fin - find { |${1:e}| ${2} } -snippet fina - find_all { |${1:e}| ${2} } -snippet gre - grep(${1:/pattern/}) { |${2:match}| ${3} } -snippet sub - ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} } -snippet sca - scan(${1:/pattern/}) { |${2:match}| ${3} } -snippet max - max { |a, b|, ${1} } -snippet min - min { |a, b|, ${1} } -snippet par - partition { |${1:e}|, ${2} } -snippet rej - reject { |${1:e}|, ${2} } -snippet sel - select { |${1:e}|, ${2} } -snippet lam - lambda { |${1:args}| ${2} } -snippet do - do |${1:variable}| - ${2} - end -snippet : - :${1:key} => ${2:"value"}${3} -snippet ope - open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} } -# path_from_here() -snippet patfh - File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2} -# unix_filter {} -snippet unif - ARGF.each_line${1} do |${2:line}| - ${3} - end -# option_parse {} -snippet optp - require "optparse" - - options = {${1:default => "args"}} - - ARGV.options do |opts| - opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} -snippet opt - opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String}, - "${4:Option description.}") do |${5:opt}| - ${6} - end -snippet tc - require "test/unit" - - require "${1:library_file_name}" - - class Test${2:$1} < Test::Unit::TestCase - def test_${3:case_name} - ${4} - end - end -snippet ts - require "test/unit" - - require "tc_${1:test_case_file}" - require "tc_${2:test_case_file}"${3} -snippet as - assert(${1:test}, "${2:Failure message.}")${3} -snippet ase - assert_equal(${1:expected}, ${2:actual})${3} -snippet asne - assert_not_equal(${1:unexpected}, ${2:actual})${3} -snippet asid - assert_in_delta(${1:expected_float}, ${2:actual_float}, ${3:2 ** -20})${4} -snippet asio - assert_instance_of(${1:ExpectedClass}, ${2:actual_instance})${3} -snippet asko - assert_kind_of(${1:ExpectedKind}, ${2:actual_instance})${3} -snippet asn - assert_nil(${1:instance})${2} -snippet asnn - assert_not_nil(${1:instance})${2} -snippet asm - assert_match(/${1:expected_pattern}/, ${2:actual_string})${3} -snippet asnm - assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string})${3} -snippet aso - assert_operator(${1:left}, :${2:operator}, ${3:right})${4} -snippet asr - assert_raise(${1:Exception}) { ${2} } -snippet asnr - assert_nothing_raised(${1:Exception}) { ${2} } -snippet asrt - assert_respond_to(${1:object}, :${2:method})${3} -snippet ass assert_same(..) - assert_same(${1:expected}, ${2:actual})${3} -snippet ass assert_send(..) - assert_send([${1:object}, :${2:message}, ${3:args}])${4} -snippet asns - assert_not_same(${1:unexpected}, ${2:actual})${3} -snippet ast - assert_throws(:${1:expected}) { ${2} } -snippet asnt - assert_nothing_thrown { ${1} } -snippet fl - flunk("${1:Failure message.}")${2} -# Benchmark.bmbm do .. end -snippet bm- - TESTS = ${1:10_000} - Benchmark.bmbm do |results| - ${2} - end -snippet rep - results.report("${1:name}:") { TESTS.times { ${2} }} -# Marshal.dump(.., file) -snippet Md - File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4} -# Mashal.load(obj) -snippet Ml - File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3} -# deep_copy(..) -snippet deec - Marshal.load(Marshal.dump(${1:obj_to_copy}))${2} -snippet Pn- - PStore.new(${1:"file_name.pstore"})${2} -snippet tra - transaction(${1:true}) { ${2} } -# xmlread(..) -snippet xml- - REXML::Document.new(File.read(${1:"path/to/file"}))${2} -# xpath(..) { .. } -snippet xpa - elements.each(${1:"//Xpath"}) do |${2:node}| - ${3} - end -# class_from_name() -snippet clafn - split("::").inject(Object) { |par, const| par.const_get(const) } -# singleton_class() -snippet sinc - class << self; self end -snippet nam - namespace :${1:`Filename()`} do - ${2} - end -snippet tas - desc "${1:Task description\}" - task :${2:task_name => [:dependent, :tasks]} do - ${3} - end diff --git a/bundle/snipMate/snippets/sh.snippets b/bundle/snipMate/snippets/sh.snippets deleted file mode 100644 index f035126e..00000000 --- a/bundle/snipMate/snippets/sh.snippets +++ /dev/null @@ -1,28 +0,0 @@ -# #!/bin/bash -snippet #! - #!/bin/bash - -snippet if - if [[ ${1:condition} ]]; then - ${2:#statements} - fi -snippet elif - elif [[ ${1:condition} ]]; then - ${2:#statements} -snippet for - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do - ${3:#statements} - done -snippet wh - while [[ ${1:condition} ]]; do - ${2:#statements} - done -snippet until - until [[ ${1:condition} ]]; do - ${2:#statements} - done -snippet case - case ${1:word} in - ${2:pattern}) - ${3};; - esac diff --git a/bundle/snipMate/snippets/snippet.snippets b/bundle/snipMate/snippets/snippet.snippets deleted file mode 100644 index 854c0582..00000000 --- a/bundle/snipMate/snippets/snippet.snippets +++ /dev/null @@ -1,7 +0,0 @@ -# snippets for making snippets :) -snippet snip - snippet ${1:trigger} - ${2} -snippet msnip - snippet ${1:trigger} ${2:description} - ${3} diff --git a/bundle/snipMate/snippets/tcl.snippets b/bundle/snipMate/snippets/tcl.snippets deleted file mode 100644 index bee2ef8a..00000000 --- a/bundle/snipMate/snippets/tcl.snippets +++ /dev/null @@ -1,92 +0,0 @@ -# #!/usr/bin/tclsh -snippet #! - #!/usr/bin/tclsh - -# Process -snippet pro - proc ${1:function_name} {${2:args}} { - ${3:#body ...} - } -#xif -snippet xif - ${1:expr}? ${2:true} : ${3:false} -# Conditional -snippet if - if {${1}} { - ${2:# body...} - } -# Conditional if..else -snippet ife - if {${1}} { - ${2:# body...} - } else { - ${3:# else...} - } -# Conditional if..elsif..else -snippet ifee - if {${1}} { - ${2:# body...} - } elseif {${3}} { - ${4:# elsif...} - } else { - ${5:# else...} - } -# If catch then -snippet ifc - if { [catch {${1:#do something...}} ${2:err}] } { - ${3:# handle failure...} - } -# Catch -snippet catch - catch {${1}} ${2:err} ${3:options} -# While Loop -snippet wh - while {${1}} { - ${2:# body...} - } -# For Loop -snippet for - for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { - ${4:# body...} - } -# Foreach Loop -snippet fore - foreach ${1:x} {${2:#list}} { - ${3:# body...} - } -# after ms script... -snippet af - after ${1:ms} ${2:#do something} -# after cancel id -snippet afc - after cancel ${1:id or script} -# after idle -snippet afi - after idle ${1:script} -# after info id -snippet afin - after info ${1:id} -# Expr -snippet exp - expr {${1:#expression here}} -# Switch -snippet sw - switch ${1:var} { - ${3:pattern 1} { - ${4:#do something} - } - default { - ${2:#do something} - } - } -# Case -snippet ca - ${1:pattern} { - ${2:#do something} - }${3} -# Namespace eval -snippet ns - namespace eval ${1:path} {${2:#script...}} -# Namespace current -snippet nsc - namespace current diff --git a/bundle/snipMate/snippets/tex.snippets b/bundle/snipMate/snippets/tex.snippets deleted file mode 100644 index 22f73165..00000000 --- a/bundle/snipMate/snippets/tex.snippets +++ /dev/null @@ -1,115 +0,0 @@ -# \begin{}...\end{} -snippet begin - \begin{${1:env}} - ${2} - \end{$1} -# Tabular -snippet tab - \begin{${1:tabular}}{${2:c}} - ${3} - \end{$1} -# Align(ed) -snippet ali - \begin{align${1:ed}} - ${2} - \end{align$1} -# Gather(ed) -snippet gat - \begin{gather${1:ed}} - ${2} - \end{gather$1} -# Equation -snippet eq - \begin{equation} - ${1} - \end{equation} -# Unnumbered Equation -snippet \ - \\[ - ${1} - \\] -# Enumerate -snippet enum - \begin{enumerate} - \item ${1} - \end{enumerate} -# Itemize -snippet item - \begin{itemize} - \item ${1} - \end{itemize} -# Description -snippet desc - \begin{description} - \item[${1}] ${2} - \end{description} -# Matrix -snippet mat - \begin{${1:p/b/v/V/B/small}matrix} - ${2} - \end{$1matrix} -# Cases -snippet cas - \begin{cases} - ${1:equation}, &\text{ if }${2:case}\\ - ${3} - \end{cases} -# Split -snippet spl - \begin{split} - ${1} - \end{split} -# Part -snippet part - \part{${1:part name}} % (fold) - \label{prt:${2:$1}} - ${3} - % part $2 (end) -# Chapter -snippet cha - \chapter{${1:chapter name}} % (fold) - \label{cha:${2:$1}} - ${3} - % chapter $2 (end) -# Section -snippet sec - \section{${1:section name}} % (fold) - \label{sec:${2:$1}} - ${3} - % section $2 (end) -# Sub Section -snippet sub - \subsection{${1:subsection name}} % (fold) - \label{sub:${2:$1}} - ${3} - % subsection $2 (end) -# Sub Sub Section -snippet subs - \subsubsection{${1:subsubsection name}} % (fold) - \label{ssub:${2:$1}} - ${3} - % subsubsection $2 (end) -# Paragraph -snippet par - \paragraph{${1:paragraph name}} % (fold) - \label{par:${2:$1}} - ${3} - % paragraph $2 (end) -# Sub Paragraph -snippet subp - \subparagraph{${1:subparagraph name}} % (fold) - \label{subp:${2:$1}} - ${3} - % subparagraph $2 (end) -snippet itd - \item[${1:description}] ${2:item} -snippet figure - ${1:Figure}~\ref{${2:fig:}}${3} -snippet table - ${1:Table}~\ref{${2:tab:}}${3} -snippet listing - ${1:Listing}~\ref{${2:list}}${3} -snippet section - ${1:Section}~\ref{${2:sec:}}${3} -snippet page - ${1:page}~\pageref{${2}}${3} diff --git a/bundle/snipMate/snippets/vim.snippets b/bundle/snipMate/snippets/vim.snippets deleted file mode 100644 index 64e7807e..00000000 --- a/bundle/snipMate/snippets/vim.snippets +++ /dev/null @@ -1,32 +0,0 @@ -snippet header - " File: ${1:`expand('%:t')`} - " Author: ${2:`g:snips_author`} - " Description: ${3} - ${4:" Last Modified: `strftime("%B %d, %Y")`} -snippet guard - if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} - finish - endif - let $1 = 1${3} -snippet f - fun ${1:function_name}(${2}) - ${3:" code} - endf -snippet for - for ${1:needle} in ${2:haystack} - ${3:" code} - endfor -snippet wh - while ${1:condition} - ${2:" code} - endw -snippet if - if ${1:condition} - ${2:" code} - endif -snippet ife - if ${1:condition} - ${2} - else - ${3} - endif diff --git a/bundle/snipMate/snippets/zsh.snippets b/bundle/snipMate/snippets/zsh.snippets deleted file mode 100644 index 7aee05bd..00000000 --- a/bundle/snipMate/snippets/zsh.snippets +++ /dev/null @@ -1,58 +0,0 @@ -# #!/bin/zsh -snippet #! - #!/bin/zsh - -snippet if - if ${1:condition}; then - ${2:# statements} - fi -snippet ife - if ${1:condition}; then - ${2:# statements} - else - ${3:# statements} - fi -snippet elif - elif ${1:condition} ; then - ${2:# statements} -snippet for - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do - ${3:# statements} - done -snippet fore - for ${1:item} in ${2:list}; do - ${3:# statements} - done -snippet wh - while ${1:condition}; do - ${2:# statements} - done -snippet until - until ${1:condition}; do - ${2:# statements} - done -snippet repeat - repeat ${1:integer}; do - ${2:# statements} - done -snippet case - case ${1:word} in - ${2:pattern}) - ${3};; - esac -snippet select - select ${1:answer} in ${2:choices}; do - ${3:# statements} - done -snippet ( - ( ${1:#statements} ) -snippet { - { ${1:#statements} } -snippet [ - [[ ${1:test} ]] -snippet always - { ${1:try} } always { ${2:always} } -snippet fun - function ${1:name} (${2:args}) { - ${3:# body} - } diff --git a/bundle/snipMate/syntax/snippet.vim b/bundle/snipMate/syntax/snippet.vim deleted file mode 100644 index 5e919e78..00000000 --- a/bundle/snipMate/syntax/snippet.vim +++ /dev/null @@ -1,19 +0,0 @@ -" Syntax highlighting for snippet files (used for snipMate.vim) -" Hopefully this should make snippets a bit nicer to write! -syn match snipComment '^#.*' -syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand -syn match tabStop '\$\d\+' -syn match snipCommand '`.\{-}`' -syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword -syn match multiSnipText '\S\+ \zs.*' contained -syn match snipKeyword '^snippet'me=s+8 contained -syn match snipError "^[^#s\t].*$" - -hi link snipComment Comment -hi link multiSnipText String -hi link snipKeyword Keyword -hi link snipComment Comment -hi link placeHolder Special -hi link tabStop Special -hi link snipCommand String -hi link snipError Error diff --git a/bundle/supertab b/bundle/supertab deleted file mode 160000 index 94b62deb..00000000 --- a/bundle/supertab +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 94b62deb9fa3f9084154221aed053bf6031af8a0 diff --git a/bundle/syntastic b/bundle/syntastic deleted file mode 160000 index ede4127f..00000000 --- a/bundle/syntastic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ede4127f131c248c7cf8b7cfc83cc211b14e7481 diff --git a/bundle/tabular b/bundle/tabular deleted file mode 160000 index 60f25648..00000000 --- a/bundle/tabular +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 60f25648814f0695eeb6c1040d97adca93c4e0bb diff --git a/bundle/tagbar b/bundle/tagbar deleted file mode 160000 index 2ebd2a13..00000000 --- a/bundle/tagbar +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ebd2a1392493940a82ef4de76604182e069e0b0 diff --git a/bundle/test_server b/bundle/test_server deleted file mode 160000 index 02a8cf57..00000000 --- a/bundle/test_server +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 02a8cf57769b2e0750e1ed078656ae61b11d59a8 diff --git a/bundle/tmux-config b/bundle/tmux-config deleted file mode 160000 index 3636ae64..00000000 --- a/bundle/tmux-config +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3636ae648d5013294e8eb1d15ee7e011204e3581 diff --git a/bundle/vim-abolish b/bundle/vim-abolish deleted file mode 160000 index d64ce066..00000000 --- a/bundle/vim-abolish +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d64ce06650cf9b098b5a01c0db53864965d9310b diff --git a/bundle/vim-blockle b/bundle/vim-blockle deleted file mode 160000 index 66f968cd..00000000 --- a/bundle/vim-blockle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 66f968cdb86e4151b0768a3172b755054ad28e01 diff --git a/bundle/vim-clojure-static b/bundle/vim-clojure-static deleted file mode 160000 index 949adf73..00000000 --- a/bundle/vim-clojure-static +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 949adf73ae1a82c48cd951677c055bd38a30af99 diff --git a/bundle/vim-coffee-script b/bundle/vim-coffee-script deleted file mode 160000 index 089506ed..00000000 --- a/bundle/vim-coffee-script +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 089506ed89da1849485fdfcca002a42111759fab diff --git a/bundle/vim-colors-candycode b/bundle/vim-colors-candycode deleted file mode 160000 index a07f4012..00000000 --- a/bundle/vim-colors-candycode +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a07f401285adb7ec20cedccc4bab3e43287f0e5f diff --git a/bundle/vim-colors-sampler b/bundle/vim-colors-sampler deleted file mode 160000 index 76814de8..00000000 --- a/bundle/vim-colors-sampler +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 76814de8ee43ed4fd98dd73567d9fb1a078931eb diff --git a/bundle/vim-colors-solarized b/bundle/vim-colors-solarized deleted file mode 160000 index 528a59f2..00000000 --- a/bundle/vim-colors-solarized +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 528a59f26d12278698bb946f8fb82a63711eec21 diff --git a/bundle/vim-cucumber b/bundle/vim-cucumber deleted file mode 160000 index 9e686ad3..00000000 --- a/bundle/vim-cucumber +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9e686ad36da43eae7462612fb8123bd47ea16171 diff --git a/bundle/vim-cucumber-align-pipes b/bundle/vim-cucumber-align-pipes deleted file mode 160000 index 49c59fe8..00000000 --- a/bundle/vim-cucumber-align-pipes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 49c59fe88302b95dc96637e38f964cae5d7c89bb diff --git a/bundle/vim-dispatch b/bundle/vim-dispatch deleted file mode 160000 index ffbd5eb5..00000000 --- a/bundle/vim-dispatch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ffbd5eb50c9daf67657b87fd767d1801ac9a15a7 diff --git a/bundle/vim-easymotion/.gitignore b/bundle/vim-easymotion/.gitignore deleted file mode 100644 index 926ccaaf..00000000 --- a/bundle/vim-easymotion/.gitignore +++ /dev/null @@ -1 +0,0 @@ -doc/tags diff --git a/bundle/vim-easymotion/README.md b/bundle/vim-easymotion/README.md deleted file mode 100644 index 7c0caf9d..00000000 --- a/bundle/vim-easymotion/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Introduction - -EasyMotion provides a much simpler way to use some motions in vim. It -takes the `` out of `w` or `f{char}` by -highlighting all possible choices and allowing you to press one key to -jump directly to the target. - -When one of the available motions is triggered, all visible text -preceding or following the cursor is faded, and motion targets are -highlighted. - -EasyMotion is triggered by one of the provided mappings. - -# Important notes about the default bindings - -**The default leader has been changed to `` to avoid -conflicts with other plugins you may have installed.** This can easily be -changed back to pre-1.3 behavior by rebinding the leader in your vimrc: - - let g:EasyMotion_leader_key = '' - -All motions are now triggered with `` by default, e.g. -`t`, `gE`. - -## Usage example - -Type `w` to trigger the word motion `w`. When the motion is -triggered, the text is updated (no braces are actually added, the text -is highlighted in red by default): - - Lorem {a}psum {b}olor {c}it {d}met. - -Press `c` to jump to the beginning of the word "sit": - - Lorem ipsum dolor sit amet. - -Similarly, if you're looking for an "o", you can use the `f` motion. -Type `fo`, and all "o" characters are highlighted: - - L{a}rem ipsum d{b}l{c}r sit amet. - -Press `b` to jump to the second "o": - - Lorem ipsum dolor sit amet. - -Jeffrey Way of Nettuts+ has also [written -a tutorial](http://net.tutsplus.com/tutorials/other/vim-essential-plugin-easymotion/) -about EasyMotion. - -## Animated demonstration - -![Animated demonstration](http://oi54.tinypic.com/2yysefm.jpg) diff --git a/bundle/vim-easymotion/autoload/EasyMotion.vim b/bundle/vim-easymotion/autoload/EasyMotion.vim deleted file mode 100644 index 7c79dd81..00000000 --- a/bundle/vim-easymotion/autoload/EasyMotion.vim +++ /dev/null @@ -1,573 +0,0 @@ -" EasyMotion - Vim motions on speed! -" -" Author: Kim Silkebækken -" Source repository: https://github.com/Lokaltog/vim-easymotion - -" Default configuration functions {{{ - function! EasyMotion#InitOptions(options) " {{{ - for [key, value] in items(a:options) - if ! exists('g:EasyMotion_' . key) - exec 'let g:EasyMotion_' . key . ' = ' . string(value) - endif - endfor - endfunction " }}} - function! EasyMotion#InitHL(group, colors) " {{{ - let group_default = a:group . 'Default' - - " Prepare highlighting variables - let guihl = printf('guibg=%s guifg=%s gui=%s', a:colors.gui[0], a:colors.gui[1], a:colors.gui[2]) - if !exists('g:CSApprox_loaded') - let ctermhl = &t_Co == 256 - \ ? printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm256[0], a:colors.cterm256[1], a:colors.cterm256[2]) - \ : printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm[0], a:colors.cterm[1], a:colors.cterm[2]) - else - let ctermhl = '' - endif - - " Create default highlighting group - execute printf('hi default %s %s %s', group_default, guihl, ctermhl) - - " Check if the hl group exists - if hlexists(a:group) - redir => hlstatus | exec 'silent hi ' . a:group | redir END - - " Return if the group isn't cleared - if hlstatus !~ 'cleared' - return - endif - endif - - " No colors are defined for this group, link to defaults - execute printf('hi default link %s %s', a:group, group_default) - endfunction " }}} - function! EasyMotion#InitMappings(motions) "{{{ - for motion in keys(a:motions) - call EasyMotion#InitOptions({ 'mapping_' . motion : g:EasyMotion_leader_key . motion }) - endfor - - if g:EasyMotion_do_mapping - for [motion, fn] in items(a:motions) - if empty(g:EasyMotion_mapping_{motion}) - continue - endif - - silent exec 'nnoremap ' . g:EasyMotion_mapping_{motion} . ' :call EasyMotion#' . fn.name . '(0, ' . fn.dir . ')' - silent exec 'onoremap ' . g:EasyMotion_mapping_{motion} . ' :call EasyMotion#' . fn.name . '(0, ' . fn.dir . ')' - silent exec 'vnoremap ' . g:EasyMotion_mapping_{motion} . ' :call EasyMotion#' . fn.name . '(1, ' . fn.dir . ')' - endfor - endif - endfunction "}}} -" }}} -" Motion functions {{{ - function! EasyMotion#F(visualmode, direction) " {{{ - let char = s:GetSearchChar(a:visualmode) - - if empty(char) - return - endif - - let re = '\C' . escape(char, '.$^~') - - call s:EasyMotion(re, a:direction, a:visualmode ? visualmode() : '', mode(1)) - endfunction " }}} - function! EasyMotion#T(visualmode, direction) " {{{ - let char = s:GetSearchChar(a:visualmode) - - if empty(char) - return - endif - - if a:direction == 1 - let re = '\C' . escape(char, '.$^~') . '\zs.' - else - let re = '\C.' . escape(char, '.$^~') - endif - - call s:EasyMotion(re, a:direction, a:visualmode ? visualmode() : '', mode(1)) - endfunction " }}} - function! EasyMotion#WB(visualmode, direction) " {{{ - call s:EasyMotion('\(\<.\|^$\)', a:direction, a:visualmode ? visualmode() : '', '') - endfunction " }}} - function! EasyMotion#WBW(visualmode, direction) " {{{ - call s:EasyMotion('\(\(^\|\s\)\@<=\S\|^$\)', a:direction, a:visualmode ? visualmode() : '', '') - endfunction " }}} - function! EasyMotion#E(visualmode, direction) " {{{ - call s:EasyMotion('\(.\>\|^$\)', a:direction, a:visualmode ? visualmode() : '', mode(1)) - endfunction " }}} - function! EasyMotion#EW(visualmode, direction) " {{{ - call s:EasyMotion('\(\S\(\s\|$\)\|^$\)', a:direction, a:visualmode ? visualmode() : '', mode(1)) - endfunction " }}} - function! EasyMotion#JK(visualmode, direction) " {{{ - call s:EasyMotion('^\(\w\|\s*\zs\|$\)', a:direction, a:visualmode ? visualmode() : '', '') - endfunction " }}} - function! EasyMotion#Search(visualmode, direction) " {{{ - call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '') - endfunction " }}} -" }}} -" Helper functions {{{ - function! s:Message(message) " {{{ - echo 'EasyMotion: ' . a:message - endfunction " }}} - function! s:Prompt(message) " {{{ - echohl Question - echo a:message . ': ' - echohl None - endfunction " }}} - function! s:VarReset(var, ...) " {{{ - if ! exists('s:var_reset') - let s:var_reset = {} - endif - - let buf = bufname("") - - if a:0 == 0 && has_key(s:var_reset, a:var) - " Reset var to original value - call setbufvar(buf, a:var, s:var_reset[a:var]) - elseif a:0 == 1 - let new_value = a:0 == 1 ? a:1 : '' - - " Store original value - let s:var_reset[a:var] = getbufvar(buf, a:var) - - " Set new var value - call setbufvar(buf, a:var, new_value) - endif - endfunction " }}} - function! s:SetLines(lines, key) " {{{ - try - " Try to join changes with previous undo block - undojoin - catch - endtry - - for [line_num, line] in a:lines - call setline(line_num, line[a:key]) - endfor - endfunction " }}} - function! s:GetChar() " {{{ - let char = getchar() - - if char == 27 - " Escape key pressed - redraw - - call s:Message('Cancelled') - - return '' - endif - - return nr2char(char) - endfunction " }}} - function! s:GetSearchChar(visualmode) " {{{ - call s:Prompt('Search for character') - - let char = s:GetChar() - - " Check that we have an input char - if empty(char) - " Restore selection - if ! empty(a:visualmode) - silent exec 'normal! gv' - endif - - return '' - endif - - return char - endfunction " }}} -" }}} -" Grouping algorithms {{{ - let s:grouping_algorithms = { - \ 1: 'SCTree' - \ , 2: 'Original' - \ } - " Single-key/closest target priority tree {{{ - " This algorithm tries to assign one-key jumps to all the targets closest to the cursor. - " It works recursively and will work correctly with as few keys as two. - function! s:GroupingAlgorithmSCTree(targets, keys) - " Prepare variables for working - let targets_len = len(a:targets) - let keys_len = len(a:keys) - - let groups = {} - - let keys = reverse(copy(a:keys)) - - " Semi-recursively count targets {{{ - " We need to know exactly how many child nodes (targets) this branch will have - " in order to pass the correct amount of targets to the recursive function. - - " Prepare sorted target count list {{{ - " This is horrible, I know. But dicts aren't sorted in vim, so we need to - " work around that. That is done by having one sorted list with key counts, - " and a dict which connects the key with the keys_count list. - - let keys_count = [] - let keys_count_keys = {} - - let i = 0 - for key in keys - call add(keys_count, 0) - - let keys_count_keys[key] = i - - let i += 1 - endfor - " }}} - - let targets_left = targets_len - let level = 0 - let i = 0 - - while targets_left > 0 - " Calculate the amount of child nodes based on the current level - let childs_len = (level == 0 ? 1 : (keys_len - 1) ) - - for key in keys - " Add child node count to the keys_count array - let keys_count[keys_count_keys[key]] += childs_len - - " Subtract the child node count - let targets_left -= childs_len - - if targets_left <= 0 - " Subtract the targets left if we added too many too - " many child nodes to the key count - let keys_count[keys_count_keys[key]] += targets_left - - break - endif - - let i += 1 - endfor - - let level += 1 - endwhile - " }}} - " Create group tree {{{ - let i = 0 - let key = 0 - - call reverse(keys_count) - - for key_count in keys_count - if key_count > 1 - " We need to create a subgroup - " Recurse one level deeper - let groups[a:keys[key]] = s:GroupingAlgorithmSCTree(a:targets[i : i + key_count - 1], a:keys) - elseif key_count == 1 - " Assign single target key - let groups[a:keys[key]] = a:targets[i] - else - " No target - continue - endif - - let key += 1 - let i += key_count - endfor - " }}} - - " Finally! - return groups - endfunction - " }}} - " Original {{{ - function! s:GroupingAlgorithmOriginal(targets, keys) - " Split targets into groups (1 level) - let targets_len = len(a:targets) - let keys_len = len(a:keys) - - let groups = {} - - let i = 0 - let root_group = 0 - try - while root_group < targets_len - let groups[a:keys[root_group]] = {} - - for key in a:keys - let groups[a:keys[root_group]][key] = a:targets[i] - - let i += 1 - endfor - - let root_group += 1 - endwhile - catch | endtry - - " Flatten the group array - if len(groups) == 1 - let groups = groups[a:keys[0]] - endif - - return groups - endfunction - " }}} - " Coord/key dictionary creation {{{ - function! s:CreateCoordKeyDict(groups, ...) - " Dict structure: - " 1,2 : a - " 2,3 : b - let sort_list = [] - let coord_keys = {} - let group_key = a:0 == 1 ? a:1 : '' - - for [key, item] in items(a:groups) - let key = ( ! empty(group_key) ? group_key : key) - - if type(item) == 3 - " Destination coords - - " The key needs to be zero-padded in order to - " sort correctly - let dict_key = printf('%05d,%05d', item[0], item[1]) - let coord_keys[dict_key] = key - - " We need a sorting list to loop correctly in - " PromptUser, dicts are unsorted - call add(sort_list, dict_key) - else - " Item is a dict (has children) - let coord_key_dict = s:CreateCoordKeyDict(item, key) - - " Make sure to extend both the sort list and the - " coord key dict - call extend(sort_list, coord_key_dict[0]) - call extend(coord_keys, coord_key_dict[1]) - endif - - unlet item - endfor - - return [sort_list, coord_keys] - endfunction - " }}} -" }}} -" Core functions {{{ - function! s:PromptUser(groups) "{{{ - " If only one possible match, jump directly to it {{{ - let group_values = values(a:groups) - - if len(group_values) == 1 - redraw - - return group_values[0] - endif - " }}} - " Prepare marker lines {{{ - let lines = {} - let hl_coords = [] - let coord_key_dict = s:CreateCoordKeyDict(a:groups) - - for dict_key in sort(coord_key_dict[0]) - let target_key = coord_key_dict[1][dict_key] - let [line_num, col_num] = split(dict_key, ',') - - let line_num = str2nr(line_num) - let col_num = str2nr(col_num) - - " Add original line and marker line - if ! has_key(lines, line_num) - let current_line = getline(line_num) - - let lines[line_num] = { 'orig': current_line, 'marker': current_line, 'mb_compensation': 0 } - endif - - " Compensate for byte difference between marker - " character and target character - " - " This has to be done in order to match the correct - " column; \%c matches the byte column and not display - " column. - let target_char_len = strlen(matchstr(lines[line_num]['marker'], '\%' . col_num . 'c.')) - let target_key_len = strlen(target_key) - - " Solve multibyte issues by matching the byte column - " number instead of the visual column - let col_num -= lines[line_num]['mb_compensation'] - - if strlen(lines[line_num]['marker']) > 0 - " Substitute marker character if line length > 0 - let lines[line_num]['marker'] = substitute(lines[line_num]['marker'], '\%' . col_num . 'c.', target_key, '') - else - " Set the line to the marker character if the line is empty - let lines[line_num]['marker'] = target_key - endif - - " Add highlighting coordinates - call add(hl_coords, '\%' . line_num . 'l\%' . col_num . 'c') - - " Add marker/target lenght difference for multibyte - " compensation - let lines[line_num]['mb_compensation'] += (target_char_len - target_key_len) - endfor - - let lines_items = items(lines) - " }}} - " Highlight targets {{{ - let target_hl_id = matchadd(g:EasyMotion_hl_group_target, join(hl_coords, '\|'), 1) - " }}} - - try - " Set lines with markers - call s:SetLines(lines_items, 'marker') - - redraw - - " Get target character {{{ - call s:Prompt('Target key') - - let char = s:GetChar() - " }}} - finally - " Restore original lines - call s:SetLines(lines_items, 'orig') - - " Un-highlight targets {{{ - if exists('target_hl_id') - call matchdelete(target_hl_id) - endif - " }}} - - redraw - endtry - - " Check if we have an input char {{{ - if empty(char) - throw 'Cancelled' - endif - " }}} - " Check if the input char is valid {{{ - if ! has_key(a:groups, char) - throw 'Invalid target' - endif - " }}} - - let target = a:groups[char] - - if type(target) == 3 - " Return target coordinates - return target - else - " Prompt for new target character - return s:PromptUser(target) - endif - endfunction "}}} - function! s:EasyMotion(regexp, direction, visualmode, mode) " {{{ - let orig_pos = [line('.'), col('.')] - let targets = [] - - try - " Reset properties {{{ - call s:VarReset('&scrolloff', 0) - call s:VarReset('&modified', 0) - call s:VarReset('&modifiable', 1) - call s:VarReset('&readonly', 0) - call s:VarReset('&spell', 0) - call s:VarReset('&virtualedit', '') - " }}} - " Find motion targets {{{ - let search_direction = (a:direction == 1 ? 'b' : '') - let search_stopline = line(a:direction == 1 ? 'w0' : 'w$') - - while 1 - let pos = searchpos(a:regexp, search_direction, search_stopline) - - " Reached end of search range - if pos == [0, 0] - break - endif - - " Skip folded lines - if foldclosed(pos[0]) != -1 - continue - endif - - call add(targets, pos) - endwhile - - let targets_len = len(targets) - if targets_len == 0 - throw 'No matches' - endif - " }}} - - let GroupingFn = function('s:GroupingAlgorithm' . s:grouping_algorithms[g:EasyMotion_grouping]) - let groups = GroupingFn(targets, split(g:EasyMotion_keys, '\zs')) - - " Shade inactive source {{{ - if g:EasyMotion_do_shade - let shade_hl_pos = '\%' . orig_pos[0] . 'l\%'. orig_pos[1] .'c' - - if a:direction == 1 - " Backward - let shade_hl_re = '\%'. line('w0') .'l\_.*' . shade_hl_pos - else - " Forward - let shade_hl_re = shade_hl_pos . '\_.*\%'. line('w$') .'l' - endif - - let shade_hl_id = matchadd(g:EasyMotion_hl_group_shade, shade_hl_re, 0) - endif - " }}} - - " Prompt user for target group/character - let coords = s:PromptUser(groups) - - " Update selection {{{ - if ! empty(a:visualmode) - keepjumps call cursor(orig_pos[0], orig_pos[1]) - - exec 'normal! ' . a:visualmode - endif - " }}} - " Handle operator-pending mode {{{ - if a:mode == 'no' - " This mode requires that we eat one more - " character to the right if we're using - " a forward motion - if a:direction != 1 - let coords[1] += 1 - endif - endif - " }}} - - " Update cursor position - call cursor(orig_pos[0], orig_pos[1]) - mark ' - call cursor(coords[0], coords[1]) - - call s:Message('Jumping to [' . coords[0] . ', ' . coords[1] . ']') - catch - redraw - - " Show exception message - call s:Message(v:exception) - - " Restore original cursor position/selection {{{ - if ! empty(a:visualmode) - silent exec 'normal! gv' - else - keepjumps call cursor(orig_pos[0], orig_pos[1]) - endif - " }}} - finally - " Restore properties {{{ - call s:VarReset('&scrolloff') - call s:VarReset('&modified') - call s:VarReset('&modifiable') - call s:VarReset('&readonly') - call s:VarReset('&spell') - call s:VarReset('&virtualedit') - " }}} - " Remove shading {{{ - if g:EasyMotion_do_shade && exists('shade_hl_id') - call matchdelete(shade_hl_id) - endif - " }}} - endtry - endfunction " }}} -" }}} - -" vim: fdm=marker:noet:ts=4:sw=4:sts=4 diff --git a/bundle/vim-easymotion/doc/easymotion.txt b/bundle/vim-easymotion/doc/easymotion.txt deleted file mode 100644 index c91a9595..00000000 --- a/bundle/vim-easymotion/doc/easymotion.txt +++ /dev/null @@ -1,319 +0,0 @@ -*easymotion.txt* Version 1.3. Last change: 2011 Nov 7 - - - ______ __ ___ __ _ - / ____/____ ________ __/ |/ /____ / /_(_)____ ____ - / __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \ - / /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / / - /_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/ - /____/ - - Vim motions on speed! - - -============================================================================== -CONTENTS *easymotion-contents* - - 1. Introduction ....................... |easymotion-introduction| - 2. Usage .............................. |easymotion-usage| - 2.1 Default mappings ............... |easymotion-default-mappings| - 3. Requirements ....................... |easymotion-requirements| - 4. Configuration ...................... |easymotion-configuration| - 4.1 EasyMotion_keys ................ |EasyMotion_keys| - 4.2 EasyMotion_do_shade ............ |EasyMotion_do_shade| - 4.3 EasyMotion_do_mapping .......... |EasyMotion_do_mapping| - 4.4 EasyMotion_grouping ............ |EasyMotion_grouping| - 4.5 Custom highlighting ............ |easymotion-custom-hl| - 4.6 Custom mappings ................ |easymotion-custom-mappings| - 4.6.1 Leader key ............... |easymotion-leader-key| - 4.6.2 Custom keys .............. |easymotion-custom-keys| - 5. License ............................ |easymotion-license| - 6. Known bugs ......................... |easymotion-known-bugs| - 7. Contributing ....................... |easymotion-contributing| - 8. Credits ............................ |easymotion-credits| - -============================================================================== -1. Introduction *easymotion* *easymotion-introduction* - -EasyMotion provides a much simpler way to use some motions in vim. It takes -the out of w or f{char} by highlighting all possible -choices and allowing you to press one key to jump directly to the target. - -When one of the available motions is triggered, all visible text preceding or -following the cursor is faded, and motion targets are highlighted. - -============================================================================== -2. Usage *easymotion-usage* - -EasyMotion is triggered by one of the provided mappings (see -|easymotion-default-mappings| for details). - -Example: > - - Lorem ipsum dolor sit amet. - -Type w to trigger the word motion |w|. See -|easymotion-leader-key| for details about the leader key. When the -motion is triggered, the text is updated (no braces are actually added, -the text is highlighted in red by default): > - - Lorem {a}psum {b}olor {c}it {d}met. - -Press "c" to jump to the beginning of the word "sit": > - - Lorem ipsum dolor sit amet. - -Similarly, if you're looking for an "o", you can use the |f| motion. -Type fo, and all "o" characters are highlighted: > - - L{a}rem ipsum d{b}l{c}r sit amet. - -Press "b" to jump to the second "o": > - - Lorem ipsum dolor sit amet. - -And that's it! - ------------------------------------------------------------------------------- -2.1 Default mappings *easymotion-default-mappings* - -The default configuration defines the following mappings in normal, -visual and operator-pending mode: - - Mapping | Details - ------------------|---------------------------------------------- - f{char} | Find {char} to the right. See |f|. - F{char} | Find {char} to the left. See |F|. - t{char} | Till before the {char} to the right. See |t|. - T{char} | Till after the {char} to the left. See |T|. - w | Beginning of word forward. See |w|. - W | Beginning of WORD forward. See |W|. - b | Beginning of word backward. See |b|. - B | Beginning of WORD backward. See |B|. - e | End of word forward. See |e|. - E | End of WORD forward. See |E|. - ge | End of word backward. See |ge|. - gE | End of WORD backward. See |gE|. - j | Line downward. See |j|. - k | Line upward. See |k|. - n | Jump to latest "/" or "?" forward. See |n|. - N | Jump to latest "/" or "?" backward. See |N|. - -See |easymotion-leader-key| and |mapleader| for details about the leader key. -See |easymotion-custom-mappings| for customizing the default mappings. - -============================================================================== -3. Requirements *easymotion-requirements* - -EasyMotion has been developed and tested in vim 7.3, but it should run without -any problems in vim 7.2. - -Vi-compatible mode must be disabled. - -============================================================================== -4. Configuration *easymotion-configuration* - -EasyMotion will work fine without any configuration, but you can override the -default behavior by setting configuration variables globally in your |vimrc| -file. - -Example (this will change the target keys and disable shading): > - - let g:EasyMotion_keys = '1234567890' - let g:EasyMotion_do_shade = 0 - ------------------------------------------------------------------------------- -4.1 EasyMotion_keys *EasyMotion_keys* - -Set the keys which will be used for motion targets. Add as many keys as you -want. There's a lower chance that the motion targets will be grouped if many -keys are available. - -Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' - ------------------------------------------------------------------------------- -4.2 EasyMotion_do_shade *EasyMotion_do_shade* - -The default behavior is to shade the text following the cursor (forward -motions) or preceding the cursor (backward motions) to make the motion targets -more visible. Set this option to 0 if you want to disable text shading. - -Default: 1 - ------------------------------------------------------------------------------- -4.3 EasyMotion_do_mapping *EasyMotion_do_mapping* - -Set this option to 0 if you want to disable the default mappings. See -|easymotion-default-mappings| for details about the default mappings. - -Note: If you disable this option, you'll have to map the motions yourself. See -the plugin source code for mapping details. You usually shouldn't need to do -this, see |easymotion-custom-mappings| for customizing the default mappings. - -Default: 1 - ------------------------------------------------------------------------------- -4.4 EasyMotion_grouping *EasyMotion_grouping* - -When there are too many possible targets on the screen, the results have to be -grouped. This configuration option lets you change which grouping algorithm -you want to use. There are two grouping algorithms available: - - * Single-key priority (value: 1) - ------------------- - - This algorithm prioritizes single-key jumps for the targets closest to - the cursor and only groups the last jump targets to maximize the amount - of single-key jumps. - - This algorithm works recursively and will work with as few keys as two. - - Example (with |EasyMotion_keys| = "abcdef"): > - - x x x x x x x x x -< - The |w| motion is triggered: > - - a b c d e f f f f - ^ ^ ^ ^ ^ Direct jump to target - ^ ^ ^ ^ Enter group "f" -< - * Original (value: 2) - -------- - - This is the original algorithm which always groups all targets if there - are too many possible motion targets. - - Example (with |EasyMotion_keys| = "abcdef"): > - - x x x x x x x x x -< - The |w| motion is triggered: > - - a a a a a a b b b - ^ ^ ^ ^ ^ ^ Enter group "a" - ^ ^ ^ Enter group "b" - -Default: 1 - ------------------------------------------------------------------------------- -4.5 Custom highlighting *easymotion-custom-hl* - -The default EasyMotion configuration uses two highlighting groups that link -to groups with default values. The highlighting groups are: - - * EasyMotionTarget - - Highlights motion targets, the default value is bold red - - * EasyMotionShade - - Highlights shaded text, the default value is dark gray - -There are two ways to override the default colors: - - 1) Set the highlighting in your color scheme - - This will only affect a single color scheme. The default red/gray colors - will be used if you change the color scheme to one that doesn't assign - any EasyMotion colors. - - Example: > - - hi EasyMotionTarget ctermbg=none ctermfg=green - hi EasyMotionShade ctermbg=none ctermfg=blue -< - 2) Set the highlighting in your vimrc - - This is ideal if you want to link the colors to highlighting groups that - are available in almost every color scheme, e.g. |ErrorMsg| (usually - bright red) and Comment (usually faded). You can be sure that the - color scheme's colors will be used instead of the default red/gray - if you choose this option. - - Example: > - - hi link EasyMotionTarget ErrorMsg - hi link EasyMotionShade Comment -< ------------------------------------------------------------------------------- -4.6 Custom mappings *easymotion-custom-mappings* - -EasyMotion allows you to customize all default mappings to avoid conflicts -with existing mappings. It is possible to change the default leader key -of all mappings to another key or sequence. It is also possible to fine -tune the plugin to your need by changing every single sequence. - -4.6.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key* - -The default leader key can be changed with the configuration option -|EasyMotion_leader_key|. - -Set this option to the key sequence to use as the prefix of the mappings -described in |easymotion-default-mappings|. - -Note: The default leader key has been changed to '' to -avoid conflicts with other plugins. You can revert to the original -leader by setting this option in your vimrc: > - - let g:EasyMotion_leader_key = '' -< -Default: '' - -4.6.2 Custom Keys *easymotion-custom-keys* - -All custom mappings follow the same variable format: > - - EasyMotion_mapping_{motion} = {mapping} -< -Example: > - - let g:EasyMotion_mapping_f = '_f' - let g:EasyMotion_mapping_T = '' -< -See |easymotion-default-mappings| for a table of motions that can be mapped -and their default values. - -Note: The leader key defined by |EasyMotion_leader_key| is not prepended to -your customized mappings! You have to provide full key sequences when setting -these options. - -============================================================================== -5. License *easymotion-license* - -Creative Commons Attribution-ShareAlike 3.0 Unported - -http://creativecommons.org/licenses/by-sa/3.0/ - -============================================================================== -6. Known bugs *easymotion-known-bugs* - -None. - -============================================================================== -7. Contributing *easymotion-contributing* - -If you experience any bugs or have feature requests, please open an issue on -GitHub. Fork the source repository on GitHub and send a pull request if you -have any code improvements. - -Author: Kim Silkebækken -Source repository: https://github.com/Lokaltog/vim-easymotion - -============================================================================== -8. Credits *easymotion-credits* - -- Ben Boeckel: ge and WORD motions -- Drew Neil: operator-pending mappings -- Rob O'Dwyer: customizable mappings without giving up all defaults -- Michel D'Hooge: customizable leader -- Maxime Bourget: search motion, improved JK motion behavior -- Kearn Holliday: fix jumplist issues -- Shougo Matsushita: fix CSApprox issue - -EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which -can be downloaded here: - -http://www.vim.org/scripts/script.php?script_id=3437 - -============================================================================== -vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/bundle/vim-easymotion/plugin/EasyMotion.vim b/bundle/vim-easymotion/plugin/EasyMotion.vim deleted file mode 100644 index fff29dca..00000000 --- a/bundle/vim-easymotion/plugin/EasyMotion.vim +++ /dev/null @@ -1,73 +0,0 @@ -" EasyMotion - Vim motions on speed! -" -" Author: Kim Silkebækken -" Source repository: https://github.com/Lokaltog/vim-easymotion - -" Script initialization {{{ - if exists('g:EasyMotion_loaded') || &compatible || version < 702 - finish - endif - - let g:EasyMotion_loaded = 1 -" }}} -" Default configuration {{{ - " Default options {{{ - call EasyMotion#InitOptions({ - \ 'leader_key' : '' - \ , 'keys' : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' - \ , 'do_shade' : 1 - \ , 'do_mapping' : 1 - \ , 'grouping' : 1 - \ - \ , 'hl_group_target' : 'EasyMotionTarget' - \ , 'hl_group_shade' : 'EasyMotionShade' - \ }) - " }}} - " Default highlighting {{{ - let s:target_hl_defaults = { - \ 'gui' : ['NONE', '#ff0000' , 'bold'] - \ , 'cterm256': ['NONE', '196' , 'bold'] - \ , 'cterm' : ['NONE', 'red' , 'bold'] - \ } - - let s:shade_hl_defaults = { - \ 'gui' : ['NONE', '#777777' , 'NONE'] - \ , 'cterm256': ['NONE', '242' , 'NONE'] - \ , 'cterm' : ['NONE', 'grey' , 'NONE'] - \ } - - call EasyMotion#InitHL(g:EasyMotion_hl_group_target, s:target_hl_defaults) - call EasyMotion#InitHL(g:EasyMotion_hl_group_shade, s:shade_hl_defaults) - - " Reset highlighting after loading a new color scheme {{{ - augroup EasyMotionInitHL - autocmd! - - autocmd ColorScheme * call EasyMotion#InitHL(g:EasyMotion_hl_group_target, s:target_hl_defaults) - autocmd ColorScheme * call EasyMotion#InitHL(g:EasyMotion_hl_group_shade, s:shade_hl_defaults) - augroup end - " }}} - " }}} - " Default key mapping {{{ - call EasyMotion#InitMappings({ - \ 'f' : { 'name': 'F' , 'dir': 0 } - \ , 'F' : { 'name': 'F' , 'dir': 1 } - \ , 't' : { 'name': 'T' , 'dir': 0 } - \ , 'T' : { 'name': 'T' , 'dir': 1 } - \ , 'w' : { 'name': 'WB' , 'dir': 0 } - \ , 'W' : { 'name': 'WBW', 'dir': 0 } - \ , 'b' : { 'name': 'WB' , 'dir': 1 } - \ , 'B' : { 'name': 'WBW', 'dir': 1 } - \ , 'e' : { 'name': 'E' , 'dir': 0 } - \ , 'E' : { 'name': 'EW' , 'dir': 0 } - \ , 'ge': { 'name': 'E' , 'dir': 1 } - \ , 'gE': { 'name': 'EW' , 'dir': 1 } - \ , 'j' : { 'name': 'JK' , 'dir': 0 } - \ , 'k' : { 'name': 'JK' , 'dir': 1 } - \ , 'n' : { 'name': 'Search' , 'dir': 0 } - \ , 'N' : { 'name': 'Search' , 'dir': 1 } - \ }) - " }}} -" }}} - -" vim: fdm=marker:noet:ts=4:sw=4:sts=4 diff --git a/bundle/vim-endwise b/bundle/vim-endwise deleted file mode 160000 index 9f05e4c0..00000000 --- a/bundle/vim-endwise +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9f05e4c0c6163ec52010b0e1e6f66605ae42302d diff --git a/bundle/vim-fugitive b/bundle/vim-fugitive deleted file mode 160000 index f096152a..00000000 --- a/bundle/vim-fugitive +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f096152a48bc2506bd460c9f990e50a159a7bbc5 diff --git a/bundle/vim-gitgutter b/bundle/vim-gitgutter deleted file mode 160000 index ff031d02..00000000 --- a/bundle/vim-gitgutter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff031d022f2123353bc93a3aa97290287c10a287 diff --git a/bundle/vim-golang b/bundle/vim-golang deleted file mode 160000 index e4f4d6de..00000000 --- a/bundle/vim-golang +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e4f4d6ded00b498e517939f9b01c828ec44de110 diff --git a/bundle/vim-haml b/bundle/vim-haml deleted file mode 160000 index 33279476..00000000 --- a/bundle/vim-haml +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 33279476a63276cf5858a568283407dd98d7eb74 diff --git a/bundle/vim-irblack b/bundle/vim-irblack deleted file mode 160000 index 59622caf..00000000 --- a/bundle/vim-irblack +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 59622caff32a7925181ab139701fad3eee54ae51 diff --git a/bundle/vim-javascript b/bundle/vim-javascript deleted file mode 160000 index b21629b3..00000000 --- a/bundle/vim-javascript +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b21629b371cc4b8ab76a59a6bc920082b00eb126 diff --git a/bundle/vim-markdown b/bundle/vim-markdown deleted file mode 160000 index 12ec4c1f..00000000 --- a/bundle/vim-markdown +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 12ec4c1fbf9b99275e138682b1078f7e15c50258 diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf.vim deleted file mode 100644 index fe9e6eba..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf.vim +++ /dev/null @@ -1,1046 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - - -" returns list of paths. -" An argument for glob() is normalized in order to avoid a bug on Windows. -function fuf#glob(expr) - " Substitutes "\", because on Windows, "**\" doesn't include ".\", - " but "**/" include "./". I don't know why. - return split(glob(substitute(a:expr, '\', '/', 'g')), "\n") -endfunction - -" -function fuf#countModifiedFiles(files, time) - return len(filter(copy(a:files), 'getftime(expand(v:val)) > a:time')) -endfunction - -" -function fuf#getCurrentTagFiles() - return sort(filter(map(tagfiles(), 'fnamemodify(v:val, '':p'')'), 'filereadable(v:val)')) -endfunction - -" -function fuf#mapToSetSerialIndex(in, offset) - for i in range(len(a:in)) - let a:in[i].index = i + a:offset - endfor - return a:in -endfunction - -" -function fuf#updateMruList(mrulist, newItem, maxItem, exclude) - let result = copy(a:mrulist) - let result = filter(result,'v:val.word !=# a:newItem.word') - let result = insert(result, a:newItem) - if len(a:exclude) - let result = filter(result, 'v:val.word !~ a:exclude') - endif - return result[0 : a:maxItem - 1] -endfunction - -" takes suffix number. if no digits, returns -1 -function fuf#suffixNumber(str) - let s = matchstr(a:str, '\d\+$') - return (len(s) ? str2nr(s) : -1) -endfunction - -" "foo/bar/buz/hoge" -> { head: "foo/bar/buz/", tail: "hoge" } -function fuf#splitPath(path) - let head = matchstr(a:path, '^.*[/\\]') - return { - \ 'head' : head, - \ 'tail' : a:path[strlen(head):] - \ } -endfunction - -" "foo/.../bar/...hoge" -> "foo/.../bar/../../hoge" -function fuf#expandTailDotSequenceToParentDir(pattern) - return substitute(a:pattern, '^\(.*[/\\]\)\?\zs\.\(\.\+\)\ze[^/\\]*$', - \ '\=repeat(".." . l9#getPathSeparator(), len(submatch(2)))', '') -endfunction - -" -function fuf#formatPrompt(prompt, partialMatching, otherString) - let indicator = escape((a:partialMatching ? '!' : '') . a:otherString, '\') - return substitute(a:prompt, '[]', indicator, 'g') -endfunction - -" -function fuf#getFileLines(file) - let bufnr = (type(a:file) ==# type(0) ? a:file : bufnr('^' . a:file . '$')) - let lines = getbufline(bufnr, 1, '$') - if !empty(lines) - return lines - endif - return l9#readFile(a:file) -endfunction - -" -function fuf#makePreviewLinesAround(lines, indices, page, maxHeight) - let index = ((empty(a:indices) ? 0 : a:indices[0]) - \ + a:page * a:maxHeight) % len(a:lines) - if empty(a:lines) || a:maxHeight <= 0 - return [] - endif - let beg = max([0, index - a:maxHeight / 2]) - let end = min([beg + a:maxHeight, len(a:lines)]) - let beg = max([0, end - a:maxHeight]) - let lines = [] - for i in range(beg, end - 1) - let mark = (count(a:indices, i) ? '>' : ' ') - call add(lines, printf('%s%4d ', mark, i + 1) . a:lines[i]) - endfor - return lines -endfunction - -" a:file: a path string or a buffer number -function fuf#makePreviewLinesForFile(file, count, maxHeight) - let lines = fuf#getFileLines(a:file) - if empty(lines) - return [] - endif - let bufnr = (type(a:file) ==# type(0) ? a:file : bufnr('^' . a:file . '$')) - if exists('s:bufferCursorPosMap[bufnr]') - let indices = [s:bufferCursorPosMap[bufnr][1] - 1] - else - let indices = [] - endif - return fuf#makePreviewLinesAround( - \ lines, indices, a:count, a:maxHeight) -endfunction - -" -function fuf#echoWarning(msg) - call l9#echoHl('WarningMsg', a:msg, '[fuf] ', 1) -endfunction - -" -function fuf#echoError(msg) - call l9#echoHl('ErrorMsg', a:msg, '[fuf] ', 1) -endfunction - -" -function fuf#openBuffer(bufNr, mode, reuse) - if a:reuse && ((a:mode ==# s:OPEN_TYPE_SPLIT && - \ l9#moveToBufferWindowInCurrentTabpage(a:bufNr)) || - \ (a:mode ==# s:OPEN_TYPE_VSPLIT && - \ l9#moveToBufferWindowInCurrentTabpage(a:bufNr)) || - \ (a:mode ==# s:OPEN_TYPE_TAB && - \ l9#moveToBufferWindowInOtherTabpage(a:bufNr))) - return - endif - execute printf({ - \ s:OPEN_TYPE_CURRENT : '%sbuffer' , - \ s:OPEN_TYPE_SPLIT : '%ssbuffer' , - \ s:OPEN_TYPE_VSPLIT : 'vertical %ssbuffer', - \ s:OPEN_TYPE_TAB : 'tab %ssbuffer' , - \ }[a:mode], a:bufNr) -endfunction - -" -function fuf#openFile(path, mode, reuse) - let bufNr = bufnr('^' . a:path . '$') - if bufNr > -1 - call fuf#openBuffer(bufNr, a:mode, a:reuse) - else - execute { - \ s:OPEN_TYPE_CURRENT : 'edit ' , - \ s:OPEN_TYPE_SPLIT : 'split ' , - \ s:OPEN_TYPE_VSPLIT : 'vsplit ' , - \ s:OPEN_TYPE_TAB : 'tabedit ', - \ }[a:mode] . fnameescape(fnamemodify(a:path, ':~:.')) - endif -endfunction - -" -function fuf#openTag(tag, mode) - execute { - \ s:OPEN_TYPE_CURRENT : 'tjump ' , - \ s:OPEN_TYPE_SPLIT : 'stjump ' , - \ s:OPEN_TYPE_VSPLIT : 'vertical stjump ', - \ s:OPEN_TYPE_TAB : 'tab stjump ' , - \ }[a:mode] . a:tag -endfunction - -" -function fuf#openHelp(tag, mode) - execute { - \ s:OPEN_TYPE_CURRENT : 'help ' , - \ s:OPEN_TYPE_SPLIT : 'help ' , - \ s:OPEN_TYPE_VSPLIT : 'vertical help ', - \ s:OPEN_TYPE_TAB : 'tab help ' , - \ }[a:mode] . a:tag -endfunction - -" -function fuf#prejump(mode) - execute { - \ s:OPEN_TYPE_CURRENT : '' , - \ s:OPEN_TYPE_SPLIT : 'split' , - \ s:OPEN_TYPE_VSPLIT : 'vsplit' , - \ s:OPEN_TYPE_TAB : 'tab split', - \ }[a:mode] -endfunction - -" -function fuf#compareRanks(i1, i2) - if exists('a:i1.ranks') && exists('a:i2.ranks') - for i in range(min([len(a:i1.ranks), len(a:i2.ranks)])) - if a:i1.ranks[i] > a:i2.ranks[i] - return +1 - elseif a:i1.ranks[i] < a:i2.ranks[i] - return -1 - endif - endfor - endif - return 0 -endfunction - -" -function fuf#makePathItem(fname, menu, appendsDirSuffix) - let pathPair = fuf#splitPath(a:fname) - let dirSuffix = (a:appendsDirSuffix && isdirectory(expand(a:fname)) - \ ? l9#getPathSeparator() - \ : '') - return { - \ 'word' : a:fname . dirSuffix, - \ 'wordForPrimaryHead': s:toLowerForIgnoringCase(pathPair.head), - \ 'wordForPrimaryTail': s:toLowerForIgnoringCase(pathPair.tail), - \ 'wordForBoundary' : s:toLowerForIgnoringCase(s:getWordBoundaries(pathPair.tail)), - \ 'wordForRefining' : s:toLowerForIgnoringCase(a:fname . dirSuffix), - \ 'wordForRank' : s:toLowerForIgnoringCase(pathPair.tail), - \ 'menu' : a:menu, - \ } -endfunction - -" -function fuf#makeNonPathItem(word, menu) - let wordL = s:toLowerForIgnoringCase(a:word) - return { - \ 'word' : a:word, - \ 'wordForPrimary' : wordL, - \ 'wordForBoundary': s:toLowerForIgnoringCase(s:getWordBoundaries(a:word)), - \ 'wordForRefining': wordL, - \ 'wordForRank' : wordL, - \ 'menu' : a:menu, - \ } -endfunction - -" -function fuf#makePatternSet(patternBase, interpreter, partialMatching) - let MakeMatchingExpr = function(a:partialMatching - \ ? 's:makePartialMatchingExpr' - \ : 's:makeFuzzyMatchingExpr') - let [primary; refinings] = split(a:patternBase, g:fuf_patternSeparator, 1) - let elements = call(a:interpreter, [primary]) - let primaryExprs = map(elements.matchingPairs, 'MakeMatchingExpr(v:val[0], v:val[1])') - let refiningExprs = map(refinings, 's:makeRefiningExpr(v:val)') - return { - \ 'primary' : elements.primary, - \ 'primaryForRank': elements.primaryForRank, - \ 'filteringExpr' : join(primaryExprs + refiningExprs, ' && '), - \ } -endfunction - -" -function fuf#enumExpandedDirsEntries(dir, exclude) - let entries = fuf#glob(a:dir . '*') + fuf#glob(a:dir . '.*') - " removes "*/." and "*/.." - call filter(entries, 'v:val !~ ''\v(^|[/\\])\.\.?$''') - call map(entries, 'fuf#makePathItem(v:val, "", 1)') - if len(a:exclude) - call filter(entries, 'v:val.word !~ a:exclude') - endif - return entries -endfunction - -" -function fuf#mapToSetAbbrWithSnippedWordAsPath(items) - let maxLenStats = {} - call map(a:items, 's:makeFileAbbrInfo(v:val, maxLenStats)') - let snippedHeads = - \ map(maxLenStats, 's:getSnippedHead(v:key[: -2], v:val)') - return map(a:items, 's:setAbbrWithFileAbbrData(v:val, snippedHeads)') -endfunction - -" -function fuf#setAbbrWithFormattedWord(item, abbrIndex) - let lenMenu = (exists('a:item.menu') ? len(a:item.menu) + 2 : 0) - let abbrPrefix = (exists('a:item.abbrPrefix') ? a:item.abbrPrefix : '') - let a:item.abbr = abbrPrefix . a:item.word - if a:abbrIndex - let a:item.abbr = printf('%4d: ', a:item.index) . a:item.abbr - endif - let a:item.abbr = l9#snipTail(a:item.abbr, g:fuf_maxMenuWidth - lenMenu, s:ABBR_SNIP_MASK) - return a:item -endfunction - -" -function s:onCommandPre() - for m in filter(copy(fuf#getModeNames()), 'fuf#{v:val}#requiresOnCommandPre()') - call fuf#{m}#onCommandPre(getcmdtype() . getcmdline()) - endfor - " lets last entry become the newest in the history - call histadd(getcmdtype(), getcmdline()) - " this is not mapped again (:help recursive_mapping) - return "\" -endfunction - -" -let s:modeNames = [] - -" -function fuf#addMode(modeName) - if count(g:fuf_modesDisable, a:modeName) > 0 - return - endif - call add(s:modeNames, a:modeName) - call fuf#{a:modeName}#renewCache() - call fuf#{a:modeName}#onInit() - if fuf#{a:modeName}#requiresOnCommandPre() - " cnoremap has a problem, which doesn't expand cabbrev. - cmap onCommandPre() - endif -endfunction - -" -function fuf#getModeNames() - return s:modeNames -endfunction - -" -function fuf#defineLaunchCommand(CmdName, modeName, prefixInitialPattern, tempVars) - if empty(a:tempVars) - let preCmd = '' - else - let preCmd = printf('call l9#tempvariables#setList(%s, %s) | ', - \ string(s:TEMP_VARIABLES_GROUP), string(a:tempVars)) - endif - execute printf('command! -range -bang -narg=? %s %s call fuf#launch(%s, %s . , len())', - \ a:CmdName, preCmd, string(a:modeName), a:prefixInitialPattern) -endfunction - -" -function fuf#defineKeyMappingInHandler(key, func) - " hacks to be able to use feedkeys(). - execute printf( - \ 'inoremap %s =fuf#getRunningHandler().%s ? "" : ""', - \ a:key, a:func) -endfunction - -" -let s:oneTimeVariables = [] - -" -function fuf#setOneTimeVariables(...) - let s:oneTimeVariables += a:000 -endfunction - -" -function fuf#launch(modeName, initialPattern, partialMatching) - if exists('s:runningHandler') - call fuf#echoWarning('FuzzyFinder is running.') - endif - if count(fuf#getModeNames(), a:modeName) == 0 - echoerr 'This mode is not available: ' . a:modeName - return - endif - let s:runningHandler = fuf#{a:modeName}#createHandler(copy(s:handlerBase)) - let s:runningHandler.stats = fuf#loadDataFile(s:runningHandler.getModeName(), 'stats') - let s:runningHandler.partialMatching = a:partialMatching - let s:runningHandler.bufNrPrev = bufnr('%') - let s:runningHandler.lastCol = -1 - let s:runningHandler.windowRestoringCommand = winrestcmd() - call s:runningHandler.onModeEnterPre() - " NOTE: updatetime is set, because in Buffer-Tag mode on Vim 7.3 on Windows, - " Vim keeps from triggering CursorMovedI for updatetime after system() is - " called. I don't know why. - call fuf#setOneTimeVariables( - \ ['&completeopt', 'menuone'], - \ ['&ignorecase', 0], - \ ['&updatetime', 10], - \ ) - if s:runningHandler.getPreviewHeight() > 0 - call fuf#setOneTimeVariables( - \ ['&cmdheight', s:runningHandler.getPreviewHeight() + 1]) - endif - call l9#tempvariables#setList(s:TEMP_VARIABLES_GROUP, s:oneTimeVariables) - let s:oneTimeVariables = [] - call s:activateFufBuffer() - augroup FufLocal - autocmd! - autocmd CursorMovedI call s:runningHandler.onCursorMovedI() - autocmd InsertLeave nested call s:runningHandler.onInsertLeave() - augroup END - for [key, func] in [ - \ [ g:fuf_keyOpen , 'onCr(' . s:OPEN_TYPE_CURRENT . ')' ], - \ [ g:fuf_keyOpenSplit , 'onCr(' . s:OPEN_TYPE_SPLIT . ')' ], - \ [ g:fuf_keyOpenVsplit , 'onCr(' . s:OPEN_TYPE_VSPLIT . ')' ], - \ [ g:fuf_keyOpenTabpage , 'onCr(' . s:OPEN_TYPE_TAB . ')' ], - \ [ '' , 'onBs()' ], - \ [ '' , 'onBs()' ], - \ [ '' , 'onDeleteWord()' ], - \ [ g:fuf_keyPreview , 'onPreviewBase(1)' ], - \ [ g:fuf_keyNextMode , 'onSwitchMode(+1)' ], - \ [ g:fuf_keyPrevMode , 'onSwitchMode(-1)' ], - \ [ g:fuf_keySwitchMatching, 'onSwitchMatching()' ], - \ [ g:fuf_keyPrevPattern , 'onRecallPattern(+1)' ], - \ [ g:fuf_keyNextPattern , 'onRecallPattern(-1)' ], - \ ] - call fuf#defineKeyMappingInHandler(key, func) - endfor - " Starts Insert mode and makes CursorMovedI event now. Command prompt is - " needed to forces a completion menu to update every typing. - call setline(1, s:runningHandler.getPrompt() . a:initialPattern) - call s:runningHandler.onModeEnterPost() - call feedkeys("A", 'n') " startinsert! does not work in InsertLeave event handler - redraw -endfunction - -" -function fuf#loadDataFile(modeName, dataName) - if !s:dataFileAvailable - return [] - endif - let lines = l9#readFile(l9#concatPaths([g:fuf_dataDir, a:modeName, a:dataName])) - return map(lines, 'eval(v:val)') -endfunction - -" -function fuf#saveDataFile(modeName, dataName, items) - if !s:dataFileAvailable - return -1 - endif - let lines = map(copy(a:items), 'string(v:val)') - return l9#writeFile(lines, l9#concatPaths([g:fuf_dataDir, a:modeName, a:dataName])) -endfunction - -" -function fuf#getDataFileTime(modeName, dataName) - if !s:dataFileAvailable - return -1 - endif - return getftime(expand(l9#concatPaths([g:fuf_dataDir, a:modeName, a:dataName]))) -endfunction - -" -function s:createDataBufferListener(dataFile) - let listener = { 'dataFile': a:dataFile } - - function listener.onWrite(lines) - let [modeName, dataName] = split(self.dataFile, l9#getPathSeparator()) - let items = map(filter(a:lines, '!empty(v:val)'), 'eval(v:val)') - call fuf#saveDataFile(modeName, dataName, items) - echo "Data files updated" - return 1 - endfunction - - return listener -endfunction - -" -function s:createEditDataListener() - let listener = {} - - function listener.onComplete(dataFile, method) - let bufName = '[fuf-info]' - let lines = l9#readFile(l9#concatPaths([g:fuf_dataDir, a:dataFile])) - call l9#tempbuffer#openWritable(bufName, 'vim', lines, 0, 0, 0, - \ s:createDataBufferListener(a:dataFile)) - endfunction - - return listener -endfunction - -" -function s:getEditableDataFiles(modeName) - let dataFiles = fuf#{a:modeName}#getEditableDataNames() - call filter(dataFiles, 'fuf#getDataFileTime(a:modeName, v:val) != -1') - return map(dataFiles, 'l9#concatPaths([a:modeName, v:val])') -endfunction - -" -function fuf#editDataFile() - let dataFiles = map(copy(fuf#getModeNames()), 's:getEditableDataFiles(v:val)') - let dataFiles = l9#concat(dataFiles) - call fuf#callbackitem#launch('', 0, '>Mode>', s:createEditDataListener(), dataFiles, 0) -endfunction - -" -function fuf#getRunningHandler() - return s:runningHandler -endfunction - -" -function fuf#onComplete(findstart, base) - return s:runningHandler.onComplete(a:findstart, a:base) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:TEMP_VARIABLES_GROUP = expand(':p') -let s:ABBR_SNIP_MASK = '...' -let s:OPEN_TYPE_CURRENT = 1 -let s:OPEN_TYPE_SPLIT = 2 -let s:OPEN_TYPE_VSPLIT = 3 -let s:OPEN_TYPE_TAB = 4 - -" a:pattern: 'str' -> '\V\.\*s\.\*t\.\*r\.\*' -function s:makeFuzzyMatchingExpr(target, pattern) - let wi = '' - for c in split(a:pattern, '\zs') - if wi =~# '[^*?]$' && c !~ '[*?]' - let wi .= '*' - endif - let wi .= c - endfor - return s:makePartialMatchingExpr(a:target, wi) -endfunction - -" a:pattern: 'str' -> '\Vstr' -" 'st*r' -> '\Vst\.\*r' -function s:makePartialMatchingExpr(target, pattern) - let patternMigemo = s:makeAdditionalMigemoPattern(a:pattern) - if a:pattern !~ '[*?]' && empty(patternMigemo) - " NOTE: stridx is faster than regexp matching - return 'stridx(' . a:target . ', ' . string(a:pattern) . ') >= 0' - endif - return a:target . ' =~# ' . - \ string(l9#convertWildcardToRegexp(a:pattern)) . patternMigemo -endfunction - -" -function s:makeRefiningExpr(pattern) - if g:fuf_fuzzyRefining - let expr = s:makeFuzzyMatchingExpr('v:val.wordForRefining', a:pattern) - else - let expr = s:makePartialMatchingExpr('v:val.wordForRefining', a:pattern) - endif - if a:pattern =~# '\D' - return expr - else - return '(' . expr . ' || v:val.index == ' . string(a:pattern) . ')' - endif -endfunction - -" -function s:makeAdditionalMigemoPattern(pattern) - if !g:fuf_useMigemo || a:pattern =~# '[^\x01-\x7e]' - return '' - endif - return '\|\m' . substitute(migemo(a:pattern), '\\_s\*', '.*', 'g') -endfunction - -" -function s:interpretPrimaryPatternForPathTail(pattern) - let pattern = fuf#expandTailDotSequenceToParentDir(a:pattern) - let pairL = fuf#splitPath(s:toLowerForIgnoringCase(pattern)) - return { - \ 'primary' : pattern, - \ 'primaryForRank': pairL.tail, - \ 'matchingPairs' : [['v:val.wordForPrimaryTail', pairL.tail],], - \ } -endfunction - -" -function s:interpretPrimaryPatternForPath(pattern) - let pattern = fuf#expandTailDotSequenceToParentDir(a:pattern) - let patternL = s:toLowerForIgnoringCase(pattern) - let pairL = fuf#splitPath(patternL) - if g:fuf_splitPathMatching - let matches = [ - \ ['v:val.wordForPrimaryHead', pairL.head], - \ ['v:val.wordForPrimaryTail', pairL.tail], - \ ] - else - let matches = [ - \ ['v:val.wordForPrimaryHead . v:val.wordForPrimaryTail', patternL], - \ ] - endif - return { - \ 'primary' : pattern, - \ 'primaryForRank': pairL.tail, - \ 'matchingPairs' : matches, - \ } -endfunction - -" -function s:interpretPrimaryPatternForNonPath(pattern) - let patternL = s:toLowerForIgnoringCase(a:pattern) - return { - \ 'primary' : a:pattern, - \ 'primaryForRank': patternL, - \ 'matchingPairs' : [['v:val.wordForPrimary', patternL],], - \ } -endfunction - -" -function s:getWordBoundaries(word) - return substitute(a:word, '\a\zs\l\+\|\zs\A', '', 'g') -endfunction - -" -function s:toLowerForIgnoringCase(str) - return (g:fuf_ignoreCase ? tolower(a:str) : a:str) -endfunction - -" -function s:setRanks(item, pattern, exprBoundary, stats) - "let word2 = substitute(a:eval_word, '\a\zs\l\+\|\zs\A', '', 'g') - let a:item.ranks = [ - \ s:evaluateLearningRank(a:item.word, a:stats), - \ -s:scoreSequentialMatching(a:item.wordForRank, a:pattern), - \ -s:scoreBoundaryMatching(a:item.wordForBoundary, - \ a:pattern, a:exprBoundary), - \ a:item.index, - \ ] - return a:item -endfunction - -" -function s:evaluateLearningRank(word, stats) - for i in range(len(a:stats)) - if a:stats[i].word ==# a:word - return i - endif - endfor - return len(a:stats) -endfunction - -" range of return value is [0.0, 1.0] -function s:scoreSequentialMatching(word, pattern) - if empty(a:pattern) - return str2float('0.0') - endif - let pos = stridx(a:word, a:pattern) - if pos < 0 - return str2float('0.0') - endif - let lenRest = len(a:word) - len(a:pattern) - pos - return str2float(pos == 0 ? '0.5' : '0.0') + str2float('0.5') / (lenRest + 1) -endfunction - -" range of return value is [0.0, 1.0] -function s:scoreBoundaryMatching(wordForBoundary, pattern, exprBoundary) - if empty(a:pattern) - return str2float('0.0') - endif - if !eval(a:exprBoundary) - return 0 - endif - return (s:scoreSequentialMatching(a:wordForBoundary, a:pattern) + 1) / 2 -endfunction - -" -function s:highlightPrompt(prompt) - syntax clear - execute printf('syntax match %s /^\V%s/', g:fuf_promptHighlight, escape(a:prompt, '\/')) -endfunction - -" -function s:highlightError() - syntax clear - syntax match Error /^.*$/ -endfunction - -" -function s:expandAbbrevMap(pattern, abbrevMap) - let result = [a:pattern] - for [pattern, subs] in items(a:abbrevMap) - let exprs = result - let result = [] - for expr in exprs - let result += map(copy(subs), 'substitute(expr, pattern, escape(v:val, ''\''), "g")') - endfor - endfor - return l9#unique(result) -endfunction - -" -function s:makeFileAbbrInfo(item, maxLenStats) - let head = matchstr(a:item.word, '^.*[/\\]\ze.') - let a:item.abbr = { 'head' : head, - \ 'tail' : a:item.word[strlen(head):], - \ 'key' : head . '.', - \ 'prefix' : printf('%4d: ', a:item.index), } - if exists('a:item.abbrPrefix') - let a:item.abbr.prefix .= a:item.abbrPrefix - endif - let len = len(a:item.abbr.prefix) + len(a:item.word) + - \ (exists('a:item.menu') ? len(a:item.menu) + 2 : 0) - if !exists('a:maxLenStats[a:item.abbr.key]') || len > a:maxLenStats[a:item.abbr.key] - let a:maxLenStats[a:item.abbr.key] = len - endif - return a:item -endfunction - -" -function s:getSnippedHead(head, baseLen) - return l9#snipMid(a:head, len(a:head) + g:fuf_maxMenuWidth - a:baseLen, s:ABBR_SNIP_MASK) -endfunction - -" -function s:setAbbrWithFileAbbrData(item, snippedHeads) - let lenMenu = (exists('a:item.menu') ? len(a:item.menu) + 2 : 0) - let abbr = a:item.abbr.prefix . a:snippedHeads[a:item.abbr.key] . a:item.abbr.tail - let a:item.abbr = l9#snipTail(abbr, g:fuf_maxMenuWidth - lenMenu, s:ABBR_SNIP_MASK) - return a:item -endfunction - -" -let s:FUF_BUF_NAME = '[fuf]' - -" -function s:activateFufBuffer() - " lcd . : To avoid the strange behavior that unnamed buffer changes its cwd - " if 'autochdir' was set on. - lcd . - let cwd = getcwd() - call l9#tempbuffer#openScratch(s:FUF_BUF_NAME, 'fuf', [], 1, 0, 1, {}) - resize 1 " for issue #21 - " lcd ... : countermeasure against auto-cd script - lcd `=cwd` - setlocal nocursorline " for highlighting - setlocal nocursorcolumn " for highlighting - setlocal omnifunc=fuf#onComplete - redraw " for 'lazyredraw' - if exists(':AcpLock') - AcpLock - elseif exists(':AutoComplPopLock') - AutoComplPopLock - endif -endfunction - -" -function s:deactivateFufBuffer() - if exists(':AcpUnlock') - AcpUnlock - elseif exists(':AutoComplPopUnlock') - AutoComplPopUnlock - endif - call l9#tempbuffer#close(s:FUF_BUF_NAME) -endfunction - -" }}}1 -"============================================================================= -" s:handlerBase {{{1 - -let s:handlerBase = {} - -"----------------------------------------------------------------------------- -" PURE VIRTUAL FUNCTIONS {{{2 -" -" " -" s:handler.getModeName() -" -" " -" s:handler.getPrompt() -" -" " -" s:handler.getCompleteItems(patternSet) -" -" " -" s:handler.onOpen(word, mode) -" -" " Before entering FuzzyFinder buffer. This function should return in a short time. -" s:handler.onModeEnterPre() -" -" " After entering FuzzyFinder buffer. -" s:handler.onModeEnterPost() -" -" " After leaving FuzzyFinder buffer. -" s:handler.onModeLeavePost(opened) -" -" }}}2 -"----------------------------------------------------------------------------- - -" -function s:handlerBase.concretize(deriv) - call extend(self, a:deriv, 'error') - return self -endfunction - -" -function s:handlerBase.addStat(pattern, word) - let stat = { 'pattern' : a:pattern, 'word' : a:word } - call filter(self.stats, 'v:val !=# stat') - call insert(self.stats, stat) - let self.stats = self.stats[0 : g:fuf_learningLimit - 1] -endfunction - -" -function s:handlerBase.getMatchingCompleteItems(patternBase) - let MakeMatchingExpr = function(self.partialMatching - \ ? 's:makePartialMatchingExpr' - \ : 's:makeFuzzyMatchingExpr') - let patternSet = self.makePatternSet(a:patternBase) - let exprBoundary = s:makeFuzzyMatchingExpr('a:wordForBoundary', patternSet.primaryForRank) - let stats = filter( - \ copy(self.stats), 'v:val.pattern ==# patternSet.primaryForRank') - let items = self.getCompleteItems(patternSet.primary) - " NOTE: In order to know an excess, plus 1 to limit number - let items = l9#filterWithLimit( - \ items, patternSet.filteringExpr, g:fuf_enumeratingLimit + 1) - return map(items, - \ 's:setRanks(v:val, patternSet.primaryForRank, exprBoundary, stats)') -endfunction - -" -function s:handlerBase.onComplete(findstart, base) - if a:findstart - return 0 - elseif !self.existsPrompt(a:base) - return [] - endif - call s:highlightPrompt(self.getPrompt()) - let items = [] - for patternBase in s:expandAbbrevMap(self.removePrompt(a:base), g:fuf_abbrevMap) - let items += self.getMatchingCompleteItems(patternBase) - if len(items) > g:fuf_enumeratingLimit - let items = items[ : g:fuf_enumeratingLimit - 1] - call s:highlightError() - break - endif - endfor - if empty(items) - call s:highlightError() - else - call sort(items, 'fuf#compareRanks') - if g:fuf_autoPreview - call feedkeys("\\\=fuf#getRunningHandler().onPreviewBase(0) ? '' : ''\", 'n') - else - call feedkeys("\\", 'n') - endif - let self.lastFirstWord = items[0].word - endif - return items -endfunction - -" -function s:handlerBase.existsPrompt(line) - return strlen(a:line) >= strlen(self.getPrompt()) && - \ a:line[:strlen(self.getPrompt()) -1] ==# self.getPrompt() -endfunction - -" -function s:handlerBase.removePrompt(line) - return a:line[(self.existsPrompt(a:line) ? strlen(self.getPrompt()) : 0):] -endfunction - -" -function s:handlerBase.restorePrompt(line) - let i = 0 - while i < len(self.getPrompt()) && i < len(a:line) && self.getPrompt()[i] ==# a:line[i] - let i += 1 - endwhile - return self.getPrompt() . a:line[i : ] -endfunction - -" -function s:handlerBase.onCursorMovedI() - if !self.existsPrompt(getline('.')) - call setline('.', self.restorePrompt(getline('.'))) - call feedkeys("\", 'n') - elseif col('.') <= len(self.getPrompt()) - " if the cursor is moved before command prompt - call feedkeys(repeat("\", len(self.getPrompt()) - col('.') + 1), 'n') - elseif col('.') > strlen(getline('.')) && col('.') != self.lastCol - " if the cursor is placed on the end of the line and has been actually moved. - let self.lastCol = col('.') - let self.lastPattern = self.removePrompt(getline('.')) - call feedkeys("\\", 'n') - endif -endfunction - -" -function s:handlerBase.onInsertLeave() - unlet s:runningHandler - let tempVars = l9#tempvariables#getList(s:TEMP_VARIABLES_GROUP) - call l9#tempvariables#end(s:TEMP_VARIABLES_GROUP) - call s:deactivateFufBuffer() - call fuf#saveDataFile(self.getModeName(), 'stats', self.stats) - execute self.windowRestoringCommand - let fOpen = exists('s:reservedCommand') - if fOpen - call self.onOpen(s:reservedCommand[0], s:reservedCommand[1]) - unlet s:reservedCommand - endif - call self.onModeLeavePost(fOpen) - if exists('self.reservedMode') - call l9#tempvariables#setList(s:TEMP_VARIABLES_GROUP, tempVars) - call fuf#launch(self.reservedMode, self.lastPattern, self.partialMatching) - endif -endfunction - -" -function s:handlerBase.onCr(openType) - if pumvisible() - call feedkeys(printf("\\=fuf#getRunningHandler().onCr(%d) ? '' : ''\", - \ a:openType), 'n') - return - endif - if !empty(self.lastPattern) - call self.addStat(self.lastPattern, self.removePrompt(getline('.'))) - endif - if !self.isOpenable(getline('.')) - " To clear i_ expression (fuf#getRunningHandler().onCr...) - echo '' - return - endif - let s:reservedCommand = [self.removePrompt(getline('.')), a:openType] - call feedkeys("\", 'n') " stopinsert behavior is strange... -endfunction - -" -function s:handlerBase.onBs() - call feedkeys((pumvisible() ? "\\" : "\"), 'n') -endfunction - -" -function s:getLastBlockLength(pattern, patternIsPath) - let separatorPos = strridx(a:pattern, g:fuf_patternSeparator) - if separatorPos >= 0 - return len(a:pattern) - separatorPos - endif - if a:patternIsPath && a:pattern =~# '[/\\].' - return len(matchstr(a:pattern, '[^/\\]*.$')) - endif - return len(a:pattern) -endfunction - -" -function s:handlerBase.onDeleteWord() - let pattern = self.removePrompt(getline('.')[ : col('.') - 2]) - let numBs = s:getLastBlockLength(pattern, 1) - call feedkeys((pumvisible() ? "\" : "") . repeat("\", numBs), 'n') -endfunction - -" -function s:handlerBase.onPreviewBase(repeatable) - if self.getPreviewHeight() <= 0 - return - elseif !pumvisible() - return - elseif !self.existsPrompt(getline('.')) - let word = self.removePrompt(getline('.')) - elseif !exists('self.lastFirstWord') - return - else - let word = self.lastFirstWord - endif - redraw - if a:repeatable && exists('self.lastPreviewInfo') && self.lastPreviewInfo.word ==# word - let self.lastPreviewInfo.count += 1 - else - let self.lastPreviewInfo = {'word': word, 'count': 0} - endif - let lines = self.makePreviewLines(word, self.lastPreviewInfo.count) - let lines = lines[: self.getPreviewHeight() - 1] - call map(lines, 'substitute(v:val, "\t", repeat(" ", &tabstop), "g")') - call map(lines, 'strtrans(v:val)') - call map(lines, 'l9#snipTail(v:val, &columns - 1, s:ABBR_SNIP_MASK)') - echo join(lines, "\n") -endfunction - -" -function s:handlerBase.onSwitchMode(shift) - let modes = copy(fuf#getModeNames()) - call map(modes, '{ "ranks": [ fuf#{v:val}#getSwitchOrder(), v:val ] }') - call filter(modes, 'v:val.ranks[0] >= 0') - call sort(modes, 'fuf#compareRanks') - let self.reservedMode = self.getModeName() - for i in range(len(modes)) - if modes[i].ranks[1] ==# self.getModeName() - let self.reservedMode = modes[(i + a:shift) % len(modes)].ranks[1] - break - endif - endfor - call feedkeys("\", 'n') " stopinsert doesn't work. -endfunction - -" -function s:handlerBase.onSwitchMatching() - let self.partialMatching = !self.partialMatching - let self.lastCol = -1 - call setline('.', self.restorePrompt(self.lastPattern)) - call feedkeys("\", 'n') - "call self.onCursorMovedI() -endfunction - -" -function s:handlerBase.onRecallPattern(shift) - let patterns = map(copy(self.stats), 'v:val.pattern') - if !exists('self.indexRecall') - let self.indexRecall = -1 - endif - let self.indexRecall += a:shift - if self.indexRecall < 0 - let self.indexRecall = -1 - elseif self.indexRecall >= len(patterns) - let self.indexRecall = len(patterns) - 1 - else - call setline('.', self.getPrompt() . patterns[self.indexRecall]) - call feedkeys("\", 'n') - endif -endfunction - -" }}}1 -"============================================================================= -" INITIALIZATION {{{1 - -augroup FufGlobal - autocmd! - autocmd BufLeave * let s:bufferCursorPosMap[bufnr('')] = getpos('.') -augroup END - -let s:bufferCursorPosMap = {} - -" -let s:DATA_FILE_VERSION = 400 - -" -function s:checkDataFileCompatibility() - if empty(g:fuf_dataDir) - let s:dataFileAvailable = 0 - return - endif - let versionPath = l9#concatPaths([g:fuf_dataDir, 'VERSION']) - let lines = l9#readFile(versionPath) - if empty(lines) - call l9#writeFile([s:DATA_FILE_VERSION], versionPath) - let s:dataFileAvailable = 1 - elseif str2nr(lines[0]) == s:DATA_FILE_VERSION - let s:dataFileAvailable = 1 - else - call fuf#echoWarning(printf( - \ "=======================================================\n" . - \ " Existing data files for FuzzyFinder is no longer \n" . - \ " compatible with this version of FuzzyFinder. Remove \n" . - \ " %-53s\n" . - \ "=======================================================\n" , - \ string(g:fuf_dataDir))) - call l9#inputHl('Question', 'Press Enter') - let s:dataFileAvailable = 0 - endif -endfunction - -call s:checkDataFileCompatibility() - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkdir.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkdir.vim deleted file mode 100644 index 01585ffc..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkdir.vim +++ /dev/null @@ -1,163 +0,0 @@ -"============================================================================= -" Copyright (c) 2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#bookmarkdir#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#bookmarkdir#getSwitchOrder() - return g:fuf_bookmarkdir_switchOrder -endfunction - -" -function fuf#bookmarkdir#getEditableDataNames() - return ['items'] -endfunction - -" -function fuf#bookmarkdir#renewCache() -endfunction - -" -function fuf#bookmarkdir#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#bookmarkdir#onInit() - call fuf#defineLaunchCommand('FufBookmarkDir', s:MODE_NAME, '""', []) - command! -bang -narg=? FufBookmarkDirAdd call s:bookmark() -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') -let s:OPEN_TYPE_DELETE = -1 - -" -function s:bookmark(word) - let item = { - \ 'time' : localtime(), - \ } - - let item.path = l9#inputHl('Question', '[fuf] Directory to bookmark:', - \ fnamemodify(getcwd(), ':p:~'), 'dir') - if item.path !~ '\S' - call fuf#echoWarning('Canceled') - return - endif - let item.word = l9#inputHl('Question', '[fuf] Bookmark as:', - \ fnamemodify(getcwd(), ':p:~')) - if item.word !~ '\S' - call fuf#echoWarning('Canceled') - return - endif - let items = fuf#loadDataFile(s:MODE_NAME, 'items') - call insert(items, item) - call fuf#saveDataFile(s:MODE_NAME, 'items', items) -endfunction - -" -function s:findItem(items, word) - for item in a:items - if item.word ==# a:word - return item - endif - endfor - return {} -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_bookmarkdir_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return 0 -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return [] -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - if a:mode ==# s:OPEN_TYPE_DELETE - let items = fuf#loadDataFile(s:MODE_NAME, 'items') - call filter(items, 'v:val.word !=# a:word') - call fuf#saveDataFile(s:MODE_NAME, 'items', items) - let self.reservedMode = self.getModeName() - return - else - let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word) - if !empty(item) - execute ':cd ' . fnameescape(item.path) - endif - endif -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - call fuf#defineKeyMappingInHandler(g:fuf_bookmarkdir_keyDelete, - \ 'onCr(' . s:OPEN_TYPE_DELETE . ')') - let self.items = fuf#loadDataFile(s:MODE_NAME, 'items') - call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))') - call fuf#mapToSetSerialIndex(self.items, 1) - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkfile.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkfile.vim deleted file mode 100644 index 12ac80f6..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/bookmarkfile.vim +++ /dev/null @@ -1,199 +0,0 @@ -"============================================================================= -" Copyright (c) 2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#bookmarkfile#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#bookmarkfile#getSwitchOrder() - return g:fuf_bookmarkfile_switchOrder -endfunction - -" -function fuf#bookmarkfile#getEditableDataNames() - return ['items'] -endfunction - -" -function fuf#bookmarkfile#renewCache() -endfunction - -" -function fuf#bookmarkfile#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#bookmarkfile#onInit() - call fuf#defineLaunchCommand('FufBookmarkFile', s:MODE_NAME, '""', []) - command! -bang -narg=? FufBookmarkFileAdd call s:bookmarkHere() - command! -bang -narg=0 -range FufBookmarkFileAddAsSelectedText call s:bookmarkHere(l9#getSelectedText()) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') -let s:OPEN_TYPE_DELETE = -1 - -" opens a:path and jumps to the line matching to a:pattern from a:lnum within -" a:range. if not found, jumps to a:lnum. -function s:jumpToBookmark(path, mode, pattern, lnum) - call fuf#openFile(a:path, a:mode, g:fuf_reuseWindow) - call cursor(s:getMatchingLineNumber(getline(1, '$'), a:pattern, a:lnum), 0) - normal! zvzz -endfunction - -" -function s:getMatchingLineNumber(lines, pattern, lnumBegin) - let l = min([a:lnumBegin, len(a:lines)]) - for [l0, l1] in map(range(0, g:fuf_bookmarkfile_searchRange), - \ '[l + v:val, l - v:val]') - if l0 <= len(a:lines) && a:lines[l0 - 1] =~# a:pattern - return l0 - elseif l1 >= 0 && a:lines[l1 - 1] =~# a:pattern - return l1 - endif - endfor - return l -endfunction - -" -function s:getLinePattern(lnum) - return '\C\V\^' . escape(getline(a:lnum), '\') . '\$' -endfunction - -" -function s:bookmarkHere(word) - if !empty(&buftype) || expand('%') !~ '\S' - call fuf#echoWarning('Can''t bookmark this buffer.') - return - endif - let item = { - \ 'word' : (a:word =~# '\S' ? substitute(a:word, '\n', ' ', 'g') - \ : pathshorten(expand('%:p:~')) . '|' . line('.') . '| ' . getline('.')), - \ 'path' : expand('%:p'), - \ 'lnum' : line('.'), - \ 'pattern' : s:getLinePattern(line('.')), - \ 'time' : localtime(), - \ } - let item.word = l9#inputHl('Question', '[fuf] Bookmark as:', item.word) - if item.word !~ '\S' - call fuf#echoWarning('Canceled') - return - endif - let items = fuf#loadDataFile(s:MODE_NAME, 'items') - call insert(items, item) - call fuf#saveDataFile(s:MODE_NAME, 'items', items) -endfunction - -" -function s:findItem(items, word) - for item in a:items - if item.word ==# a:word - return item - endif - endfor - return {} -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_bookmarkfile_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word) - let lines = fuf#getFileLines(item.path) - if empty(lines) - return [] - endif - let index = s:getMatchingLineNumber(lines, item.pattern, item.lnum) - 1 - return fuf#makePreviewLinesAround( - \ lines, [index], a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - if a:mode ==# s:OPEN_TYPE_DELETE - let items = fuf#loadDataFile(s:MODE_NAME, 'items') - call filter(items, 'v:val.word !=# a:word') - call fuf#saveDataFile(s:MODE_NAME, 'items', items) - let self.reservedMode = self.getModeName() - return - else - let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word) - if !empty(item) - call s:jumpToBookmark(item.path, a:mode, item.pattern, item.lnum) - endif - endif -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - call fuf#defineKeyMappingInHandler(g:fuf_bookmarkfile_keyDelete, - \ 'onCr(' . s:OPEN_TYPE_DELETE . ')') - let self.items = fuf#loadDataFile(s:MODE_NAME, 'items') - call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))') - call fuf#mapToSetSerialIndex(self.items, 1) - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffer.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffer.vim deleted file mode 100644 index 08b954ab..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffer.vim +++ /dev/null @@ -1,189 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#buffer#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#buffer#getSwitchOrder() - return g:fuf_buffer_switchOrder -endfunction - -" -function fuf#buffer#getEditableDataNames() - return [] -endfunction - -" -function fuf#buffer#renewCache() -endfunction - -" -function fuf#buffer#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#buffer#onInit() - call fuf#defineLaunchCommand('FufBuffer', s:MODE_NAME, '""', []) - augroup fuf#buffer - autocmd! - autocmd BufEnter * call s:updateBufTimes() - autocmd BufWritePost * call s:updateBufTimes() - augroup END -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') -let s:OPEN_TYPE_DELETE = -1 - -let s:bufTimes = {} - -" -function s:updateBufTimes() - let s:bufTimes[bufnr('%')] = localtime() -endfunction - -" -function s:makeItem(nr) - let fname = (empty(bufname(a:nr)) - \ ? '[No Name]' - \ : fnamemodify(bufname(a:nr), ':p:~:.')) - let time = (exists('s:bufTimes[a:nr]') ? s:bufTimes[a:nr] : 0) - let item = fuf#makePathItem(fname, strftime(g:fuf_timeFormat, time), 0) - let item.index = a:nr - let item.bufNr = a:nr - let item.time = time - let item.abbrPrefix = s:getBufIndicator(a:nr) . ' ' - return item -endfunction - -" -function s:getBufIndicator(bufNr) - if !getbufvar(a:bufNr, '&modifiable') - return '[-]' - elseif getbufvar(a:bufNr, '&modified') - return '[+]' - elseif getbufvar(a:bufNr, '&readonly') - return '[R]' - else - return ' ' - endif -endfunction - -" -function s:compareTimeDescending(i1, i2) - return a:i1.time == a:i2.time ? 0 : a:i1.time > a:i2.time ? -1 : +1 -endfunction - -" -function s:findItem(items, word) - for item in a:items - if item.word ==# a:word - return item - endif - endfor - return {} -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_buffer_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let item = s:findItem(self.items, a:word) - if empty(item) - return [] - endif - return fuf#makePreviewLinesForFile(item.bufNr, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - " not use bufnr(a:word) in order to handle unnamed buffer - let item = s:findItem(self.items, a:word) - if empty(item) - " do nothing - elseif a:mode ==# s:OPEN_TYPE_DELETE - execute item.bufNr . 'bdelete' - let self.reservedMode = self.getModeName() - else - call fuf#openBuffer(item.bufNr, a:mode, g:fuf_reuseWindow) - endif -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - call fuf#defineKeyMappingInHandler(g:fuf_buffer_keyDelete, - \ 'onCr(' . s:OPEN_TYPE_DELETE . ')') - let self.items = range(1, bufnr('$')) - call filter(self.items, 'buflisted(v:val) && v:val != self.bufNrPrev && v:val != bufnr("%")') - call map(self.items, 's:makeItem(v:val)') - if g:fuf_buffer_mruOrder - call sort(self.items, 's:compareTimeDescending') - call fuf#mapToSetSerialIndex(self.items, 1) - endif - let self.items = fuf#mapToSetAbbrWithSnippedWordAsPath(self.items) -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffertag.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffertag.vim deleted file mode 100644 index 392b996f..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/buffertag.vim +++ /dev/null @@ -1,300 +0,0 @@ -"============================================================================= -" Copyright (c) 2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#buffertag#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#buffertag#getSwitchOrder() - return g:fuf_buffertag_switchOrder -endfunction - -" -function fuf#buffertag#getEditableDataNames() - return [] -endfunction - -" -function fuf#buffertag#renewCache() - let s:tagItemsCache = {} - let s:tagDataCache = {} -endfunction - -" -function fuf#buffertag#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#buffertag#onInit() - call fuf#defineLaunchCommand('FufBufferTag', s:MODE_NAME, '""', - \ [['g:fuf_buffertag_forAll', 0]]) - call fuf#defineLaunchCommand('FufBufferTagAll', s:MODE_NAME, '""', - \ [['g:fuf_buffertag_forAll', 1]]) - call fuf#defineLaunchCommand('FufBufferTagWithCursorWord', s:MODE_NAME, - \ 'expand('''')', [['g:fuf_buffertag_forAll', 0]]) - call fuf#defineLaunchCommand('FufBufferTagAllWithCursorWord', s:MODE_NAME, - \ 'expand('''')', [['g:fuf_buffertag_forAll', 1]]) - call fuf#defineLaunchCommand('FufBufferTagWithSelectedText', s:MODE_NAME, - \ 'l9#getSelectedText()', [['g:fuf_buffertag_forAll', 0]]) - call fuf#defineLaunchCommand('FufBufferTagAllWithSelectedText', s:MODE_NAME, - \ 'l9#getSelectedText()', [['g:fuf_buffertag_forAll', 1]]) - call l9#defineVariableDefault('g:fuf_buffertag_forAll', 0) " private option - " the following settings originate from taglist.vim - call l9#defineVariableDefault('g:fuf_buffertag__asm' , '--language-force=asm --asm-types=dlmt') - call l9#defineVariableDefault('g:fuf_buffertag__aspperl' , '--language-force=asp --asp-types=fsv') - call l9#defineVariableDefault('g:fuf_buffertag__aspvbs' , '--language-force=asp --asp-types=fsv') - call l9#defineVariableDefault('g:fuf_buffertag__awk' , '--language-force=awk --awk-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__beta' , '--language-force=beta --beta-types=fsv') - call l9#defineVariableDefault('g:fuf_buffertag__c' , '--language-force=c --c-types=dgsutvf') - call l9#defineVariableDefault('g:fuf_buffertag__cpp' , '--language-force=c++ --c++-types=nvdtcgsuf') - call l9#defineVariableDefault('g:fuf_buffertag__cs' , '--language-force=c# --c#-types=dtncEgsipm') - call l9#defineVariableDefault('g:fuf_buffertag__cobol' , '--language-force=cobol --cobol-types=dfgpPs') - call l9#defineVariableDefault('g:fuf_buffertag__eiffel' , '--language-force=eiffel --eiffel-types=cf') - call l9#defineVariableDefault('g:fuf_buffertag__erlang' , '--language-force=erlang --erlang-types=drmf') - call l9#defineVariableDefault('g:fuf_buffertag__expect' , '--language-force=tcl --tcl-types=cfp') - call l9#defineVariableDefault('g:fuf_buffertag__fortran' , '--language-force=fortran --fortran-types=pbceiklmntvfs') - call l9#defineVariableDefault('g:fuf_buffertag__html' , '--language-force=html --html-types=af') - call l9#defineVariableDefault('g:fuf_buffertag__java' , '--language-force=java --java-types=pcifm') - call l9#defineVariableDefault('g:fuf_buffertag__javascript', '--language-force=javascript --javascript-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__lisp' , '--language-force=lisp --lisp-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__lua' , '--language-force=lua --lua-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__make' , '--language-force=make --make-types=m') - call l9#defineVariableDefault('g:fuf_buffertag__pascal' , '--language-force=pascal --pascal-types=fp') - call l9#defineVariableDefault('g:fuf_buffertag__perl' , '--language-force=perl --perl-types=clps') - call l9#defineVariableDefault('g:fuf_buffertag__php' , '--language-force=php --php-types=cdvf') - call l9#defineVariableDefault('g:fuf_buffertag__python' , '--language-force=python --python-types=cmf') - call l9#defineVariableDefault('g:fuf_buffertag__rexx' , '--language-force=rexx --rexx-types=s') - call l9#defineVariableDefault('g:fuf_buffertag__ruby' , '--language-force=ruby --ruby-types=cfFm') - call l9#defineVariableDefault('g:fuf_buffertag__scheme' , '--language-force=scheme --scheme-types=sf') - call l9#defineVariableDefault('g:fuf_buffertag__sh' , '--language-force=sh --sh-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__csh' , '--language-force=sh --sh-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__zsh' , '--language-force=sh --sh-types=f') - call l9#defineVariableDefault('g:fuf_buffertag__slang' , '--language-force=slang --slang-types=nf') - call l9#defineVariableDefault('g:fuf_buffertag__sml' , '--language-force=sml --sml-types=ecsrtvf') - call l9#defineVariableDefault('g:fuf_buffertag__sql' , '--language-force=sql --sql-types=cFPrstTvfp') - call l9#defineVariableDefault('g:fuf_buffertag__tcl' , '--language-force=tcl --tcl-types=cfmp') - call l9#defineVariableDefault('g:fuf_buffertag__vera' , '--language-force=vera --vera-types=cdefgmpPtTvx') - call l9#defineVariableDefault('g:fuf_buffertag__verilog' , '--language-force=verilog --verilog-types=mcPertwpvf') - call l9#defineVariableDefault('g:fuf_buffertag__vim' , '--language-force=vim --vim-types=avf') - call l9#defineVariableDefault('g:fuf_buffertag__yacc' , '--language-force=yacc --yacc-types=l') -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:parseTagLine(line) - " tag W:\Win32\SRC7\NCSIM\NCVW32\CUBEFACE.H /^#define CUBEFACE_H$/;" macro line:4 - let fields = matchlist(a:line, '\v^([^\t]+)\t(.+)\t\/\^(.+)\$\/\;\"\t(.+)\tline\:(\d+)') - if empty(fields) - return {} - endif - return { - \ 'tag' : fields[1], - \ 'fname' : fields[2], - \ 'pattern': fields[3], - \ 'kind' : fields[4], - \ 'lnum' : str2nr(fields[5]), - \ } -endfunction - -" -let s:TEMP_VARIABLES_GROUP = expand(':p') - -" -function s:getFileType(bufNr) - let ft = getbufvar(a:bufNr, '&filetype') - if !empty(ft) || bufloaded(a:bufNr) - return ft - endif - let ft = getbufvar(a:bufNr, 'fuf_buffertag_filetype') - if !empty(ft) - return ft - endif - call l9#tempvariables#set(s:TEMP_VARIABLES_GROUP, '&eventignore', 'FileType') - call l9#tempvariables#set(s:TEMP_VARIABLES_GROUP, '&filetype', &filetype) - " from taglist.vim - execute 'doautocmd filetypedetect BufRead ' . bufname(a:bufNr) - let ft = &filetype - call l9#tempvariables#end(s:TEMP_VARIABLES_GROUP) - call setbufvar(a:bufNr, 'fuf_buffertag_filetype', ft) - return ft -endfunction - -" -function s:makeCtagsCmd(bufNr) - let ft = s:getFileType(a:bufNr) - if !exists('g:fuf_buffertag__{ft}') - return '' - endif - " - let cmd = join([g:fuf_buffertag_ctagsPath, - \ '-f - --sort=no --excmd=pattern --fields=nKs', - \ g:fuf_buffertag__{ft}, - \ shellescape(fnamemodify(bufname(a:bufNr), ':p'))]) - return cmd -endfunction - -" -function s:getTagItems(bufNr) - let cmd = s:makeCtagsCmd(a:bufNr) - if empty(cmd) - return [] - elseif !exists('s:tagItemsCache[cmd]') || - \ s:tagItemsCache[cmd].time < getftime(expand(bufname(a:bufNr))) - let items = split(system(cmd), "\n") - if v:shell_error - call fuf#echoError([cmd] + items) - throw "Command error" - endif - call map(items, 's:parseTagLine(v:val)') - call filter(items, '!empty(v:val)') - let s:tagItemsCache[cmd] = { - \ 'time' : localtime(), - \ 'items' : items, - \ } - endif - return s:tagItemsCache[cmd].items -endfunction - -" -function s:makeItem(tag, itemMap) - let menu = fnamemodify(a:itemMap[a:tag][0].fname, ':t') - \ . ' [' . a:itemMap[a:tag][0].kind . ']' - if len(a:itemMap[a:tag]) > 1 - let menu .= ' (' . len(a:itemMap[a:tag]) . ')' - endif - let item = fuf#makeNonPathItem(a:tag, menu) - return item -endfunction - -" -function s:getTagData(bufNrs) - let key = join([0] + sort(copy(a:bufNrs)), "\n") - let bufNames = map(copy(a:bufNrs), 'bufname(v:val)') - if !exists('s:tagDataCache[key]') || - \ fuf#countModifiedFiles(bufNames, s:tagDataCache[key].time) > 0 - let itemMap = {} - for item in l9#concat(map(copy(a:bufNrs), 's:getTagItems(v:val)')) - if !exists('itemMap[item.tag]') - let itemMap[item.tag] = [] - endif - call add(itemMap[item.tag], item) - endfor - let items = sort(keys(itemMap)) - call map(items, 's:makeItem(v:val, itemMap)') - call fuf#mapToSetSerialIndex(items, 1) - call map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') - let s:tagDataCache[key] = { - \ 'time' : localtime(), - \ 'itemMap': itemMap, - \ 'items' : items, - \ } - endif - return [s:tagDataCache[key].items, s:tagDataCache[key].itemMap] -endfunction - -" -function s:jumpToTag(item, mode) - call fuf#openFile(a:item.fname, a:mode, g:fuf_reuseWindow) - call cursor(a:item.lnum, 1) - normal! zvzz -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_buffertag_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return 0 -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return [] -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - if !exists('self.itemMap[a:word][0]') - call fuf#echoError('Definition not found:' . a:word) - return - elseif len(self.itemMap[a:word]) == 1 - let i = 0 - else - let list = map(fuf#mapToSetSerialIndex(copy(self.itemMap[a:word]), 1), - \ 'printf(" %2d: %s|%d| [%s] %s",v:val.index, fnamemodify(v:val.fname, ":~:."), v:val.lnum, v:val.kind, v:val.pattern)') - let i = inputlist(['Select a definition of "' . a:word . '":'] + list) - 1 - endif - if 0 <= i && i < len(self.itemMap[a:word]) - call s:jumpToTag(self.itemMap[a:word][i], a:mode) - endif -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - if g:fuf_buffertag_forAll - let bufNrs = filter(range(1, bufnr('$')), 'buflisted(v:val)') - else - let bufNrs = [self.bufNrPrev] - endif - let [self.items, self.itemMap] = s:getTagData(bufNrs) -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackfile.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackfile.vim deleted file mode 100644 index fedf0cf9..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackfile.vim +++ /dev/null @@ -1,137 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#callbackfile#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#callbackfile#getSwitchOrder() - return -1 -endfunction - -" -function fuf#callbackfile#getEditableDataNames() - return [] -endfunction - -" -function fuf#callbackfile#renewCache() - let s:cache = {} -endfunction - -" -function fuf#callbackfile#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#callbackfile#onInit() -endfunction - -" -function fuf#callbackfile#launch(initialPattern, partialMatching, prompt, exclude, listener) - let s:prompt = (empty(a:prompt) ? '>' : a:prompt) - let s:exclude = a:exclude - let s:listener = a:listener - call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:enumItems(dir) - let key = getcwd() . g:fuf_ignoreCase . s:exclude . "\n" . a:dir - if !exists('s:cache[key]') - let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, s:exclude) - if isdirectory(a:dir) - call insert(s:cache[key], fuf#makePathItem(a:dir . '.', '', 0)) - endif - call fuf#mapToSetSerialIndex(s:cache[key], 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key]) - endif - return s:cache[key] -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(s:prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return a:enteredPattern =~# '[^/\\]$' -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - let items = copy(s:enumItems(fuf#splitPath(a:patternPrimary).head)) - return filter(items, 'bufnr("^" . v:val.word . "$") != self.bufNrPrev') -endfunction - -" -function s:handler.onOpen(word, mode) - call s:listener.onComplete(a:word, a:mode) -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) - if !a:opened && exists('s:listener.onAbort()') - call s:listener.onAbort() - endif -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackitem.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackitem.vim deleted file mode 100644 index 118ee088..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/callbackitem.vim +++ /dev/null @@ -1,139 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#callbackitem#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#callbackitem#getSwitchOrder() - return -1 -endfunction - -" -function fuf#callbackitem#getEditableDataNames() - return [] -endfunction - -" -function fuf#callbackitem#renewCache() -endfunction - -" -function fuf#callbackitem#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#callbackitem#onInit() -endfunction - -" -function fuf#callbackitem#launch(initialPattern, partialMatching, prompt, listener, items, forPath) - let s:prompt = (empty(a:prompt) ? '>' : a:prompt) - let s:listener = a:listener - let s:forPath = a:forPath - let s:items = copy(a:items) - if s:forPath - call map(s:items, 'fuf#makePathItem(v:val, "", 1)') - call fuf#mapToSetSerialIndex(s:items, 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items) - else - call map(s:items, 'fuf#makeNonPathItem(v:val, "")') - call fuf#mapToSetSerialIndex(s:items, 1) - call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') - endif - call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(s:prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - if s:forPath - return g:fuf_previewHeight - endif - return 0 -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - let parser = (s:forPath - \ ? 's:interpretPrimaryPatternForPath' - \ : 's:interpretPrimaryPatternForNonPath') - return fuf#makePatternSet(a:patternBase, parser, self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - if s:forPath - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) - endif - return [] -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:items -endfunction - -" -function s:handler.onOpen(word, mode) - call s:listener.onComplete(a:word, a:mode) -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) - if !a:opened && exists('s:listener.onAbort()') - call s:listener.onAbort() - endif -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/changelist.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/changelist.vim deleted file mode 100644 index 545f6ca8..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/changelist.vim +++ /dev/null @@ -1,172 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#changelist#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#changelist#getSwitchOrder() - return g:fuf_changelist_switchOrder -endfunction - -" -function fuf#changelist#getEditableDataNames() - return [] -endfunction - -" -function fuf#changelist#renewCache() -endfunction - -" -function fuf#changelist#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#changelist#onInit() - call fuf#defineLaunchCommand('FufChangeList', s:MODE_NAME, '""', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:getChangesLines() - redir => result - :silent changes - redir END - return split(result, "\n") -endfunction - -" -function s:parseChangesLine(line) - " return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$') - let elements = matchlist(a:line, '\v^(.)\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$') - if empty(elements) - return {} - endif - return { - \ 'prefix': elements[1], - \ 'count' : elements[2], - \ 'lnum' : elements[3], - \ 'text' : printf('|%d:%d|%s', elements[3], elements[4], elements[5]), - \ } -endfunction - -" -function s:makeItem(line) - let parsed = s:parseChangesLine(a:line) - if empty(parsed) - return {} - endif - let item = fuf#makeNonPathItem(parsed.text, '') - let item.abbrPrefix = parsed.prefix - let item.lnum = parsed.lnum - return item -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_changelist_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let items = filter(copy(self.items), 'v:val.word ==# a:word') - if empty(items) - return [] - endif - let lines = fuf#getFileLines(self.bufNrPrev) - return fuf#makePreviewLinesAround( - \ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#prejump(a:mode) - let older = 0 - for line in reverse(s:getChangesLines()) - if stridx(line, '>') == 0 - let older = 1 - endif - let parsed = s:parseChangesLine(line) - if !empty(parsed) && parsed.text ==# a:word - if parsed.count != 0 - execute 'normal! ' . parsed.count . (older ? 'g;' : 'g,') . 'zvzz' - endif - break - endif - endfor -endfunction - -" -function s:handler.onModeEnterPre() - let self.items = s:getChangesLines() -endfunction - -" -function s:handler.onModeEnterPost() - call map(self.items, 's:makeItem(v:val)') - call filter(self.items, '!empty(v:val)') - call reverse(self.items) - call fuf#mapToSetSerialIndex(self.items, 1) - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/coveragefile.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/coveragefile.vim deleted file mode 100644 index 1471ef8c..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/coveragefile.vim +++ /dev/null @@ -1,199 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#coveragefile#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#coveragefile#getSwitchOrder() - return g:fuf_coveragefile_switchOrder -endfunction - -" -function fuf#coveragefile#getEditableDataNames() - return ['coverages'] -endfunction - -" -function fuf#coveragefile#renewCache() - let s:cache = {} -endfunction - -" -function fuf#coveragefile#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#coveragefile#onInit() - call fuf#defineLaunchCommand('FufCoverageFile', s:MODE_NAME, '""', []) - call l9#defineVariableDefault('g:fuf_coveragefile_name', '') " private option - command! -bang -narg=0 FufCoverageFileRegister call s:registerCoverage() - command! -bang -narg=? FufCoverageFileChange call s:changeCoverage() -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:enumItems() - let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_coveragefile_exclude, - \ g:fuf_coveragefile_globPatterns], "\n") - if !exists('s:cache[key]') - let s:cache[key] = l9#concat(map(copy(g:fuf_coveragefile_globPatterns), - \ 'fuf#glob(v:val)')) - call filter(s:cache[key], 'filereadable(v:val)') " filter out directories - call map(s:cache[key], 'fuf#makePathItem(fnamemodify(v:val, ":~:."), "", 0)') - if len(g:fuf_coveragefile_exclude) - call filter(s:cache[key], 'v:val.word !~ g:fuf_coveragefile_exclude') - endif - call fuf#mapToSetSerialIndex(s:cache[key], 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key]) - endif - return s:cache[key] -endfunction - -" -function s:registerCoverage() - let patterns = [] - while 1 - let pattern = l9#inputHl('Question', '[fuf] Glob pattern for coverage ( and end):', - \ '', 'file') - if pattern !~ '\S' - break - endif - call add(patterns, pattern) - endwhile - if empty(patterns) - call fuf#echoWarning('Canceled') - return - endif - echo '[fuf] patterns: ' . string(patterns) - let name = l9#inputHl('Question', '[fuf] Coverage name:') - if name !~ '\S' - call fuf#echoWarning('Canceled') - return - endif - let coverages = fuf#loadDataFile(s:MODE_NAME, 'coverages') - call insert(coverages, {'name': name, 'patterns': patterns}) - call fuf#saveDataFile(s:MODE_NAME, 'coverages', coverages) -endfunction - -" -function s:createChangeCoverageListener() - let listener = {} - - function listener.onComplete(name, method) - call s:changeCoverage(a:name) - endfunction - - return listener -endfunction - -" -function s:changeCoverage(name) - let coverages = fuf#loadDataFile(s:MODE_NAME, 'coverages') - if a:name !~ '\S' - let names = map(copy(coverages), 'v:val.name') - call fuf#callbackitem#launch('', 0, '>Coverage>', s:createChangeCoverageListener(), names, 0) - return - else - let name = a:name - endif - call filter(coverages, 'v:val.name ==# name') - if empty(coverages) - call fuf#echoError('Coverage not found: ' . name) - return - endif - call fuf#setOneTimeVariables( - \ ['g:fuf_coveragefile_globPatterns', coverages[0].patterns], - \ ['g:fuf_coveragefile_name' , a:name] - \ ) - FufCoverageFile -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - let nameString = (empty(g:fuf_coveragefile_name) ? '' - \ : '[' . g:fuf_coveragefile_name . ']') - return fuf#formatPrompt(g:fuf_coveragefile_prompt, self.partialMatching, - \ nameString) -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow) -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - " NOTE: Comparing filenames is faster than bufnr('^' . fname . '$') - let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':~:.') - let self.items = copy(s:enumItems()) - call filter(self.items, 'v:val.word !=# bufNamePrev') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/dir.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/dir.vim deleted file mode 100644 index 53160931..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/dir.vim +++ /dev/null @@ -1,132 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#dir#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#dir#getSwitchOrder() - return g:fuf_dir_switchOrder -endfunction - -" -function fuf#dir#getEditableDataNames() - return [] -endfunction - -" -function fuf#dir#renewCache() - let s:cache = {} -endfunction - -" -function fuf#dir#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#dir#onInit() - call fuf#defineLaunchCommand('FufDir' , s:MODE_NAME, '""', []) - call fuf#defineLaunchCommand('FufDirWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', []) - call fuf#defineLaunchCommand('FufDirWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:enumItems(dir) - let key = getcwd() . g:fuf_ignoreCase . g:fuf_dir_exclude . "\n" . a:dir - if !exists('s:cache[key]') - let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_dir_exclude) - call filter(s:cache[key], 'v:val.word =~# ''[/\\]$''') - if isdirectory(a:dir) - call insert(s:cache[key], fuf#makePathItem(a:dir . '.', '', 0)) - endif - call fuf#mapToSetSerialIndex(s:cache[key], 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key]) - endif - return s:cache[key] -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_dir_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return a:enteredPattern =~# '[^/\\]$' -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesAround( - \ fuf#glob(fnamemodify(a:word, ':p') . '*'), - \ [], a:count, self.getPreviewHeight()) - return -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:enumItems(fuf#splitPath(a:patternPrimary).head) -endfunction - -" -function s:handler.onOpen(word, mode) - execute ':cd ' . fnameescape(a:word) -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/file.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/file.vim deleted file mode 100644 index 15691924..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/file.vim +++ /dev/null @@ -1,139 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#file#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#file#getSwitchOrder() - return g:fuf_file_switchOrder -endfunction - -" -function fuf#file#getEditableDataNames() - return [] -endfunction - -" -function fuf#file#renewCache() - let s:cache = {} -endfunction - -" -function fuf#file#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#file#onInit() - call fuf#defineLaunchCommand('FufFile' , s:MODE_NAME, '""', []) - call fuf#defineLaunchCommand('FufFileWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', []) - call fuf#defineLaunchCommand('FufFileWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:enumItems(dir) - let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_file_exclude, a:dir], "\n") - if !exists('s:cache[key]') - let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_file_exclude) - call fuf#mapToSetSerialIndex(s:cache[key], 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key]) - endif - return s:cache[key] -endfunction - -" -function s:enumNonCurrentItems(dir, bufNrPrev, cache) - let key = a:dir . 'AVOIDING EMPTY KEY' - if !exists('a:cache[key]') - " NOTE: Comparing filenames is faster than bufnr('^' . fname . '$') - let bufNamePrev = bufname(a:bufNrPrev) - let a:cache[key] = - \ filter(copy(s:enumItems(a:dir)), 'v:val.word !=# bufNamePrev') - endif - return a:cache[key] -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_file_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return a:enteredPattern =~# '[^/\\]$' -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:enumNonCurrentItems( - \ fuf#splitPath(a:patternPrimary).head, self.bufNrPrev, self.cache) -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow) -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - let self.cache = {} -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givencmd.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givencmd.vim deleted file mode 100644 index d59178c7..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givencmd.vim +++ /dev/null @@ -1,123 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#givencmd#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#givencmd#getSwitchOrder() - return -1 -endfunction - -" -function fuf#givencmd#getEditableDataNames() - return [] -endfunction - -" -function fuf#givencmd#renewCache() -endfunction - -" -function fuf#givencmd#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#givencmd#onInit() -endfunction - -" -function fuf#givencmd#launch(initialPattern, partialMatching, prompt, items) - let s:prompt = (empty(a:prompt) ? '>' : a:prompt) - let s:items = copy(a:items) - call map(s:items, 'fuf#makeNonPathItem(v:val, "")') - call fuf#mapToSetSerialIndex(s:items, 1) - call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') - call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(s:prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return 0 -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return [] -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:items -endfunction - -" -function s:handler.onOpen(word, mode) - if a:word[0] =~# '[:/?]' - call histadd(a:word[0], a:word[1:]) - endif - call feedkeys(a:word . "\", 'n') -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givendir.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givendir.vim deleted file mode 100644 index e654d853..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givendir.vim +++ /dev/null @@ -1,123 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#givendir#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#givendir#getSwitchOrder() - return -1 -endfunction - -" -function fuf#givendir#getEditableDataNames() - return [] -endfunction - -" -function fuf#givendir#renewCache() -endfunction - -" -function fuf#givendir#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#givendir#onInit() -endfunction - -" -function fuf#givendir#launch(initialPattern, partialMatching, prompt, items) - let s:prompt = (empty(a:prompt) ? '>' : a:prompt) - let s:items = map(copy(a:items), 'substitute(v:val, ''[/\\]\?$'', "", "")') - let s:items = map(s:items, 'fuf#makePathItem(v:val, "", 0)') - call fuf#mapToSetSerialIndex(s:items, 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items) - call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(s:prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesAround( - \ fuf#glob(fnamemodify(a:word, ':p') . '*'), - \ [], a:count, self.getPreviewHeight()) - return -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:items -endfunction - -" -function s:handler.onOpen(word, mode) - execute ':cd ' . fnameescape(a:word) -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givenfile.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givenfile.vim deleted file mode 100644 index 5419ff82..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/givenfile.vim +++ /dev/null @@ -1,121 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#givenfile#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#givenfile#getSwitchOrder() - return -1 -endfunction - -" -function fuf#givenfile#getEditableDataNames() - return [] -endfunction - -" -function fuf#givenfile#renewCache() -endfunction - -" -function fuf#givenfile#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#givenfile#onInit() -endfunction - -" -function fuf#givenfile#launch(initialPattern, partialMatching, prompt, items) - let s:prompt = (empty(a:prompt) ? '>' : a:prompt) - let s:items = map(copy(a:items), 'fuf#makePathItem(v:val, "", 0)') - call fuf#mapToSetSerialIndex(s:items, 1) - call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') - call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) -endfunction - - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(s:prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow) -endfunction - - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/help.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/help.vim deleted file mode 100644 index 8f03e36c..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/help.vim +++ /dev/null @@ -1,198 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#help#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#help#getSwitchOrder() - return g:fuf_help_switchOrder -endfunction - -" -function fuf#help#getEditableDataNames() - return [] -endfunction - -" -function fuf#help#renewCache() - let s:cache = {} -endfunction - -" -function fuf#help#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#help#onInit() - call fuf#defineLaunchCommand('FufHelp' , s:MODE_NAME, '""', []) - call fuf#defineLaunchCommand('FufHelpWithCursorWord', s:MODE_NAME, 'expand('''')', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:getCurrentHelpTagFiles() - let prefix = 'doc' . l9#getPathSeparator() - let tagFiles = split(globpath(&runtimepath, prefix . 'tags' ), "\n") - \ + split(globpath(&runtimepath, prefix . 'tags-??'), "\n") - return sort(map(tagFiles, 'fnamemodify(v:val, ":p")')) -endfunction - -" -function s:parseHelpTagEntry(line, tagFile) - let elements = split(a:line, "\t") - if len(elements) != 3 || elements[0][0] ==# '!' - return {} - endif - let suffix = matchstr(a:tagFile, '-\zs..$') - if empty(suffix) - let suffix = '@en' - else - let suffix = '@' . suffix - endif - let dir = fnamemodify(a:tagFile, ':h') . l9#getPathSeparator() - return { - \ 'word' : elements[0] . suffix, - \ 'path' : dir . elements[1], - \ 'pattern': elements[2][1:], - \ } -endfunction - -" -function s:getHelpTagEntries(tagFile) - let names = map(l9#readFile(a:tagFile), 's:parseHelpTagEntry(v:val, a:tagFile)') - return filter(names, '!empty(v:val)') -endfunction - -" -function s:parseHelpTagFiles(tagFiles, key) - let cacheName = 'cache-' . l9#hash224(a:key) - let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName) - if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0 - return fuf#loadDataFile(s:MODE_NAME, cacheName) - endif - let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getHelpTagEntries(v:val)'))) - let items = map(items, 'extend(v:val, fuf#makeNonPathItem(v:val.word, ""))') - call fuf#mapToSetSerialIndex(items, 1) - let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') - call fuf#saveDataFile(s:MODE_NAME, cacheName, items) - return items -endfunction - -" -function s:enumHelpTags(tagFiles) - if !len(a:tagFiles) - return [] - endif - let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n") - if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time) - let s:cache[key] = { - \ 'time' : localtime(), - \ 'items' : s:parseHelpTagFiles(a:tagFiles, key) - \ } - endif - return s:cache[key].items -endfunction - -" -function s:getMatchingIndex(lines, pattern) - if empty(a:pattern) - return -1 - endif - for i in range(len(a:lines)) - if stridx(a:lines[i], a:pattern) >= 0 - return i - endif - endfor - return -1 -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_help_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let items = filter(copy(s:enumHelpTags(self.tagFiles)), 'v:val.word ==# a:word') - if empty(items) - return [] - endif - let lines = fuf#getFileLines(items[0].path) - let index = s:getMatchingIndex(lines, items[0].pattern) - return [items[0].path . ':'] + fuf#makePreviewLinesAround( - \ lines, (index < 0 ? [] : [index]), a:count, self.getPreviewHeight() - 1) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:enumHelpTags(self.tagFiles) -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#openHelp(a:word, a:mode) -endfunction - -" -function s:handler.onModeEnterPre() - let self.tagFiles = s:getCurrentHelpTagFiles() -endfunction - -" -function s:handler.onModeEnterPost() -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/jumplist.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/jumplist.vim deleted file mode 100644 index ddbb1ab5..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/jumplist.vim +++ /dev/null @@ -1,182 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#jumplist#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#jumplist#getSwitchOrder() - return g:fuf_jumplist_switchOrder -endfunction - -" -function fuf#jumplist#getEditableDataNames() - return [] -endfunction - -" -function fuf#jumplist#renewCache() -endfunction - -" -function fuf#jumplist#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#jumplist#onInit() - call fuf#defineLaunchCommand('FufJumpList', s:MODE_NAME, '""', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:getJumpsLines() - redir => result - :silent jumps - redir END - return split(result, "\n") -endfunction - -" -function s:parseJumpsLine(line, bufnrPrev) - "return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$') - let elements = matchlist(a:line, '\v^(.)\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$') - if empty(elements) - return {} - endif - let linePrevBuffer = join(getbufline(a:bufnrPrev, elements[3])) - if stridx(linePrevBuffer, elements[5]) >= 0 - let fname = bufname(a:bufnrPrev) - let text = elements[5] - else - let fname = elements[5] - let text = join(getbufline('^' . elements[5] . '$', elements[3])) - endif - return { - \ 'prefix': elements[1], - \ 'count' : elements[2], - \ 'lnum' : elements[3], - \ 'fname' : fname, - \ 'text' : printf('%s|%d:%d|%s', fname, elements[3], elements[4], text), - \ } -endfunction - -" -function s:makeItem(line, bufnrPrev) - let parsed = s:parseJumpsLine(a:line, a:bufnrPrev) - if empty(parsed) - return {} - endif - let item = fuf#makeNonPathItem(parsed.text, '') - let item.abbrPrefix = parsed.prefix - let item.lnum = parsed.lnum - let item.fname = parsed.fname - return item -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_jumplist_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let items = filter(copy(self.items), 'v:val.word ==# a:word') - if empty(items) - return [] - endif - let lines = fuf#getFileLines(items[0].fname) - return fuf#makePreviewLinesAround( - \ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#prejump(a:mode) - let older = 0 - for line in reverse(s:getJumpsLines()) - if stridx(line, '>') == 0 - let older = 1 - endif - let parsed = s:parseJumpsLine(line, self.bufNrPrev) - if !empty(parsed) && parsed.text ==# a:word - if parsed.count != 0 - execute 'normal! ' . parsed.count . (older ? "\" : "\") . 'zvzz' - endif - break - endif - endfor -endfunction - -" -function s:handler.onModeEnterPre() - let self.items = s:getJumpsLines() -endfunction - -" -function s:handler.onModeEnterPost() - call map(self.items, 's:makeItem(v:val, self.bufNrPrev)') - call filter(self.items, '!empty(v:val)') - call reverse(self.items) - call fuf#mapToSetSerialIndex(self.items, 1) - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/line.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/line.vim deleted file mode 100644 index 60447b56..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/line.vim +++ /dev/null @@ -1,135 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#line#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#line#getSwitchOrder() - return g:fuf_line_switchOrder -endfunction - -" -function fuf#line#getEditableDataNames() - return [] -endfunction - -" -function fuf#line#renewCache() -endfunction - -" -function fuf#line#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#line#onInit() - call fuf#defineLaunchCommand('FufLine', s:MODE_NAME, '""', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') -let s:OPEN_TYPE_DELETE = -1 - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_line_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let items = filter(copy(self.items), 'v:val.word ==# a:word') - if empty(items) - return [] - endif - let lines = fuf#getFileLines(self.bufNrPrev) - return fuf#makePreviewLinesAround( - \ lines, [items[0].index - 1], a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#prejump(a:mode) - call filter(self.items, 'v:val.word ==# a:word') - if empty(self.items) - return - execute 'cc ' . self.items[0].index - endif - call cursor(self.items[0].index, 0) - normal! zvzz -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - let tab = repeat(' ', getbufvar(self.bufNrPrev, '&tabstop')) - let self.items = getbufline(self.bufNrPrev, 1, '$') - let lnumFormat = '%' . len(string(len(self.items) + 1)) . 'd|' - for i in range(len(self.items)) - let self.items[i] = printf(lnumFormat, i + 1) - \ . substitute(self.items[i], "\t", tab, 'g') - endfor - call map(self.items, 'fuf#makeNonPathItem(v:val, "")') - call fuf#mapToSetSerialIndex(self.items, 1) - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 0)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrucmd.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrucmd.vim deleted file mode 100644 index 58632cef..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrucmd.vim +++ /dev/null @@ -1,134 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#mrucmd#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#mrucmd#getSwitchOrder() - return g:fuf_mrucmd_switchOrder -endfunction - -" -function fuf#mrucmd#getEditableDataNames() - return ['items'] -endfunction - -" -function fuf#mrucmd#renewCache() -endfunction - -" -function fuf#mrucmd#requiresOnCommandPre() - return 1 -endfunction - -" -function fuf#mrucmd#onInit() - call fuf#defineLaunchCommand('FufMruCmd', s:MODE_NAME, '""', []) -endfunction - -" -function fuf#mrucmd#onCommandPre(cmd) - if getcmdtype() =~# '^[:/?]' - call s:updateInfo(a:cmd) - endif -endfunction - - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:updateInfo(cmd) - let items = fuf#loadDataFile(s:MODE_NAME, 'items') - let items = fuf#updateMruList( - \ items, { 'word' : a:cmd, 'time' : localtime() }, - \ g:fuf_mrucmd_maxItem, g:fuf_mrucmd_exclude) - call fuf#saveDataFile(s:MODE_NAME, 'items', items) -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_mrucmd_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return 0 -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return [] -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call s:updateInfo(a:word) - call histadd(a:word[0], a:word[1:]) - call feedkeys(a:word . "\", 'n') -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - let self.items = fuf#loadDataFile(s:MODE_NAME, 'items') - call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))') - call fuf#mapToSetSerialIndex(self.items, 1) - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrufile.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrufile.vim deleted file mode 100644 index f90b9e38..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/mrufile.vim +++ /dev/null @@ -1,234 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#mrufile#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#mrufile#getSwitchOrder() - return g:fuf_mrufile_switchOrder -endfunction - -" -function fuf#mrufile#getEditableDataNames() - return ['items', 'itemdirs'] -endfunction - -" -function fuf#mrufile#renewCache() - let s:cache = {} - let s:aroundCache = {} -endfunction - -" -function fuf#mrufile#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#mrufile#onInit() - call fuf#defineLaunchCommand('FufMruFile', s:MODE_NAME, '""', []) - call fuf#defineLaunchCommand('FufMruFileInCwd', s:MODE_NAME, - \ '""', [['g:fuf_mrufile_underCwd', 1]]) - call l9#defineVariableDefault('g:fuf_mrufile_underCwd', 0) " private option - call l9#defineVariableDefault('g:fuf_mrufile_searchAroundLevel', -1) " private option - augroup fuf#mrufile - autocmd! - autocmd BufEnter * call s:updateData() - autocmd BufWritePost * call s:updateData() - augroup END -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') -let s:OPEN_TYPE_EXPAND = -1 - -" -function s:updateData() - if !empty(&buftype) || !filereadable(expand('%')) - return - endif - let items = fuf#loadDataFile(s:MODE_NAME, 'items') - let items = fuf#updateMruList( - \ items, { 'word' : expand('%:p'), 'time' : localtime() }, - \ g:fuf_mrufile_maxItem, g:fuf_mrufile_exclude) - call fuf#saveDataFile(s:MODE_NAME, 'items', items) - call s:removeItemFromCache(expand('%:p')) - let itemDirs = fuf#loadDataFile(s:MODE_NAME, 'itemdirs') - let itemDirs = fuf#updateMruList( - \ itemDirs, { 'word' : expand('%:p:h') }, - \ g:fuf_mrufile_maxItemDir, g:fuf_mrufile_exclude) - call fuf#saveDataFile(s:MODE_NAME, 'itemdirs', itemDirs) -endfunction - -" -function s:removeItemFromCache(word) - for items in values(s:cache) - if exists('items[a:word]') - unlet items[a:word] - endif - endfor -endfunction - -" returns empty value if invalid item -function s:formatItemUsingCache(item) - if a:item.word !~ '\S' - return {} - endif - if !exists('s:cache[a:item.word]') - if filereadable(a:item.word) - let s:cache[a:item.word] = fuf#makePathItem( - \ fnamemodify(a:item.word, ':p:~'), strftime(g:fuf_timeFormat, a:item.time), 0) - else - let s:cache[a:item.word] = {} - endif - endif - return s:cache[a:item.word] -endfunction - -" -function s:expandSearchDir(dir, level) - let dirs = [a:dir] - let dirPrev = a:dir - for i in range(a:level) - let dirPrev = l9#concatPaths([dirPrev, '*']) - call add(dirs, dirPrev) - endfor - let dirPrev = a:dir - for i in range(a:level) - let dirPrevPrev = dirPrev - let dirPrev = fnamemodify(dirPrev, ':h') - if dirPrevPrev ==# dirPrev - break - endif - call add(dirs, dirPrev) - endfor - return dirs -endfunction - -" -function s:listAroundFiles(dir) - if !exists('s:aroundCache[a:dir]') - let s:aroundCache[a:dir] = [a:dir] + - \ fuf#glob(l9#concatPaths([a:dir, '*' ])) + - \ fuf#glob(l9#concatPaths([a:dir, '.*'])) - call filter(s:aroundCache[a:dir], 'filereadable(v:val)') - call map(s:aroundCache[a:dir], 'fuf#makePathItem(fnamemodify(v:val, ":~"), "", 0)') - if len(g:fuf_mrufile_exclude) - call filter(s:aroundCache[a:dir], 'v:val.word !~ g:fuf_mrufile_exclude') - endif - endif - return s:aroundCache[a:dir] -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - let cwdString = (g:fuf_mrufile_underCwd ? '[CWD]' : '') - let levelString = (g:fuf_mrufile_searchAroundLevel < 0 ? '' - \ : '[Around:' . g:fuf_mrufile_searchAroundLevel . ']') - return fuf#formatPrompt(g:fuf_mrufile_prompt, self.partialMatching, cwdString . levelString) -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - if a:mode ==# s:OPEN_TYPE_EXPAND - let nextLevel = (self.searchAroundLevel < 0 ? 0 : self.searchAroundLevel + 1) - call fuf#setOneTimeVariables(['g:fuf_mrufile_searchAroundLevel', nextLevel]) - let self.reservedMode = self.getModeName() - return - else - call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow) - endif -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - let self.searchAroundLevel = g:fuf_mrufile_searchAroundLevel - call fuf#defineKeyMappingInHandler(g:fuf_mrufile_keyExpand, - \ 'onCr(' . s:OPEN_TYPE_EXPAND . ')') - if self.searchAroundLevel < 0 - let self.items = fuf#loadDataFile(s:MODE_NAME, 'items') - call map(self.items, 's:formatItemUsingCache(v:val)') - else - let self.items = fuf#loadDataFile(s:MODE_NAME, 'itemdirs') - call map(self.items, 's:expandSearchDir(v:val.word, g:fuf_mrufile_searchAroundLevel)') - let self.items = l9#concat(self.items) - let self.items = l9#unique(self.items) - call map(self.items, 's:listAroundFiles(v:val)') - let self.items = l9#concat(self.items) - endif - " NOTE: Comparing filenames is faster than bufnr('^' . fname . '$') - let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~') - call filter(self.items, '!empty(v:val) && v:val.word !=# bufNamePrev') - if g:fuf_mrufile_underCwd - let cwd = fnamemodify(getcwd(), ':p:~') - call filter(self.items, 'stridx(v:val.word, cwd) == 0') - endif - call fuf#mapToSetSerialIndex(self.items, 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(self.items) -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/quickfix.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/quickfix.vim deleted file mode 100644 index dd5d67c9..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/quickfix.vim +++ /dev/null @@ -1,154 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#quickfix#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#quickfix#getSwitchOrder() - return g:fuf_quickfix_switchOrder -endfunction - -" -function fuf#quickfix#getEditableDataNames() - return [] -endfunction - -" -function fuf#quickfix#renewCache() -endfunction - -" -function fuf#quickfix#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#quickfix#onInit() - call fuf#defineLaunchCommand('FufQuickfix', s:MODE_NAME, '""', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:getJumpsLines() - redir => result - :silent jumps - redir END - return split(result, "\n") -endfunction - -" -function s:parseJumpsLine(line) - return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$') -endfunction - -" -function s:makeItem(qfItem) - if !a:qfItem.valid - return {} - endif - let item = fuf#makeNonPathItem( - \ printf('%s|%d:%d|%s', bufname(a:qfItem.bufnr), a:qfItem.lnum, - \ a:qfItem.col, matchstr(a:qfItem.text, '\s*\zs.*\S')) - \ , '') - let item.bufnr = a:qfItem.bufnr - let item.lnum = a:qfItem.lnum - return item -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_quickfix_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - let items = filter(copy(self.items), 'v:val.word ==# a:word') - if empty(items) - return [] - endif - let lines = fuf#getFileLines(items[0].bufnr) - return fuf#makePreviewLinesAround( - \ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#prejump(a:mode) - call filter(self.items, 'v:val.word ==# a:word') - if !empty(self.items) - execute 'cc ' . self.items[0].index - endif -endfunction - -" -function s:handler.onModeEnterPre() -endfunction - -" -function s:handler.onModeEnterPost() - let self.items = getqflist() - call map(self.items, 's:makeItem(v:val)') - call fuf#mapToSetSerialIndex(self.items, 1) - call filter(self.items, 'exists("v:val.word")') - call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/tag.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/tag.vim deleted file mode 100644 index 362cabfb..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/tag.vim +++ /dev/null @@ -1,178 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#tag#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#tag#getSwitchOrder() - return g:fuf_tag_switchOrder -endfunction - -" -function fuf#tag#getEditableDataNames() - return [] -endfunction - -" -function fuf#tag#renewCache() - let s:cache = {} -endfunction - -" -function fuf#tag#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#tag#onInit() - call fuf#defineLaunchCommand('FufTag' , s:MODE_NAME, '""', []) - call fuf#defineLaunchCommand('FufTagWithCursorWord', s:MODE_NAME, 'expand('''')', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:getTagNames(tagFile) - let names = map(l9#readFile(a:tagFile), 'matchstr(v:val, ''^[^!\t][^\t]*'')') - return filter(names, 'v:val =~# ''\S''') -endfunction - -" -function s:parseTagFiles(tagFiles, key) - let cacheName = 'cache-' . l9#hash224(a:key) - let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName) - if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0 - return fuf#loadDataFile(s:MODE_NAME, cacheName) - endif - let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTagNames(v:val)'))) - let items = map(items, 'fuf#makeNonPathItem(v:val, "")') - call fuf#mapToSetSerialIndex(items, 1) - let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') - call fuf#saveDataFile(s:MODE_NAME, cacheName, items) - return items -endfunction - -" -function s:enumTags(tagFiles) - if !len(a:tagFiles) - return [] - endif - let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n") - if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time) - let s:cache[key] = { - \ 'time' : localtime(), - \ 'items' : s:parseTagFiles(a:tagFiles, key) - \ } - endif - return s:cache[key].items -endfunction - -" -function s:getMatchingIndex(lines, cmd) - if a:cmd !~# '\D' - return str2nr(a:cmd) - endif - let pattern = matchstr(a:cmd, '^\/\^\zs.*\ze\$\/$') - if empty(pattern) - return -1 - endif - for i in range(len(a:lines)) - if a:lines[i] ==# pattern - return i - endif - endfor - return -1 -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_tag_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', - \ self.partialMatching) -endfunction - -" 'cmd' is '/^hoge hoge$/' or line number -function s:handler.makePreviewLines(word, count) - let tags = taglist('^' . a:word . '$') - if empty(tags) - return [] - endif - let i = a:count % len(tags) - let title = printf('(%d/%d) %s', i + 1, len(tags), tags[i].filename) - let lines = fuf#getFileLines(tags[i].filename) - let index = s:getMatchingIndex(lines, tags[i].cmd) - return [title] + fuf#makePreviewLinesAround( - \ lines, (index < 0 ? [] : [index]), 0, self.getPreviewHeight() - 1) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return s:enumTags(self.tagFiles) -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#openTag(a:word, a:mode) -endfunction - -" -function s:handler.onModeEnterPre() - let self.tagFiles = fuf#getCurrentTagFiles() -endfunction - -" -function s:handler.onModeEnterPost() - let &l:tags = join(self.tagFiles, ',') -endfunction - -" -function s:handler.onModeLeavePost(opened) - let &l:tags = '' -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/taggedfile.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/taggedfile.vim deleted file mode 100644 index 74652fc0..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/autoload/fuf/taggedfile.vim +++ /dev/null @@ -1,159 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" GLOBAL FUNCTIONS {{{1 - -" -function fuf#taggedfile#createHandler(base) - return a:base.concretize(copy(s:handler)) -endfunction - -" -function fuf#taggedfile#getSwitchOrder() - return g:fuf_taggedfile_switchOrder -endfunction - -" -function fuf#taggedfile#getEditableDataNames() - return [] -endfunction - -" -function fuf#taggedfile#renewCache() - let s:cache = {} -endfunction - -" -function fuf#taggedfile#requiresOnCommandPre() - return 0 -endfunction - -" -function fuf#taggedfile#onInit() - call fuf#defineLaunchCommand('FufTaggedFile', s:MODE_NAME, '""', []) -endfunction - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS/VARIABLES {{{1 - -let s:MODE_NAME = expand(':t:r') - -" -function s:getTaggedFileList(tagfile) - execute 'cd ' . fnamemodify(a:tagfile, ':h') - let result = map(l9#readFile(a:tagfile), 'matchstr(v:val, ''^[^!\t][^\t]*\t\zs[^\t]\+'')') - call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":p")') - cd - - call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":~:.")') - return filter(result, 'v:val =~# ''[^/\\ ]$''') -endfunction - -" -function s:parseTagFiles(tagFiles, key) - let cacheName = 'cache-' . l9#hash224(a:key) - let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName) - if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0 - return fuf#loadDataFile(s:MODE_NAME, cacheName) - endif - let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTaggedFileList(v:val)'))) - call map(items, 'fuf#makePathItem(v:val, "", 0)') - call fuf#mapToSetSerialIndex(items, 1) - call fuf#mapToSetAbbrWithSnippedWordAsPath(items) - call fuf#saveDataFile(s:MODE_NAME, cacheName, items) - return items -endfunction - -" -function s:enumTaggedFiles(tagFiles) - if !len(a:tagFiles) - return [] - endif - let key = join([getcwd(), g:fuf_ignoreCase] + a:tagFiles, "\n") - if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time) - let s:cache[key] = { - \ 'time' : localtime(), - \ 'items' : s:parseTagFiles(a:tagFiles, key) - \ } - endif - return s:cache[key].items -endfunction - -" }}}1 -"============================================================================= -" s:handler {{{1 - -let s:handler = {} - -" -function s:handler.getModeName() - return s:MODE_NAME -endfunction - -" -function s:handler.getPrompt() - return fuf#formatPrompt(g:fuf_taggedfile_prompt, self.partialMatching, '') -endfunction - -" -function s:handler.getPreviewHeight() - return g:fuf_previewHeight -endfunction - -" -function s:handler.isOpenable(enteredPattern) - return 1 -endfunction - -" -function s:handler.makePatternSet(patternBase) - return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', - \ self.partialMatching) -endfunction - -" -function s:handler.makePreviewLines(word, count) - return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) -endfunction - -" -function s:handler.getCompleteItems(patternPrimary) - return self.items -endfunction - -" -function s:handler.onOpen(word, mode) - call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow) -endfunction - -" -function s:handler.onModeEnterPre() - let self.tagFiles = fuf#getCurrentTagFiles() -endfunction - -" -function s:handler.onModeEnterPost() - " NOTE: Comparing filenames is faster than bufnr('^' . fname . '$') - let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~:.') - " NOTE: Don't do this in onModeEnterPre() - " because that should return in a short time. - let self.items = copy(s:enumTaggedFiles(self.tagFiles)) - call filter(self.items, 'v:val.word !=# bufNamePrev') -endfunction - -" -function s:handler.onModeLeavePost(opened) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.jax b/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.jax deleted file mode 100644 index 403872fd..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.jax +++ /dev/null @@ -1,1405 +0,0 @@ -*fuf.jax* バッファ/ファイル/その他を、あいまい検索 - - Copyright (c) 2007-2010 Takeshi NISHIDA - -FuzzyFinder *fuzzyfinder* *fuf* - -概要 |fuf-introduction| -インストール |fuf-installation| -使い方 |fuf-usage| -モード |fuf-modes| -詳細なトピック |fuf-detailed-topics| -コマンド |fuf-commands| -オプション |fuf-options| -VIMRC の例 |fuf-vimrc-example| -SPECIAL THANKS |fuf-thanks| -CHANGELOG |fuf-changelog| -あばうと |fuf-about| - -============================================================================== -概要 *fuf-introduction* - -FuzzyFinder はバッファ/ファイル/コマンド/ブックマーク/タグに素早くアクセスする -ための手段を提供します。入力されたパターンから変換されたあいまいパターンまたは -部分一致パターンで検索を行います。 - - 入力パターン あいまいパターン 部分一致パターン ~ -> - abc *a*b*c* *abc* - dir/file dir/*f*i*l*e* dir/*file* - d*r/file d*r/*f*i*l*e* d*r/*file* - ../**/s ../**/*s* ../**/*s* - (** : 再帰検索) -< -次のような場面で有用です: - - "./AhLongLongLongLongLongFile.txt" - "./AhLongLongLongLongLongName.txt" - "./OhLongLongLongLongLongFile.txt" - "./OhLongLongLongLongLongName.txt" <- 欲しいファイル :-O - -"ON" と入力すれば "OhLongLongLongLongLongName.txt" が選択できます. :-D - -FuzzyFinder が検索できる対象は次の通りです: - - バッファ - - ファイル - - ディレクトリ - - 最近使ったファイル - - 最近使ったファイルの近くのファイル - - 最近使ったコマンドライン - - ブックマークされたファイル - - ブックマークされたディレクトリ - - タグ - - タグファイルに含まれるファイル - - ジャンプリスト - - チェンジリスト - - バッファの行 - - quickfix - - ヘルプ - -FuzzyFinder は ファイルを検索したりアイテムを選択するシステムを利用するための -API も提供します。 - -FuzzyFinder はマルチバイト文字をサポートしています。 - - -============================================================================== -インストール *fuf-installation* - -ZIPファイルをランタイムディレクトリに展開します。 - -以下のようにファイルが配置されるはずです。 -> - <ランタイムディレクトリ>/plugin/fuf.vim - <ランタイムディレクトリ>/doc/fuf.txt - ... -< -もしランタイムディレクトリが多数のプラグインでごちゃごちゃになるのが嫌なら、各 -プラグインを個別のディレクトリに配置し、そのディレクトリのパスを 'runtimepath' -に追加してください。アンインストールも楽になります。 - -その後、ヘルプを有効にするためにタグファイルを更新してください。詳しくは -|add-local-help|を参照してください。 - -必要なもの: ~ - -- L9 library (vimscript #3252) - - -============================================================================== -使い方 *fuf-usage* - -次のコマンドで FuzzyFinder を起動します: - - コマンド モード ~ - |:FufBuffer| - Buffer モード (|fuf-buffer-mode|) - |:FufFile| - File モード (|fuf-file-mode|) - |:FufCoverageFile| - Coverage-File モード (|fuf-coveragefile-mode|) - |:FufDir| - Directory モード (|fuf-dir-mode|) - |:FufMruFile| - MRU-File モード (|fuf-mrufile-mode|) - |:FufMruCmd| - MRU-Command モード (|fuf-mrucmd-mode|) - |:FufBookmarkFile| - Bookmark-File モード (|fuf-bookmarkfile-mode|) - |:FufBookmarkDir| - Bookmark-Dir モード (|fuf-bookmarkdir-mode|) - |:FufTag| - Tag モード (|fuf-tag-mode|) - |:FufBufferTag| - Buffer-Tag モード (|fuf-buffertag-mode|) - |:FufTaggedFile| - Tagged-File モード (|fuf-taggedfile-mode|) - |:FufJumpList| - Jump-List モード (|fuf-jumplist-mode|) - |:FufChangeList| - Change-List モード (|fuf-changelist-mode|) - |:FufQuickfix| - Quickfix モード (|fuf-quickfix-mode|) - |:FufLine| - Line モード (|fuf-line-mode|) - |:FufHelp| - Help モード (|fuf-help-mode|) - -これらのコマンドを押しやすいキーにマッピングすることを推奨します。 - -これらのコマンドを実行するとパターンを入力するための1行のバッファを開き、イン -サートモードを開始します。 - -FuzzyFinder は入力されたパターンにマッチするアイテムを検索し、それを補完メニュ -ーに表示します。パターンマッチングの詳細は|fuf-search-patterns|を参照してくだ -さい。 - -多くのアイテムがマッチングする場合、FuzzyFinder はレスポンスを向上させるために -列挙するアイテムの数(|g:fuf_enumeratingLimit|)を制限し、その際、入力されたパタ -ーンを"Error" グループでハイライトします。 - -補完メニューの最初のアイテムは自動的に選択状態になります。 - - で入力パターンからカーソル前の、ディレクトリ名などのひとかたまりを削除す -ることができます。 - - (|g:fuf_keyPrevPattern|) と (|g:fuf_keyNextPattern|) で、履歴から -過去に入力したパターンを呼び出すことができます。 - -いろいろな方法で、選択されたアイテムを開くことができます: - - (|g:fuf_keyOpen|) - 直前のウィンドウで開きます。 - (|g:fuf_keyOpenSplit|) - ウィンドウを分割して開きます。 - (|g:fuf_keyOpenVsplit|) - ウィンドウを垂直分割して開きます。 - (|g:fuf_keyOpenTabpage|) - 別のタブページで開きます。 - -キャンセルして直前のウィンドウに戻るには、インサートモードを抜けてください。 - - (|g:fuf_keySwitchMatching|) で、検索方法をあいまいマッチングまたは -部分一致マッチングに交互に切り替えることができます。 - - (|g:fuf_keyNextMode|) と (|g:fuf_keyPrevMode|) で、インサートモー -ドを抜けることなくカレントモードを切り替えることが出来ます。 - -いくつかのモードでは、選択されたアイテムを (|g:fuf_keyPreview|) でプレビ -ューすることができます。同じアイテムでキーを繰り返すことで別の情報を表示させる -ことができます。プレビューをサポートするモードを起動すると、コマンドラインの高 -さが|g:fuf_previewHeight|になります。この機能は|g:fuf_previewHeight|が0ではな -い場合、有効になります。 - - -============================================================================== -モード *fuf-modes* - - *fuf-buffer-mode* -Buffer モード ~ - -このモードはバッファを選択して開くインターフェースを提供します。 - -Buffer モード中に (|g:fuf_buffer_keyDelete|) を押すと選択したバッファを -削除することができます。 - - *fuf-file-mode* -File モード ~ - -このモードはファイルツリーからファイルを検索して開くインターフェースを提供しま -す。 - - *fuf-coveragefile-mode* -Coverage-File モード ~ - -このモードはあらかじめ設定した検索対象の全ファイルからファイルを選択して開くイ -ンターフェースを提供します。 - -デフォルトではカレントディレクトリ以下の全ファイルを列挙します。 -(|g:fuf_coveragefile_globPatterns|) - -他の検索対象を検索したい場合、|FufCoverageFileRegister|コマンドで新しい検索対 -象を登録し、|FufCoverageFileChange|コマンドで検索対象を選択して Coverage-File -モードを起動します。 - -加えて、|fuf#setOneTimeVariables()|関数を使う方法もあります。 - - -例: .hと.cファイルだけ検索する: -> - call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns', ['**/*.h', '**/*.c']]) - \ | FufCoverageFile -< -例: デフォルトの検索対象に加えてホームディレクトリも検索する: -> - call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns', g:fuf_coveragefile_globPatterns + ['~/**/.*', '~/**/*']]) - \ | FufCoverageFile -< - - *fuf-dir-mode* -Directory モード ~ - -このモードはファイルツリーからディレクトリを検索してカレントディレクトリを変更 -するインターフェースを提供します。 - - *fuf-mrufile-mode* -MRU-File モード ~ - -このモードは最近使ったファイルを選択して開くインターフェースを提供します。 - -このモード中に (|g:fuf_mrufile_keyExpand|) を押すと、最近使ったファイル -の付近にあるファイルを検索します。このキーを押す毎に、検索範囲をディレクトリツ -リーの上下に1階層ずつ広げます。 - -|BufEnter| と |BufWritePost| で行う処理がパフォーマンス上の問題を起こしうるの -で、デフォルトでは無効化するモードに指定されています。(|g:fuf_modesDisable|) - -See also: |FufMruFileInCwd| - - *fuf-mrucmd-mode* -MRU-Command モード ~ - -このモードは最近使ったコマンドラインを選択して開くインターフェースを提供します -。 -このモードに必要な、コマンドラインモードの のマッピングに副作用があるので、 -、デフォルトでは無効化するモードに指定されています。(|g:fuf_modesDisable|) - - *fuf-bookmarkfile-mode* -Bookmark-File モード ~ - -このモードは事前に追加したブックマークを選択してその行へジャンプするインターフ -ェースを提供します。 - -|:FufBookmarkFileAdd|コマンドでカーソルのある行をブックマークに追加できます。 -このコマンドを実行すると、ブックマーク名の入力を求められます。 - -FuzzyFinder はジャンプする行番号を調整します。ブックマークされた行がブックマー -クされたときのパターンとマッチしない場合、FuzzyFinder はブックマークされた位置 -の周辺でマッチする行を探します。なのでブックマークした行が多少移動していたとし -ても、そこでジャンプすることができます。ブックマークした行番号へ調整せずにジャ -ンプしたい場合、|g:fuf_bookmarkfile_searchRange|を 0 に設定してください。 - -このモード中に (|g:fuf_bookmarkfile_keyDelete|) を押すと選択したブックマ -ークを削除することができます。 - - *fuf-bookmarkdir-mode* -Bookmark-Dir モード ~ - -このモードは事前に追加したブックマークを選択してカレントディレクトリを変更する -するインターフェースを提供します。 - -|:FufBookmarkDirAdd|コマンドでディレクトリをブックマークに追加できます。このコ -マンドを実行すると、ディレクトリのパスとブックマーク名の入力を求められます。 - -このモード中に (|g:fuf_bookmarkdir_keyDelete|) を押すと選択したブックマ -ークを削除することができます。 - - *fuf-tag-mode* -Tag モード ~ - -このモードはタグを選択してその定義へジャンプするインターフェースを提供します。 - -以下は を置き換えるマッピングです。 -> - noremap :FufTagWithCursorWord! -< - - *fuf-buffertag-mode* -Buffer-Tag モード ~ - -このモードはカレントバッファまたは全バッファのタグを選択してその定義へジャンプ -するインターフェースを提供します。 - -タグのリストはFuzzyFinderの起動時にその場で作成されるので、前もってtagsファイ -ルを作成する必要はありません。 - -|FufBufferTag|はカレントバッファを対象にし、|FufBufferTagAll|は全バッファを対 -象にします。 - -以下は を置き換えるマッピングです: -> - nnoremap :FufBufferTagWithCursorWord! - vnoremap :FufBufferTagAllWithSelectedText! -< -または -> - nnoremap :FufBufferTagAllWithCursorWord! - vnoremap :FufBufferTagAllWithSelectedText! -< -このモードは taglist.vim (vimscript #273) にインスパイアされました。コードも参 -考にしています。 - - *fuf-taggedfile-mode* -Tagged-File モード ~ - -このモードはタグファイルに含まれるファイルを選択して開くインターフェースを提供 -します。 - - *fuf-jumplist-mode* -Jump-List モード ~ - -このモードはカレントウィンドウの|jumplist|から選択した位置へジャンプするインタ -ーフェースを提供します。 - - *fuf-changelist-mode* -Change-List モード ~ - -このモードはカレントバッファの|changelist|から選択した位置へジャンプするインタ -ーフェースを提供します。 - - *fuf-quickfix-mode* -Quickfix モード ~ - -このモードは|quickfix|リストから選択した位置へジャンプするインターフェースを提 -供します。 - - *fuf-line-mode* -Line モード ~ - -このモードはカレントバッファの行を選択してジャンプするインターフェースを提供し -ます。 - - *fuf-help-mode* -Help モード ~ - -このモードはヘルプタグを選択してそのヘルプページへジャンプするインターフェース -を提供します。 - - *fuf-givenfile-mode* -Given-File モード ~ - -このモードは与えられたリストから選択されたファイルを開く API を提供します。 - -API 関数: -> - function fuf#givenfile#launch( - \ initialPattern, partialMatching, prompt, items) -< - initialPattern - FuzzyFinder 起動直後に挿入される文字列 - partialMatching - あいまい検索ではなく部分一致検索を行うか - prompt - プロンプト文字列 - items - アイテムのリスト - -利用例: -> - " ドットファイルを開く - call fuf#givenfile#launch('', 0, '>', split(glob('~/.*'), "\n")) -< - - *fuf-givendir-mode* -Given-Directory モード ~ - -このモードは与えられたリストから選択されたディレクトリにカレントディレクトリを -変更する API を提供します。 - -API 関数: -> - function fuf#givendir#launch( - \ initialPattern, partialMatching, prompt, items) -< - initialPattern - FuzzyFinder 起動直後に挿入される文字列 - partialMatching - あいまい検索ではなく部分一致検索を行うか - prompt - プロンプト文字列 - items - アイテムのリスト - - -利用例: -> - " ランタイムディレクトリのどれかをカレントディレクトリにする - call fuf#givendir#launch('', 0, '>', split(&runtimepath, ',')) -< - - *fuf-givencmd-mode* -Given-Command モード ~ - -このモードは与えられたリストから選択されたコマンドを実行する API を提供します。 - -選択されたコマンドは feedkeys() によって実行されるので、ノーマルモードでの一連 -のキー入力をエミュレートさせることも可能です。 - -API 関数: -> - function fuf#givencmd#launch( - \ initialPattern, partialMatching, prompt, items) -< - initialPattern - FuzzyFinder 起動直後に挿入される文字列 - partialMatching - あいまい検索ではなく部分一致検索を行うか - prompt - プロンプト文字列 - items - アイテムのリスト - - -利用例: -> - function GetAllCommands() - redir => commands - silent command - redir END - return map((split(commands, "\n")[3:]), - \ '":" . matchstr(v:val, ''^....\zs\S*'')') - endfunction - - " ユーザー定義コマンドを選択して実行 - call fuf#givencmd#launch('', 0, '>', GetAllCommands()) - -< - - *fuf-callbackfile-mode* -Callback-File モード ~ - -このモードはファイルを検索して選択されたファイルパスを得る API を提供します。 - -API 関数: -> - function fuf#callbackfile#launch( - \ initialPattern, partialMatching, prompt, exclude, listener) -< - initialPattern - FuzzyFinder 起動直後に挿入される文字列 - partialMatching - あいまい検索ではなく部分一致検索を行うか - prompt - プロンプト文字列 - exclude - 補完リストから除外したいアイテムの正規表現パターン - listener - 'onComplete' と 'onAbort' を持つ|Dictionary|。これ - らは FuzzyFinder 終了時に呼ばれます。 - listener.onComplete(item, method) は選択が完了したと - き、選択されたアイテム名とオープン方式番号の2引数と - 共に呼ばれます。listener.onAbort() は選択を中止した - ときに呼ばれます。 - -利用例: -> - let listener = {} - - function listener.onComplete(item, method) - echo "Item: " . a:item . "\nMethod: " . a:method - endfunction - - function listener.onAbort() - echo "Abort" - endfunction - - " カレントディレクトリからファイルを選択 - call fuf#callbackfile#launch('', 0, '>', '', listener) - - " ホームディレクトリからファイルを選択 - call fuf#callbackfile#launch('~/', 0, '>', '', listener) -< - - *fuf-callbackitem-mode* -Callback-Item モード ~ - -このモードは与えられたリストから選択されたアイテムを得るための API を提供しま -す。 - -API 関数: -> - function fuf#callbackitem#launch( - \ initialPattern, partialMatching, prompt, listener, items, forPath) -< - initialPattern - FuzzyFinder 起動直後に挿入される文字列 - partialMatching - あいまい検索ではなく部分一致検索を行うか - prompt - プロンプト文字列 - listener - 'onComplete' と 'onAbort' を持つ|Dictionary|。これ - らは FuzzyFinder 終了時に呼ばれます。 - listener.onComplete(item, method) は選択が完了したと - き、選択されたアイテム名とオープン方式番号の2引数と - 共に呼ばれます。listener.onAbort() は選択を中止した - ときに呼ばれます。 - items - アイテムのリスト - forPath - ファイル選択に特化したマッチングを利用するか - -利用例: -> - let listener = {} - - function listener.onComplete(item, method) - echo "Item: " . a:item . "\nMethod: " . a:method - endfunction - - function listener.onAbort() - echo "Abort" - endfunction - - " 与えられたリストからアイテムを選択 - call fuf#callbackitem#launch('', 0, '>', listener, ['ed', 'vi', 'vim'], 0) - - " 与えられたリストからファイルを選択 - call fuf#callbackitem#launch('', 0, '>', listener, ['../foo/bar', 'baz'], 1) -< - -============================================================================== -詳細なトピック *fuf-detailed-topics* - - *fuf-setting-one-time-option* *fuf#setOneTimeVariables()* -一回限りのオプションの設定 ~ - -次回の FuzzyFinder 用に一回限りのオプションを設定したいとき、 -|fuf#setOneTimeVariables()|関数が役に立ちます。この関数は次のようにして使いま -す: -> - call fuf#setOneTimeVariables(['g:fuf_ignoreCase', 0], ['&lines', 50]) -< -この関数は 0 個以上の引数を取り、各々は変数名と値のペアです。指定されたオプシ -ョンは次回 FuzzyFinder が起動したときに実際に設定され、終了するときに復元され -ます。 - - *fuf-search-patterns* -検索パターン ~ - -検索パターンとして、一つのプライマリパターンと0個以上の絞り込みパターンを入力 -することができます。入力パターンは ";" (|g:fuf_patternSeparator|) で区切られ、 -最初のパターンがプライマリパターンになり、残りのパターンが絞り込みパターンにな -ります。 -> - プライマリ 絞り込み 絞り込み - |----------| |-------| |----| - >MruFile>bookmark.vim;autoload/;/home/ -< -プライマリパターンにマッチしたアイテムのリストを別のパターンで絞り込むために、 -絞り込みパターンを利用します。 - -プライマリパターンでは、あいまいマッチングと部分一致マッチングのうち、選択され -た方を行います。絞り込みパターンでは、デフォルトで部分一致マッチングを行います -。(|g:fuf_fuzzyRefining|) - -絞り込みパターンとして数値を入力した場合、アイテムのインデックスに対しても -マッチングします。 - -ファイルパスの静的な集合を対象とするモード (Buffer, MRU-File モードなど。File, -Directory モードなどではない) で|g:fuf_splitPathMatching|が真の場合、プライマ -リパターンのマッチングは head 部とtail 部に分けて行われます。 -> - head tail - |------||-----| - foo/bar/baz.vim - - あいまいマッチング例: - +----------------+---------+---------+---------+ - | item \ pattern | foo/bar | foo/ | bar | - +----------------+---------+---------+---------+ - | foo/bar | match | match | match | - | foo/abc | unmatch | match | unmatch | - | abc/bar | unmatch | unmatch | match | - | foobar | unmatch | unmatch | match | - | foooo/barrrr | match | match | match | - | foooo/fooooo | unmatch | match | unmatch | - +----------------+---------+---------+---------+ -< -上記のケースで、絞り込みパターンはパス全体に対してマッチングできます。 - - *fuf-sorting-of-completion-items* -補完アイテムのソート ~ - -FuzzyFinder は幾つかのルールに従って補完アイテムをソートします。 - -パターン全体が一部分にぴったりマッチするアイテムは優先されます。例えば、パター -ン "bc" ではアイテム "abc" は "bac" より優先されます。 - -このケースで、マッチする部分が先頭であるアイテムはそうでないアイテムより優先さ -れます。例えばパターン "foo" ではアイテム "foobar" は"barfoo" より優先されます -。 - -マッチング位置より後の文字数が少ないほど優先されます。例えばパターン "bar" で -はアイテム"foobar" は"foobarbaz"より優先されます。 - -単語の境界文字にだけマッチングするアイテムは優先されます。 例えば、パターン -"fb" ではアイテム"fooBarBaz" や "foo_bar_baz" などが優先されます。 - -加えて、FuzzyFinder には学習システムがあります。現在のパターンで、過去に補完さ -れたことのあるアイテムを優先します。 - - *fuf-reusing-window* -目的のバッファ/ファイルが開かれているウィンドウの再利用 ~ - -ウィンドウを分割してバッファ/ファイルを開くときに、現在のタブページでそれが開 -かれているウィンドウが見つかった場合、そこへ移動します。別のタブページでバッフ -ァ/ファイルを開くときに、他のタブページでそれが開かれているウィンドウが見つか -った場合、そこへ移動します。 - -常にバッファ/ファイルを新ウィンドウで開きたい場合、'reuse_window'オプションで -この機能を無効にすることができます。 - - *fuf-hiding-menu* -補完メニューの一時非表示 ~ - - で補完メニューを閉じることができます。また、で再度開くことがで -きます。 - - *fuf-abbreviation* *fuf-multiple-search* -短縮入力及び複合検索 ~ - -|g:fuf_abbrevMap|を設定することで、全モードで短縮入力と複合検索が利用できます。 - -例えば次のように設定したとします: -> - let g:fuf_abbrevMap = { - \ "^doc:" : [ - \ "~/project/**/doc/", - \ ".vim/doc/", - \ ], - \ } -< -そして File モードで "doc:txt" と入力すると、次の2つのパターンの検索結果を複合 -します: - - "~/project/**/doc/*t*x*t*" - ".vim/doc/*t*x*t*" - - *fuf-data-file* -データファイル ~ - -FuzzyFinder は補完統計、MRUデータ、ブックマークなどを|g:fuf_dataDir|以下のファ -イルに書き込みます。 - -|:FufEditDataFile|コマンドはデータファイルの編集を補助します。このコマンドを実 -行すると、データファイルを無名バッファに読み込みます。:write などで書き込みを -行うと、データファイルを更新します。 - - *fuf-cache* -キャッシュ ~ - -一旦キャッシュが生成されると、レスポンスを向上させるため自動的には更新されませ -ん。これを更新するには|:FufRenewCache|コマンドを実行してください。 - - *fuf-dot-sequence* -ドット列で親ディレクトリへ移動 ~ - -ドット列を入力することで親ディレクトリを上がっていくことができます。パス区切り -文字直後のドット列は "../" の列に展開されます。 - - ドット列 展開パターン ~ - /.. /../ - /... /../../ - /.... /../../../ - - *fuf-how-to-add-mode* -モードの追加方法 ~ - -"mymode" モードを追加するには、ソースファイルを autoload/fuf/mymode.vim に置き -、 fuf#addMode('mymode') を呼びます。 - - *fuf-migemo* -Migemo とは ~ - -以下のページを参照してください。 - - http://0xcc.net/migemo/ - - http://www.kaoriya.net/#CMIGEMO - - -============================================================================== -コマンド *fuf-commands* - -See also: |fuf-vimrc-example| - - *:FufBuffer* -:FufBuffer [{pattern}] - Buffer モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufFile* -:FufFile [{pattern}] - File モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufFileWithFullCwd* -:FufFileWithFullCwd [{pattern}] - カレントディレクトリのフルパスを初期パターンとする以外は|:FufFile|と同 - じです。 - - *:FufFileWithCurrentBufferDir* -:FufFileWithCurrentBufferDir [{pattern}] - カレントバッファのディレクトリを初期パターンとする以外は|:FufFile|と同 - じです。 - - *:FufDir* -:FufDir [{pattern}] - Directory モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufDirWithFullCwd* -:FufDirWithFullCwd [{pattern}] - カレントディレクトリのフルパスを初期パターンとする以外は|:FufDir|と同 - じです。 - - *:FufDirWithCurrentBufferDir* -:FufDirWithCurrentBufferDir [{pattern}] - カレントバッファのディレクトリを初期パターンとする以外は|:FufDir|と同 - じです。 - - *:FufMruFile* -:FufMruFile [{pattern}] - MRU-File モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufMruFileInCwd* -:FufMruFileInCwd [{pattern}] - カレントディレクトリ内のファイルのみを対象とする以外は - |:FufMruFile|と同じです。 - - *:FufMruCmd* -:FufMruCmd [{pattern}] - MRU-Command モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufBookmarkFile* -:FufBookmarkFile [{pattern}] - Bookmark-File モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufBookmarkDir* -:FufBookmarkDir [{pattern}] - Bookmark-Dir モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufTag* -:FufTag [{pattern}] - Tag モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufTagWithCursorWord* -:FufTagWithCursorWord [{pattern}] - カーソル下の単語を初期パターンとする以外は|:FufTag|と同じです。 - - *:FufBufferTag* -:FufBufferTag[!] [{pattern}] - Buffer-Tag モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufBufferTagAll* -:FufBufferTagAll[!] [{pattern}] - カレントバッファだけでなく他の全てのバッファからもタグを集める以外は - |:FufBufferTag|と同じです。 - - *:FufBufferTagWithCursorWord* -:FufBufferTagWithCursorWord[!] [{pattern}] - カーソル下の単語を初期パターンとする以外は|:FufBufferTag|と同じです。 - - *:FufBufferTagAllWithCursorWord* -:FufBufferTagAllWithCursorWord[!] [{pattern}] - カーソル下の単語を初期パターンとする以外は|:FufBufferTagAll|と同じです - 。 - - *:FufBufferTagWithSelectedText* -:FufBufferTagWithSelectedText[!] [{pattern}] - 最後に選択したテキストを初期パターンとする以外は|:FufBufferTag|と同じ - です。 - - *:FufBufferTagAllWithSelectedText* -:FufBufferTagAllWithSelectedText[!] [{pattern}] - 最後に選択したテキストを初期パターンとする以外は|:FufBufferTagAll|と同 - じです。 - - *:FufTaggedFile* -:FufTaggedFile [{pattern}] - Tagged-File モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufJumpList* -:FufJumpList [{pattern}] - Jump-List モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufChangeList* -:FufChangeList [{pattern}] - Change-List モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufQuickfix* -:FufQuickfix [{pattern}] - Quickfix モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufLine* -:FufLine [{pattern}] - Line モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufHelp* -:FufHelp[!] [{pattern}] - Help モードを起動します。 - - ! 修飾子を付けて実行した場合、あいまい検索ではなく部分一致検索を行うよ - うになります。 - - FuzzyFinder 起動後に {pattern} が挿入されます。 - - *:FufEditDataFile* -:FufEditDataFile - データファイルを編集するためのバッファを開きます。詳しくは - |fuf-data-file|を参照してください。 - - *:FufCoverageFileRegister* -:FufCoverageFileRegister - Coverage-File モードで検索される、新しい検索対象を登録します。最初に - ~/* のような glob パターンを入力します。 を入力するまでパターン - を追加することができます。次に対象名を入力します。 - - See also: |glob()|, |fuf-coveragefile-mode| - - *:FufCoverageFileChange* -:FufCoverageFileChange [{name}] - |FufCoverageFileRegister|コマンドで登録されている中から選択された検索 - 対象でCoverage-File モードを起動します。 - - 対象名が与えられた場合、選択プロセスは飛ばされます。 - - See also: |fuf-coveragefile-mode| - - *:FufBookmarkFileAdd* -:FufBookmarkFileAdd [{name}] - カーソル行をブックマークに追加します。 - - See also: |fuf-bookmarkfile-mode| - - *:FufBookmarkFileAddAsSelectedText* -:FufBookmarkFileAddAsSelectedText - 最後に選択されたテキストをブックマーク名とする以外は - |:FufBookmarkFileAdd|と同じです。 - - *:FufBookmarkDirAdd* -:FufBookmarkDirAdd [{name}] - ディレクトリをブックマークに追加します。 - - See also: |fuf-bookmarkdir-mode| - - *:FufRenewCache* -:FufRenewCache - 補完アイテムを作り直すためにキャッシュを削除します。詳しくは - |fuf-cache|を参照してください。 - - -============================================================================== -オプション *fuf-options* - - *fuf-options-for-all-modes* -全モード用 ~ - - *g:fuf_modesDisable* > - let g:fuf_modesDisable = [ 'mrufile', 'mrucmd', ] -< - 無効にするモード名のリスト。これに含まれるモードは初期化されず、イベン - トの処理も行われません。 - - *g:fuf_keyOpen* > - let g:fuf_keyOpen = '' -< - 補完を確定し、バッファ/ファイルを直前のウィンドウで開くキー。 - - *g:fuf_keyOpenSplit* > - let g:fuf_keyOpenSplit = '' -< - 補完を確定し、バッファ/ファイルを直前のウィンドウを分割して開くキー。 - - *g:fuf_keyOpenVsplit* > - let g:fuf_keyOpenVsplit = '' -< - 補完を確定し、バッファ/ファイルを直前のウィンドウを垂直分割して開くキ - ー。 - - *g:fuf_keyOpenTabpage* > - let g:fuf_keyOpenTabpage = '' -< - 補完を確定し、バッファ/ファイルを別タブページ開くキー。 - - *g:fuf_keyPreview* > - let g:fuf_keyPreview = '' -< - 選択されている補完アイテムの情報をコマンドライン領域に表示するキー。プ - レビューをサポートするモードでのみ作用します。 - - *g:fuf_keyNextMode* > - let g:fuf_keyNextMode = '' -< - 次のモードに切り替えるキー。 - - *g:fuf_keyPrevMode* > - let g:fuf_keyPrevMode = '' -< - 前のモードに切り替えるキー。 - - *g:fuf_keyPrevPattern* > - let g:fuf_keyPrevPattern = '' -< - 履歴から前の入力パターンを呼び出すキー。 - - *g:fuf_keyNextPattern* > - let g:fuf_keyNextPattern = '' -< - 履歴から次の入力パターンを呼び出すキー。 - - *g:fuf_keySwitchMatching* > - let g:fuf_keySwitchMatching = '' -< - あいまいマッチングと部分一致マッチングを切り替えるキー。 - - *g:fuf_dataDir* > - let g:fuf_dataDir = '~/.vim-fuf-data' -< - データファイルを置くディレクトリのパス。空文字列を設定するとファイルへ - の書き込みは行われなくなります。 - - *g:fuf_abbrevMap* > - let g:fuf_abbrevMap = {} -< - |Dictionary|型でそれぞれの値は|List|型です。入力されたテキストの、キー - にマッチする部分が対応する値に展開されます。 - - *g:fuf_patternSeparator* > - let g:fuf_patternSeparator = ';' -< - 入力パターンをプライマリパターンと絞り込みパターン列に区切る文字列。 - - *g:fuf_promptHighlight* > - let g:fuf_promptHighlight = 'Question' -< - プロンプトをハイライトするグループ名。 - - *g:fuf_ignoreCase* > - let g:fuf_ignoreCase = 1 -< - 真なら、大文字小文字を無視します。 - - *g:fuf_splitPathMatching* > - let g:fuf_splitPathMatching = 1 -< - 真なら、プライマリパターンのマッチングは head 部とtail 部に分けて行わ - れます。 - - See also: |fuf-search-patterns| - - *g:fuf_fuzzyRefining* > - let g:fuf_fuzzyRefining = 0 -< - 真なら、絞り込みパターンについて部分一致マッチングの代わりにあいまいマ - ッチングが行われます。 - - See also: |fuf-search-patterns| - - *g:fuf_reuseWindow* > - let g:fuf_reuseWindow = 1 -< - 真なら、すでに開かれているバッファを開くとき、目的のバッファを含むウィ - ンドウを再利用します。 - - *g:fuf_timeFormat* > - let g:fuf_timeFormat = '(%Y-%m-%d %H:%M:%S)' -< - アイテムが登録された日時の書式を設定します。書式の詳細は|strftime()|を - 参照してください。 - - *g:fuf_learningLimit* > - let g:fuf_learningLimit = 100 -< - 保持する補完統計データのモード毎の上限値です。 - - *g:fuf_enumeratingLimit* > - let g:fuf_enumeratingLimit = 50 -< - レスポンスを向上させるため、補完アイテムの列挙をこの数に達した時点で打 - ち切ります。 - - *g:fuf_maxMenuWidth* > - let g:fuf_maxMenuWidth = 78 -< - 長い補完アイテムは、この長さに収まるよう省略して表示します。 - - *g:fuf_previewHeight* > - let g:fuf_previewHeight = 0 -< - プレビューをサポートするモードを起動したとき、'cmdheight'がこの値に設 - 定されます。選択されている補完アイテムの情報がコマンドライン領域に表示 - されます。0 ならプレビュー機能は無効になります。 - - *g:fuf_autoPreview* > - let g:fuf_autoPreview = 0 -< - 真ならプレビューを自動的に表示します。 - - *g:fuf_useMigemo* > - let g:fuf_useMigemo = 0 -< - 真なら migemo を利用します。 - - *fuf-options-for-buffer-mode* -Buffer モード用 ~ - - *g:fuf_buffer_prompt* > - let g:fuf_buffer_prompt = '>Buffer[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_buffer_switchOrder* > - let g:fuf_buffer_switchOrder = 10 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_buffer_mruOrder* > - let g:fuf_buffer_mruOrder = 1 -< - 真なら、最後に使った時間順に補完アイテムをソートします。 - - *g:fuf_buffer_keyDelete* > - let g:fuf_buffer_keyDelete = '' -< - 選択したバッファを削除するキー。 - - *fuf-options-for-file-mode* -File モード用 ~ - - *g:fuf_file_prompt* > - let g:fuf_file_prompt = '>File[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_file_switchOrder* > - let g:fuf_file_switchOrder = 20 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_file_exclude* > - let g:fuf_file_exclude = '\v\~$|\.(o|exe|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])' -< - 補完リストから除外したいアイテムの正規表現パターン。 - - *fuf-options-for-coveragefile-mode* -Coverage-File モード用 ~ - - *g:fuf_coveragefile_prompt* > - let g:fuf_coveragefile_prompt = '>CoverageFile[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_coveragefile_switchOrder* > - let g:fuf_coveragefile_switchOrder = 30 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_coveragefile_exclude* > - let g:fuf_coveragefile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])' -< - 補完リストから除外したいアイテムの正規表現パターン。 - - *g:fuf_coveragefile_globPatterns* > - let g:fuf_coveragefile_globPatterns = ['**/.*', '**/*'] -< - 検索されるファイルパスを得るためのglobパターンのリスト。 - - *fuf-options-for-dir-mode* -Directory モード用 ~ - - *g:fuf_dir_prompt* > - let g:fuf_dir_prompt = '>Dir[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_dir_switchOrder* > - let g:fuf_dir_switchOrder = 40 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_dir_exclude* > - let g:fuf_dir_exclude = '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])' -< - 補完リストから除外したいアイテムの正規表現パターン。 - - *fuf-options-for-mrufile-mode* -MRU-File モード用 ~ - - *g:fuf_mrufile_prompt* > - let g:fuf_mrufile_prompt = '>MRU-File[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_mrufile_switchOrder* > - let g:fuf_mrufile_switchOrder = 50 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_mrufile_exclude* > - let g:fuf_mrufile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)' -< - 補完リストから除外したいアイテムの正規表現パターン。 - - *g:fuf_mrufile_maxItem* > - let g:fuf_mrufile_maxItem = 200 -< - 保持するMRUアイテムの上限値。 - - *g:fuf_mrufile_maxItemDir* > - let g:fuf_mrufile_maxItemDir = 50 -< - 保持するMRUアイテムの親ディレクトリ(周辺検索で使われる)の上限値。 - - *g:fuf_mrufile_keyExpand* > - let g:fuf_mrufile_keyExpand = '' -< - 検索する範囲を広げるキー。 - - *fuf-options-for-mrucmd-mode* -MRU-Cmd モード用 ~ - - *g:fuf_mrucmd_prompt* > - let g:fuf_mrucmd_prompt = '>MRU-Cmd[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_mrucmd_switchOrder* > - let g:fuf_mrucmd_switchOrder = 60 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_mrucmd_exclude* > - let g:fuf_mrucmd_exclude = '^$' -< - 補完リストから除外したいアイテムの正規表現パターン。 - - *g:fuf_mrucmd_maxItem* > - let g:fuf_mrucmd_maxItem = 200 -< - 保持するMRUアイテムの上限値。 - - *fuf-options-for-bookmarkfile-mode* -Bookmark-File モード用 ~ - - *g:fuf_bookmarkfile_prompt* > - let g:fuf_bookmarkfile_prompt = '>BookmarkFile[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_bookmarkfile_switchOrder* > - let g:fuf_bookmarkfile_switchOrder = 70 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_bookmarkfile_searchRange* > - let g:fuf_bookmarkfile_searchRange = 400 -< - ジャンプするとき、ブックマークした位置からこの行数の範囲内でブックマー - クしたときのパターンとマッチする行を探します。 - - *g:fuf_bookmarkfile_keyDelete* > - let g:fuf_bookmarkfile_keyDelete = '' -< - 選択したブックマークを削除するキー。 - - *fuf-options-for-bookmarkdir-mode* -Bookmark-Dir モード用 ~ - - *g:fuf_bookmarkdir_prompt* > - let g:fuf_bookmarkdir_prompt = '>BookmarkDir[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_bookmarkdir_switchOrder* > - let g:fuf_bookmarkdir_switchOrder = 80 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_bookmarkdir_keyDelete* > - let g:fuf_bookmarkdir_keyDelete = '' -< - 選択したブックマークを削除するキー。 - - *fuf-options-for-tag-mode* -Tag モード用 ~ - - *g:fuf_tag_prompt* > - let g:fuf_tag_prompt = '>Tag[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_tag_switchOrder* > - let g:fuf_tag_switchOrder = 90 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *fuf-options-for-buffertag-mode* -For Buffer-Tag モード用 ~ - - *g:fuf_buffertag_prompt* > - let g:fuf_buffertag_prompt = '>Buffer-Tag[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_buffertag_switchOrder* > - let g:fuf_buffertag_switchOrder = 100 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *g:fuf_buffertag_ctagsPath* > - let g:fuf_buffertag_ctagsPath = 'ctags' -< - Ctagsの実行ファイルのパス - - *fuf-options-for-taggedfile-mode* -Tagged-File モード用 ~ - - *g:fuf_taggedfile_prompt* > - let g:fuf_taggedfile_prompt = '>Tagged-File[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_taggedfile_switchOrder* > - let g:fuf_taggedfile_switchOrder = 110 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *fuf-options-for-jumplist-mode* -Jump-List モード用 ~ - - *g:fuf_jumplist_prompt* > - let g:fuf_jumplist_prompt = '>Jump-List[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_jumplist_switchOrder* > - let g:fuf_jumplist_switchOrder = 120 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *fuf-options-for-changelist-mode* -Change-List モード用 ~ - - *g:fuf_changelist_prompt* > - let g:fuf_changelist_prompt = '>Change-List[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_changelist_switchOrder* > - let g:fuf_changelist_switchOrder = 130 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *fuf-options-for-quickfix-mode* -Quickfix モード用 ~ - - *g:fuf_quickfix_prompt* > - let g:fuf_quickfix_prompt = '>Quickfix[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_quickfix_switchOrder* > - let g:fuf_quickfix_switchOrder = 140 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *fuf-options-for-line-mode* -Line モード用 ~ - - *g:fuf_line_prompt* > - let g:fuf_line_prompt = '>Line[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_line_switchOrder* > - let g:fuf_line_switchOrder = 150 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - *fuf-options-for-help-mode* -Help モード用 ~ - - *g:fuf_help_prompt* > - let g:fuf_help_prompt = '>Help[]>' -< - プロンプト文字列。"[]" はインジケータに置換されます。 - - *g:fuf_help_switchOrder* > - let g:fuf_help_switchOrder = 160 -< - 次/前のモードに切り替えるときの、モードの順位です。負数ならこのモード - には切り替えません。 - - -============================================================================== -vimrc の例 *fuf-vimrc-example* - -> - let g:fuf_modesDisable = [] - let g:fuf_mrufile_maxItem = 400 - let g:fuf_mrucmd_maxItem = 400 - nnoremap sj :FufBuffer - nnoremap sk :FufFileWithCurrentBufferDir - nnoremap sK :FufFileWithFullCwd - nnoremap s :FufFile - nnoremap sl :FufCoverageFileChange - nnoremap sL :FufCoverageFileChange - nnoremap s :FufCoverageFileRegister - nnoremap sd :FufDirWithCurrentBufferDir - nnoremap sD :FufDirWithFullCwd - nnoremap s :FufDir - nnoremap sn :FufMruFile - nnoremap sN :FufMruFileInCwd - nnoremap sm :FufMruCmd - nnoremap su :FufBookmarkFile - nnoremap s :FufBookmarkFileAdd - vnoremap s :FufBookmarkFileAddAsSelectedText - nnoremap si :FufBookmarkDir - nnoremap s :FufBookmarkDirAdd - nnoremap st :FufTag - nnoremap sT :FufTag! - nnoremap s :FufTagWithCursorWord! - nnoremap s, :FufBufferTag - nnoremap s< :FufBufferTag! - vnoremap s, :FufBufferTagWithSelectedText! - vnoremap s< :FufBufferTagWithSelectedText - nnoremap s} :FufBufferTagWithCursorWord! - nnoremap s. :FufBufferTagAll - nnoremap s> :FufBufferTagAll! - vnoremap s. :FufBufferTagAllWithSelectedText! - vnoremap s> :FufBufferTagAllWithSelectedText - nnoremap s] :FufBufferTagAllWithCursorWord! - nnoremap sg :FufTaggedFile - nnoremap sG :FufTaggedFile! - nnoremap so :FufJumpList - nnoremap sp :FufChangeList - nnoremap sq :FufQuickfix - nnoremap sy :FufLine - nnoremap sh :FufHelp - nnoremap se :FufEditDataFile - nnoremap sr :FufRenewCache -< - -============================================================================== -あばうと *fuf-about* *fuf-contact* *fuf-author* - -作者: Takeshi NISHIDA -ライセンス: MIT Licence -URL: http://www.vim.org/scripts/script.php?script_id=1984 - http://bitbucket.org/ns9tks/vim-fuzzyfinder/ - -バグや要望など ~ - -こちらへどうぞ: http://bitbucket.org/ns9tks/vim-fuzzyfinder/issues/ - -============================================================================== - vim:tw=78:ts=8:ft=help:norl: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.txt b/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.txt deleted file mode 100644 index 2e368313..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/fuf.txt +++ /dev/null @@ -1,1883 +0,0 @@ -*fuf.txt* buffer/file/command/tag/etc explorer with fuzzy matching. - - Copyright (c) 2007-2010 Takeshi NISHIDA - -FuzzyFinder *fuzzyfinder* *fuf* - -INTRODUCTION |fuf-introduction| -INSTALLATION |fuf-installation| -USAGE |fuf-usage| -MODES |fuf-modes| -DETAILED TOPICS |fuf-detailed-topics| -COMMANDS |fuf-commands| -OPTIONS |fuf-options| -VIMRC EXAMPLE |fuf-vimrc-example| -SPECIAL THANKS |fuf-thanks| -CHANGELOG |fuf-changelog| -ABOUT |fuf-about| - -============================================================================== -INTRODUCTION *fuf-introduction* - -FuzzyFinder provides convenient ways to quickly reach the -buffer/file/command/bookmark/tag you want. FuzzyFinder searches with the -fuzzy/partial pattern to which it converted an entered pattern. - - Entered pattern Fuzzy pattern Partial pattern ~ -> - abc *a*b*c* *abc* - dir/file dir/*f*i*l*e* dir/*file* - d*r/file d*r/*f*i*l*e* d*r/*file* - ../**/s ../**/*s* ../**/*s* - (** allows searching a directory tree.) -< -You will be happy when: - - "./AhLongLongLongLongLongFile.txt" - "./AhLongLongLongLongLongName.txt" - "./OhLongLongLongLongLongFile.txt" - "./OhLongLongLongLongLongName.txt" <- you want :O - -Type "ON" and "OhLongLongLongLongLongName.txt" will be selected. :D - -FuzzyFinder can search: - - - buffers - - files - - directories - - most recently used files - - files around most recently used files - - most recently used command-lines - - bookmarked files - - bookmarked directories - - tags - - files which are included in current tagfiles - - jump list - - change list - - buffer lines - - quickfix - - help - -FuzzyFinder also provides APIs to use its system of searching files or -selecting items. - -FuzzyFinder supports multibyte characters. - - -============================================================================== -INSTALLATION *fuf-installation* - -Put all files into your runtime directory. If you have the zip file, extract -it to your runtime directory. - -You should place the files as follows: -> - /plugin/fuf.vim - /doc/fuf.txt - ... -< -If you are disgusted to make your runtime directory confused with a lot of -plugins, put each of the plugins into a directory individually and just add -the directory path to 'runtimepath'. It's easy to uninstall plugins. - -Then update your help tags files to enable help for this plugin. See -|add-local-help| for details. - -Requirements: ~ - -- L9 library (vimscript #3252) - - -============================================================================== -USAGE *fuf-usage* - -You can launch FuzzyFinder by the following commands: - - Command Mode ~ - |:FufBuffer| - Buffer mode (|fuf-buffer-mode|) - |:FufFile| - File mode (|fuf-file-mode|) - |:FufCoverageFile| - Coverage-File mode (|fuf-coveragefile-mode|) - |:FufDir| - Directory mode (|fuf-dir-mode|) - |:FufMruFile| - MRU-File mode (|fuf-mrufile-mode|) - |:FufMruCmd| - MRU-Command mode (|fuf-mrucmd-mode|) - |:FufBookmarkFile| - Bookmark-File mode (|fuf-bookmarkfile-mode|) - |:FufBookmarkDir| - Bookmark-Dir mode (|fuf-bookmarkdir-mode|) - |:FufTag| - Tag mode (|fuf-tag-mode|) - |:FufBufferTag| - Buffer-Tag mode (|fuf-buffertag-mode|) - |:FufTaggedFile| - Tagged-File mode (|fuf-taggedfile-mode|) - |:FufJumpList| - Jump-List mode (|fuf-jumplist-mode|) - |:FufChangeList| - Change-List mode (|fuf-changelist-mode|) - |:FufQuickfix| - Quickfix mode (|fuf-quickfix-mode|) - |:FufLine| - Line mode (|fuf-line-mode|) - |:FufHelp| - Help mode (|fuf-help-mode|) - -It is recommended to map these commands. - -These commands open 1-line buffer to enter search pattern and start insert -mode. - -FuzzyFinder searchs for matching items with an entered pattern and shows them -in a completion menu. For more details on pattern matching, see -|fuf-search-patterns|. - -If there are a lot of matching items, FuzzyFinder limits the number of -enumerating items (|g:fuf_enumeratingLimit|) to speed up a response time, and -highlights the pattern with "Error" group. - -The first item in the completion menu will be selected automatically. - -Typing deletes one block of an entered pattern before the cursor, like a -directory name. - -with (|g:fuf_keyPrevPattern|) and (|g:fuf_keyNextPattern|), You -can recall patterns which have been entered before from history. - -You can open a selected item in various ways: - - (|g:fuf_keyOpen|) - opens in a previous window. - (|g:fuf_keyOpenSplit|) - opens in a split window. - (|g:fuf_keyOpenVsplit|) - opens in a vertical-split window. - (|g:fuf_keyOpenTabpage|) - opens in a new tab page. - -To cancel and return to previous window, just leave Insert mode. - -With (|g:fuf_keySwitchMatching|), You can switch search method -between fuzzy matching and partial matching. - -With (|g:fuf_keyNextMode|) and (|g:fuf_keyPrevMode|), You can -switch current mode without leaving Insert mode . - -You can preview selected item with (|g:fuf_keyPreview|) in some modes. -Repeating the key on the same item shows another information. The height -of command-line area is changed to |g:fuf_previewHeight| when you launch a -mode supporting preview. This feature is available when |g:fuf_previewHeight| -is not 0. - - -============================================================================== -MODES *fuf-modes* - - *fuf-buffer-mode* -Buffer mode ~ - -This mode provides an interface to select a buffer from a list of existing -buffers and open it. - -Press (|g:fuf_buffer_keyDelete|) in this mode and selected buffer will -be deleted. - - *fuf-file-mode* -File mode ~ - -This mode provides an interface to search a file tree for a file and open it. - - *fuf-coveragefile-mode* -Coverage-File mode ~ - -This mode provides an interface to select a file from all files of a preset -coverage and open it. - -By default, This mode lists all files under the current working directory -recursively. (|g:fuf_coveragefile_globPatterns|) - -If you want to search other coverage, execute |FufCoverageFileRegister| -command to register new search coverage and |FufCoverageFileChange| command to -choose a search coverage and launch Coverage-File mode. - -In addition, there is another way to change a search coverage with -|fuf#setOneTimeVariables()| function. - -Example: search only .h and .c files: -> - call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns', ['**/*.h', '**/*.c']]) - \ | FufCoverageFile -< -Example: search your home directory in addition to the default coverage: -> - call fuf#setOneTimeVariables(['g:fuf_coveragefile_globPatterns', g:fuf_coveragefile_globPatterns + ['~/**/.*', '~/**/*']]) - \ | FufCoverageFile -< - - *fuf-dir-mode* -Directory mode ~ - -This mode provides an interface to search a file tree for a directory and -change the current directory. - - *fuf-mrufile-mode* -MRU-File mode ~ - -This mode provides an interface to select a file from the most recently used -files and open it. - -Press (|g:fuf_mrufile_keyExpand|) in this mode and files around the most -recently used files are listed. Each time the key is pressed, the search range -are expanded one level along the directory tree upwardly/downwardly. - -This mode is set to disable by default (|g:fuf_modesDisable|) because -processes for this mode in |BufEnter| and |BufWritePost| could cause -Performance issue. - -See also: |FufMruFileInCwd| - - *fuf-mrucmd-mode* -MRU-Command mode ~ - -This mode provides an interface to select a command from the most recently -used commands and execute it. - -This mode is set to disable by default (|g:fuf_modesDisable|) because mapping - of Command-line mode required by this mode has side effects. - - *fuf-bookmarkfile-mode* -Bookmark-File mode ~ - -This mode provides an interface to select one of the bookmarks you have added -beforehand and jump there. - -You can add a cursor line to bookmarks by |:FufBookmarkFileAdd| command. -Execute that command and you will be prompted to enter a bookmark name. - -FuzzyFinder adjusts a line number for jump. If a line of bookmarked position -does not match to a pattern when the bookmark was added, FuzzyFinder searches -a matching line around bookmarked position. So you can jump to a bookmarked -line even if the line is out of bookmarked position. If you want to jump to -bookmarked line number without the adjustment, set -|g:fuf_bookmarkfile_searchRange| option to 0. - -Press (|g:fuf_bookmarkfile_keyDelete|) in this mode and selected -bookmark will be deleted. - - *fuf-bookmarkdir-mode* -Bookmark-Dir mode ~ - -This mode provides an interface to select one of the bookmarks you have added -beforehand and change the current directory. - -You can add a directory to bookmarks by |:FufBookmarkDirAdd| command. Execute -that command and you will be prompted to enter a directory path and a -bookmark name. - -Press (|g:fuf_bookmarkdir_keyDelete|) in this mode and selected bookmark -will be deleted. - - *fuf-tag-mode* -Tag mode ~ - -This mode provides an interface to select a tag and jump to the definition of -it. - -Following mapping is a replacement for : -> - noremap :FufTagWithCursorWord! -< - - *fuf-buffertag-mode* -Buffer-Tag mode ~ - -This mode provides an interface to select a tag of current buffer or all -buffers and jump to the definition of it. - -Tag list is instantly created when FuzzyFinder is launched, so there is no -need to make tags file in advance. - -|FufBufferTag| covers current buffer and |FufBufferTagAll| covers all buffers. - -Following mapping is a replacement for : -> - nnoremap :FufBufferTagWithCursorWord! - vnoremap :FufBufferTagAllWithSelectedText! -< -or -> - nnoremap :FufBufferTagAllWithCursorWord! - vnoremap :FufBufferTagAllWithSelectedText! -< -This mode is inspired by taglist.vim (vimscript #273) and refered its codes. - - *fuf-taggedfile-mode* -Tagged-File mode ~ - -This mode provides an interface to select one of the files which are included -in current tagfiles and open it. - - *fuf-jumplist-mode* -Jump-List mode ~ - -This mode provides an interface to select one from the |jumplist| of the -current window and jump there. - - *fuf-changelist-mode* -Change-List mode ~ - -This mode provides an interface to select one from the |changelist| of the -current buffer and jump there. - - *fuf-quickfix-mode* -Quickfix mode ~ - -This mode provides an interface to select one from the |quickfix| list and -jump there. - - *fuf-line-mode* -Line mode ~ - -This mode provides an interface to select a line from current buffer and jump -there. - - *fuf-help-mode* -Help mode ~ - -This mode provides an interface to select a help tag and jump to the help -page. - - *fuf-givenfile-mode* -Given-File mode ~ - -This mode provides an API to open a selected file from a given list. - -API function: -> - function fuf#givenfile#launch( - \ initialPattern, partialMatching, prompt, items) -< - initialPattern - String which is inserted after launching - FuzzyFinder. - partialMatching - If non-zero, enable partial matching instead of - fuzzy matching. - prompt - Prompt string - items - List of items. - -Example of use: -> - " Open one of your dotfiles. - call fuf#givenfile#launch('', 0, '>', split(glob('~/.*'), "\n")) -< - - *fuf-givendir-mode* -Given-Directory mode ~ - -This mode provides an API to change current working directory to a selected -one from a given list. - -API function: -> - function fuf#givendir#launch( - \ initialPattern, partialMatching, prompt, items) -< - initialPattern - String which is inserted after launching - FuzzyFinder. - partialMatching - If non-zero, enable partial matching instead of - fuzzy matching. - prompt - Prompt string - items - List of items. - - -Example of use: -> - " Change current working directory to one of your runtime directory. - call fuf#givendir#launch('', 0, '>', split(&runtimepath, ',')) -< - - *fuf-givencmd-mode* -Given-Command mode ~ - -This mode provides an API to execute a selected command from a given list. - -A selected command is executed by |feedkeys()|, so it is able to emulate a -series of key input in Normal mode. - -API function: -> - function fuf#givencmd#launch( - \ initialPattern, partialMatching, prompt, items) -< - initialPattern - String which is inserted after launching - FuzzyFinder. - partialMatching - If non-zero, enable partial matching instead of - fuzzy matching. - prompt - Prompt string - items - List of items. - - -Example of use: -> - function GetAllCommands() - redir => commands - silent command - redir END - return map((split(commands, "\n")[3:]), - \ '":" . matchstr(v:val, ''^....\zs\S*'')') - endfunction - - " execute one of the user-defined commands - call fuf#givencmd#launch('', 0, '>', GetAllCommands()) - -< - - *fuf-callbackfile-mode* -Callback-File mode ~ - -This mode provides an API to find and get a file path which is selected by an -user. - -API function: -> - function fuf#callbackfile#launch( - \ initialPattern, partialMatching, prompt, exclude, listener) -< - initialPattern - String which is inserted after launching - FuzzyFinder. - partialMatching - If non-zero, enable partial matching instead of - fuzzy matching. - prompt - Prompt string. - exclude - Regexp pattern for items which you want to exclude - from completion list. - listener - |Dictionary| which has 'onComplete' and 'onAbort'. - They are called at the end of FuzzyFinder. - listener.onComplete(item, method) is called with 2 - arguments which are a name of selected item and a - number of open method when completed. - listener.onAbort() is called when aborted. - -Example of use: -> - let listener = {} - - function listener.onComplete(item, method) - echo "Item: " . a:item . "\nMethod: " . a:method - endfunction - - function listener.onAbort() - echo "Abort" - endfunction - - " Find a file from current working directory. - call fuf#callbackfile#launch('', 0, '>', '', listener) - - " Find a file from home directory. - call fuf#callbackfile#launch('~/', 0, '>', '', listener) -< - - *fuf-callbackitem-mode* -Callback-Item mode ~ - -This mode provides an API to get an item which is selected from a given list -by an user. - -API function: -> - function fuf#callbackitem#launch( - \ initialPattern, partialMatching, prompt, listener, items, forPath) -< - initialPattern - String which is inserted after launching - FuzzyFinder. - partialMatching - If non-zero, enable partial matching instead of - fuzzy matching. - prompt - Prompt string - listener - |Dictionary| which has 'onComplete' and 'onAbort'. - They are called at the end of FuzzyFinder. - listener.onComplete(item, method) is called with 2 - arguments which are a name of selected item and a - number of open method when completed. - listener.onAbort() is called when aborted. - items - List of items. - forPath - If non-zero, use a matching method for files. - -Example of use: -> - let listener = {} - - function listener.onComplete(item, method) - echo "Item: " . a:item . "\nMethod: " . a:method - endfunction - - function listener.onAbort() - echo "Abort" - endfunction - - " Select an item from a given list. - call fuf#callbackitem#launch('', 0, '>', listener, ['ed', 'vi', 'vim'], 0) - - " Select a file from a given list. - call fuf#callbackitem#launch('', 0, '>', listener, ['../foo/bar', 'baz'], 1) -< - -============================================================================== -DETAILED TOPICS *fuf-detailed-topics* - - *fuf-setting-one-time-option* *fuf#setOneTimeVariables()* -Setting One-Time Options ~ - -If you want to set one-time options only for the next FuzzyFinder, -|fuf#setOneTimeVariables()| function will be of help. This function is used as -follows: -> - call fuf#setOneTimeVariables(['g:fuf_ignoreCase', 0], ['&lines', 50]) -< -This function takes 0 or more arguments and each of them is a pair of a -variable name and its value. Specified options will be set practically next -time FuzzyFinder is launched, and restored when FuzzyFinder is closed. - - *fuf-search-patterns* -Search Patterns ~ - -You can enter one primary pattern and zero or more refining patterns as search -patterns. An entered pattern is separated by ";" (|g:fuf_patternSeparator|), -and the first pattern is a primary pattern and the rest of patterns is a -refining pattern. -> - primary refining refining - |----------| |-------| |----| - >MruFile>bookmark.vim;autoload/;/home/ -< -A refining pattern is used to narrow down the list of matching items by -another pattern. - -With a primary pattern, FuzzyFinder does fuzzy matching or partial matching, -which you specified. With a refining pattern, FuzzyFinder does partial -matching by default. (|g:fuf_fuzzyRefining|) - -When you enter a number as refining pattern, it also can match the index of -each item. - -In a mode which targets a static set of file paths (such as Buffer or MRU-File -mode, not File or Directory) and |g:fuf_splitPathMatching| is non-zero, -matching with a primary pattern is divided into head part and tail part and -done individually. -> - head tail - |------||-----| - foo/bar/baz.vim - - fuzzy matching example: - +----------------+---------+---------+---------+ - | item \ pattern | foo/bar | foo/ | bar | - +----------------+---------+---------+---------+ - | foo/bar | match | match | match | - | foo/abc | unmatch | match | unmatch | - | abc/bar | unmatch | unmatch | match | - | foobar | unmatch | unmatch | match | - | foooo/barrrr | match | match | match | - | foooo/fooooo | unmatch | match | unmatch | - +----------------+---------+---------+---------+ -< -refining pattern can match anywhere on each path in the above case. - - *fuf-sorting-of-completion-items* -Sorting Of Completion Items ~ - -FuzzyFinder sorts completion items with some rules. - -An item, one part of which is matched with a whole pattern, is placed upper. -E.g., with the pattern "bc", the item "abc" is placed upper than "bac". - -In the above case, items, each having matching part at the head of itself, are -placed upper than others. E.g., with the pattern "foo", the item "foobar" is -placed upper than "foobarbaz". - -And the shorter the length of the item after matching position puts it higher. -E.g., with the pattern "bar", the item "foobar" is placed upper than -"foobarbaz". - -If a pattern matches an item at only word boundaries of it, the item is placed -upper. E.g., with a pattern "fb", items such as "fooBarBaz" and "foo_bar_baz" -is placed upper. - -Plus, FuzzyFinder has a learning system. An item which has been completed in -the past with current pattern is placed upper. - - *fuf-reusing-window* -Reusing Of A Window Containing Target Buffer/File ~ - -If a window containing target buffer is found in current tab page when -FuzzyFinder is going to open the buffer in a split new window, move to it. If -a window containing target buffer is found in other tab page when FuzzyFinder -is going to open the buffer in a new tab page, move to it. - -You can disable that feature via 'reuse_window' options if always want to open -a buffer in a new window. - - *fuf-hiding-menu* -To Hide The Completion Menu Temporarily In FuzzyFinder ~ - -You can close it by and reopen it by . - - *fuf-abbreviation* *fuf-multiple-search* -Abbreviations And Multiple Search ~ - -You can use abbreviations and multiple search in all modes by setting -|g:fuf_abbrevMap| option. - -For example, set as below: -> - let g:fuf_abbrevMap = { - \ "^doc:" : [ - \ "~/project/**/doc/", - \ ".vim/doc/", - \ ], - \ } -< -and enter "doc:txt" in File mode, then FuzzyFinder searches by the following -patterns: - - "~/project/**/doc/*t*x*t*" - ".vim/doc/*t*x*t*" - -and show concatenated search results. - - *fuf-data-file* -Data File ~ - -FuzzyFinder writes completion statistics, MRU data, bookmark, etc to files -under |g:fuf_dataDir|. - -|:FufEditDataFile| command is helpful in editing your data files. This command -reads the data file in new unnamed buffer. Write the buffer and the data file -will be updated. - - *fuf-cache* -Cache ~ - -Once a cache was created, It is not automatically updated to speed up the -response time by default. To update it, use |:FufRenewCache| command. - - *fuf-dot-sequence* -Going Up Parent Directories With Dot Sequence ~ - -You can go up parent directories with entering dot sequence. Dot sequence -after a path separator is expanded to "../" sequence. - - Dot sequence Expanded pattern ~ - /.. /../ - /... /../../ - /.... /../../../ - - *fuf-how-to-add-mode* -How To Add Mode ~ - -To add "mymode" mode, put the source file at autoload/fuf/mymode.vim and call -fuf#addMode("mymode") . - - *fuf-migemo* -What Is Migemo ~ - -Migemo is a search method for Japanese language. - - -============================================================================== -COMMANDS *fuf-commands* - -See also: |fuf-vimrc-example| - - *:FufBuffer* -:FufBuffer[!] [{pattern}] - Launchs Buffer mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufFile* -:FufFile[!] [{pattern}] - Launchs File mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufFileWithFullCwd* -:FufFileWithFullCwd[!] [{pattern}] - Is mostly the same as |:FufFile|, except that initial pattern is a - full path of current working directory. - - *:FufFileWithCurrentBufferDir* -:FufFileWithCurrentBufferDir[!] [{pattern}] - Is mostly the same as |:FufFile|, except that initial pattern is a - path of directory current buffer is in. - - *:FufCoverageFile* -:FufCoverageFile[!] [{pattern}] - Launchs Coverage-File mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufDir* -:FufDir[!] [{pattern}] - Launchs Directory mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufDirWithFullCwd* -:FufDirWithFullCwd[!] [{pattern}] - Is mostly the same as |:FufDir|, except that initial pattern is a full - path of current working directory. - - *:FufDirWithCurrentBufferDir* -:FufDirWithCurrentBufferDir[!] [{pattern}] - Is mostly the same as |:FufDir|, except that initial pattern is a path - of directory current buffer is in. - - *:FufMruFile* -:FufMruFile[!] [{pattern}] - Launchs MRU-File mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufMruFileInCwd* -:FufMruFileInCwd[!] [{pattern}] - Is mostly the same as |:FufMruFile|, except that files - only in current working directory are listed. - - *:FufMruCmd* -:FufMruCmd[!] [{pattern}] - Launchs MRU-Command mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufBookmarkFile* -:FufBookmarkFile[!] [{pattern}] - Launchs Bookmark-File mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufBookmarkDir* -:FufBookmarkDir[!] [{pattern}] - Launchs Bookmark-Dir mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufTag* -:FufTag[!] [{pattern}] - Launchs Tag mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufTagWithCursorWord* -:FufTagWithCursorWord[!] [{pattern}] - Is mostly the same as |:FufTag|, except that initial pattern is the - word under the cursor. - - *:FufBufferTag* -:FufBufferTag[!] [{pattern}] - Launchs Buffer-Tag mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufBufferTagAll* -:FufBufferTagAll[!] [{pattern}] - Is mostly the same as |:FufBufferTag|, except that tags are gathered - from all other buffers in addition to the current one. - - *:FufBufferTagWithCursorWord* -:FufBufferTagWithCursorWord[!] [{pattern}] - Is mostly the same as |:FufBufferTag|, except that initial pattern is - the word under the cursor. - - *:FufBufferTagAllWithCursorWord* -:FufBufferTagAllWithCursorWord[!] [{pattern}] - Is mostly the same as |:FufBufferTagAll|, except that initial pattern - is the word under the cursor. - - *:FufBufferTagWithSelectedText* -:FufBufferTagWithSelectedText[!] [{pattern}] - Is mostly the same as |:FufBufferTag|, except that initial pattern is - the last selected text. - - *:FufBufferTagAllWithSelectedText* -:FufBufferTagAllWithSelectedText[!] [{pattern}] - Is mostly the same as |:FufBufferTagAll|, except that initial pattern - is the last selected text. - - *:FufTaggedFile* -:FufTaggedFile[!] [{pattern}] - Launchs Tagged-File mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufJumpList* -:FufJumpList[!] [{pattern}] - Launchs Jump-List mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufChangeList* -:FufChangeList[!] [{pattern}] - Launchs Change-List mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufQuickfix* -:FufQuickfix[!] [{pattern}] - Launchs Quickfix mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufLine* -:FufLine[!] [{pattern}] - Launchs Line mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufHelp* -:FufHelp[!] [{pattern}] - Launchs Help mode. - - If a command was executed with a ! modifier, it does partial matching - instead of fuzzy matching. - - {pattern} will be inserted after launching FuzzyFinder. - - *:FufEditDataFile* -:FufEditDataFile - Opens a buffer for editing your data files. See |fuf-data-file| for - details. - - *:FufCoverageFileRegister* -:FufCoverageFileRegister - Registers new search coverage to be searched in Coverage-File mode. - First, input glob patterns, like ~/* . You can add patterns unless - typing . Next, input coverage name. - - See also: |glob()|, |fuf-coveragefile-mode| - - *:FufCoverageFileChange* -:FufCoverageFileChange [{name}] - Launchs Coverage-File mode with a chosen coverage, registered with - |FufCoverageFileRegister| command. - - If location name is given, the choise process will be skipped. - - See also: |fuf-coveragefile-mode| - - *:FufBookmarkFileAdd* -:FufBookmarkFileAdd [{name}] - Adds a cursor line to bookmarks. - - See also: |fuf-bookmarkfile-mode| - - *:FufBookmarkFileAddAsSelectedText* -:FufBookmarkFileAddAsSelectedText - Is mostly the same as |:FufBookmarkFileAdd|, except that initial - pattern is the last selected one. - - *:FufBookmarkDirAdd* -:FufBookmarkDirAdd [{name}] - Adds a directory to bookmarks. - - See also: |fuf-bookmarkdir-mode| - - *:FufRenewCache* -:FufRenewCache - Removes caches to renew completion items. See |fuf-cache| for details. - - -============================================================================== -OPTIONS *fuf-options* - - *fuf-options-for-all-modes* -For All Modes ~ - - *g:fuf_modesDisable* > - let g:fuf_modesDisable = [ 'mrufile', 'mrucmd', ] -< - List of mode names to disable. - - Modes which are listed will never be initialized and never handle any - event. - - *g:fuf_keyOpen* > - let g:fuf_keyOpen = '' -< - Key mapped to select completion item or finish input and open a - buffer/file in previous window. - - *g:fuf_keyOpenSplit* > - let g:fuf_keyOpenSplit = '' -< - Key mapped to select completion item or finish input and open a - buffer/file in split new window - - *g:fuf_keyOpenVsplit* > - let g:fuf_keyOpenVsplit = '' -< - Key mapped to select completion item or finish input and open a - buffer/file in vertical-split new window. - - *g:fuf_keyOpenTabpage* > - let g:fuf_keyOpenTabpage = '' -< - - Key mapped to select completion item or finish input and open a - buffer/file in a new tab page. - - *g:fuf_keyPreview* > - let g:fuf_keyPreview = '' -< - - Key mapped to show information of selected completion item on - command-line area. This key makes sense only in modes supporting - preview. - - *g:fuf_keyNextMode* > - let g:fuf_keyNextMode = '' -< - Key mapped to switch to next mode. - - *g:fuf_keyPrevMode* > - let g:fuf_keyPrevMode = '' -< - Key mapped to switch to previous mode. - - *g:fuf_keyPrevPattern* > - let g:fuf_keyPrevPattern = '' -< - Key mapped to recall previous entered patten from history. - - *g:fuf_keyNextPattern* > - let g:fuf_keyNextPattern = '' -< - Key mapped to recall next entered patten from history. - - *g:fuf_keySwitchMatching* > - let g:fuf_keySwitchMatching = '' -< - Key mapped to switch between fuzzy matching and partial matching. - - *g:fuf_dataDir* > - let g:fuf_dataDir = '~/.vim-fuf-data' -< - Directory path to which data files is put. If empty string, - FuzzyFinder does not write data files. - - *g:fuf_abbrevMap* > - let g:fuf_abbrevMap = {} -< - |Dictionary|. Each value must be a |List|. All matchs of a - key in entered text is expanded with the value. - - *g:fuf_patternSeparator* > - let g:fuf_patternSeparator = ';' -< - String which sparates a input pattern into a primary pattern and - refining patterns. - - *g:fuf_promptHighlight* > - let g:fuf_promptHighlight = 'Question' -< - a highlight group name for a prompt string. - - *g:fuf_ignoreCase* > - let g:fuf_ignoreCase = 1 -< - If non-zero, FuzzyFinder ignores case in search patterns. - - *g:fuf_splitPathMatching* > - let g:fuf_splitPathMatching = 1 -< - If non-zero, matching with a primary pattern is divided into head part - and tail part and done individually. - - See also: |fuf-search-patterns| - - *g:fuf_fuzzyRefining* > - let g:fuf_fuzzyRefining = 0 -< - If non-zero, fuzzy matching is done with refining pattern instead of - partial matching. - - See also: |fuf-search-patterns| - - *g:fuf_reuseWindow* > - let g:fuf_reuseWindow = 1 -< - If non-zero and when FuzzyFinder opens a buffer which has already been - opened, it reuses a window containing the target buffer. - - *g:fuf_timeFormat* > - let g:fuf_timeFormat = '(%Y-%m-%d %H:%M:%S)' -< - String to format time string. See |strftime()| for details. - - *g:fuf_learningLimit* > - let g:fuf_learningLimit = 100 -< - Ceiling for the number of completion statistics to be stored. - - *g:fuf_enumeratingLimit* > - let g:fuf_enumeratingLimit = 50 -< - To speed up the response time, FuzzyFinder ends enumerating completion - items when found over this. - - *g:fuf_maxMenuWidth* > - let g:fuf_maxMenuWidth = 78 -< - If a length of a completion item is more than this, it is snipped in - completion menu. - - *g:fuf_previewHeight* > - let g:fuf_previewHeight = 0 -< - 'cmdheight' is set to this when a mode supporting preview is launched. - Information of selected completion item will be shown on command-line - area. If zero, preview feature is disabled. - - *g:fuf_autoPreview* > - let g:fuf_autoPreview = 0 -< - If non-zero, previews will be shown automatically. - - *g:fuf_useMigemo* > - let g:fuf_useMigemo = 0 -< - If non-zero, FuzzyFinder uses Migemo. - - *fuf-options-for-buffer-mode* -For Buffer Mode ~ - - *g:fuf_buffer_prompt* > - let g:fuf_buffer_prompt = '>Buffer[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_buffer_switchOrder* > - let g:fuf_buffer_switchOrder = 10 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_buffer_mruOrder* > - let g:fuf_buffer_mruOrder = 1 -< - If non-zero, completion items is sorted in order of recently used. - - *g:fuf_buffer_keyDelete* > - let g:fuf_buffer_keyDelete = '' -< - Key mapped to delete selected buffer. - - *fuf-options-for-file-mode* -For File Mode ~ - - *g:fuf_file_prompt* > - let g:fuf_file_prompt = '>File[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_file_switchOrder* > - let g:fuf_file_switchOrder = 20 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_file_exclude* > - let g:fuf_file_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])' -< - Regexp pattern for items which you want to exclude from completion - list. - - *fuf-options-for-coveragefile-mode* -For Coverage-File Mode ~ - - *g:fuf_coveragefile_prompt* > - let g:fuf_coveragefile_prompt = '>CoverageFile[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_coveragefile_switchOrder* > - let g:fuf_coveragefile_switchOrder = 30 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_coveragefile_exclude* > - let g:fuf_coveragefile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|swp)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])' -< - Regexp pattern for items which you want to exclude from completion - list. - - *g:fuf_coveragefile_globPatterns* > - let g:fuf_coveragefile_globPatterns = ['**/.*', '**/*'] -< - List of glob patterns to get file paths to be searched. - - See also: |glob()| - - *fuf-options-for-dir-mode* -For Directory Mode ~ - - *g:fuf_dir_prompt* > - let g:fuf_dir_prompt = '>Dir[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_dir_switchOrder* > - let g:fuf_dir_switchOrder = 40 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_dir_exclude* > - let g:fuf_dir_exclude = '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])' -< - Regexp pattern for items which you want to exclude from completion - list. - - *fuf-options-for-mrufile-mode* -For MRU-File Mode ~ - - *g:fuf_mrufile_prompt* > - let g:fuf_mrufile_prompt = '>MRU-File[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_mrufile_switchOrder* > - let g:fuf_mrufile_switchOrder = 50 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_mrufile_exclude* > - let g:fuf_mrufile_exclude = '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)' -< - Regexp pattern for items which you want to exclude from completion - list. - - *g:fuf_mrufile_maxItem* > - let g:fuf_mrufile_maxItem = 200 -< - Ceiling for the number of MRU items to be stored. - - *g:fuf_mrufile_maxItemDir* > - let g:fuf_mrufile_maxItemDir = 50 -< - Ceiling for the number of parent directories of MRU items to be - stored, which are used for around search. - - *g:fuf_mrufile_keyExpand* > - let g:fuf_mrufile_keyExpand = '' -< - Key mapped to expand search range. - - *fuf-options-for-mrucmd-mode* -For MRU-Cmd Mode ~ - - *g:fuf_mrucmd_prompt* > - let g:fuf_mrucmd_prompt = '>MRU-Cmd[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_mrucmd_switchOrder* > - let g:fuf_mrucmd_switchOrder = 60 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_mrucmd_exclude* > - let g:fuf_mrucmd_exclude = '^$' -< - Regexp pattern for items which you want to exclude from completion - list. - - *g:fuf_mrucmd_maxItem* > - let g:fuf_mrucmd_maxItem = 200 -< - This is the ceiling for the number of MRU items to be stored. - - *fuf-options-for-bookmarkfile-mode* -For Bookmark-File Mode ~ - - *g:fuf_bookmarkfile_prompt* > - let g:fuf_bookmarkfile_prompt = '>BookmarkFile[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_bookmarkfile_switchOrder* > - let g:fuf_bookmarkfile_switchOrder = 70 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_bookmarkfile_searchRange* > - let g:fuf_bookmarkfile_searchRange = 400 -< - Number of lines which FuzzyFinder searches a matching line from - bookmarked position within. - - *g:fuf_bookmarkfile_keyDelete* > - let g:fuf_bookmarkfile_keyDelete = '' -< - Key mapped to delete selected bookmark. - - *fuf-options-for-bookmarkdir-mode* -For Bookmark-Dir Mode ~ - - *g:fuf_bookmarkdir_prompt* > - let g:fuf_bookmarkdir_prompt = '>BookmarkDir[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_bookmarkdir_switchOrder* > - let g:fuf_bookmarkdir_switchOrder = 80 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_bookmarkdir_keyDelete* > - let g:fuf_bookmarkdir_keyDelete = '' -< - Key mapped to delete selected bookmark. - - *fuf-options-for-tag-mode* -For Tag Mode ~ - - *g:fuf_tag_prompt* > - let g:fuf_tag_prompt = '>Tag[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_tag_switchOrder* > - let g:fuf_tag_switchOrder = 90 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *fuf-options-for-buffertag-mode* -For Buffer-Tag Mode ~ - - *g:fuf_buffertag_prompt* > - let g:fuf_buffertag_prompt = '>Buffer-Tag[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_buffertag_switchOrder* > - let g:fuf_buffertag_switchOrder = 100 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *g:fuf_buffertag_ctagsPath* > - let g:fuf_buffertag_ctagsPath = 'ctags' -< - Executable file path of Ctags. - - *fuf-options-for-taggedfile-mode* -For Tagged-File Mode ~ - - *g:fuf_taggedfile_prompt* > - let g:fuf_taggedfile_prompt = '>Tagged-File[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_taggedfile_switchOrder* > - let g:fuf_taggedfile_switchOrder = 110 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *fuf-options-for-jumplist-mode* -For Jump-List Mode ~ - - *g:fuf_jumplist_prompt* > - let g:fuf_jumplist_prompt = '>Jump-List[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_jumplist_switchOrder* > - let g:fuf_jumplist_switchOrder = 120 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *fuf-options-for-changelist-mode* -For Change-List Mode ~ - - *g:fuf_changelist_prompt* > - let g:fuf_changelist_prompt = '>Change-List[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_changelist_switchOrder* > - let g:fuf_changelist_switchOrder = 130 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *fuf-options-for-quickfix-mode* -For Quickfix Mode ~ - - *g:fuf_quickfix_prompt* > - let g:fuf_quickfix_prompt = '>Quickfix[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_quickfix_switchOrder* > - let g:fuf_quickfix_switchOrder = 140 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *fuf-options-for-line-mode* -For Line Mode ~ - - *g:fuf_line_prompt* > - let g:fuf_line_prompt = '>Line[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_line_switchOrder* > - let g:fuf_line_switchOrder = 150 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - *fuf-options-for-help-mode* -For Help Mode ~ - - *g:fuf_help_prompt* > - let g:fuf_help_prompt = '>Help[]>' -< - Prompt string. "[]" will be substituted with indicators. - - *g:fuf_help_switchOrder* > - let g:fuf_help_switchOrder = 160 -< - Number of order for switching to the next/previous mode. If negative - number, Fuzzyfinder never switches to this mode. - - -============================================================================== -VIMRC EXAMPLE *fuf-vimrc-example* - -> - let g:fuf_modesDisable = [] - let g:fuf_mrufile_maxItem = 400 - let g:fuf_mrucmd_maxItem = 400 - nnoremap sj :FufBuffer - nnoremap sk :FufFileWithCurrentBufferDir - nnoremap sK :FufFileWithFullCwd - nnoremap s :FufFile - nnoremap sl :FufCoverageFileChange - nnoremap sL :FufCoverageFileChange - nnoremap s :FufCoverageFileRegister - nnoremap sd :FufDirWithCurrentBufferDir - nnoremap sD :FufDirWithFullCwd - nnoremap s :FufDir - nnoremap sn :FufMruFile - nnoremap sN :FufMruFileInCwd - nnoremap sm :FufMruCmd - nnoremap su :FufBookmarkFile - nnoremap s :FufBookmarkFileAdd - vnoremap s :FufBookmarkFileAddAsSelectedText - nnoremap si :FufBookmarkDir - nnoremap s :FufBookmarkDirAdd - nnoremap st :FufTag - nnoremap sT :FufTag! - nnoremap s :FufTagWithCursorWord! - nnoremap s, :FufBufferTag - nnoremap s< :FufBufferTag! - vnoremap s, :FufBufferTagWithSelectedText! - vnoremap s< :FufBufferTagWithSelectedText - nnoremap s} :FufBufferTagWithCursorWord! - nnoremap s. :FufBufferTagAll - nnoremap s> :FufBufferTagAll! - vnoremap s. :FufBufferTagAllWithSelectedText! - vnoremap s> :FufBufferTagAllWithSelectedText - nnoremap s] :FufBufferTagAllWithCursorWord! - nnoremap sg :FufTaggedFile - nnoremap sG :FufTaggedFile! - nnoremap so :FufJumpList - nnoremap sp :FufChangeList - nnoremap sq :FufQuickfix - nnoremap sy :FufLine - nnoremap sh :FufHelp - nnoremap se :FufEditDataFile - nnoremap sr :FufRenewCache -< - -============================================================================== -SPECIAL THANKS *fuf-thanks* - -- Vincent Wang -- Ingo Karkat -- Nikolay Golubev -- Brian Doyle -- id:secondlife -- Nathan Neff - - -============================================================================== -CHANGELOG *fuf-changelog* - -4.2.2: - - Fixed a bug that unloaded buffers weren't covered by FufBufferTagAll. - -4.2.1: - - Improved response of Buffer-Tag mode. - - Fixed a bug that buffers which had been opened weren't listed in - Coverage-File mode - - Fixed a bug that tag entries including tab characters weren't parsed - correctly in Coverage-File mode - -4.2: - - L9 library (vimscript #3252) version 1.1 is required. - - Added Buffer-Tag mode, inspired by taglist.vim (vimscript #273). - - Added :FufMruFileInCwd command. - -4.1.1: - - Fixed a bug causing a error in MRU-File mode. - -4.1: - - Added Bookmark-Dir mode. - - Added Bookmark-File mode and removed Bookmark mode. - - Changed the filename to store data of Coverage-File mode, from - '~/.vim-fuf-data/coveragefile/items' to - '~/.vim-fuf-data/coveragefile/coverages' . - - Fixed a bug that floating point numbers weren't evaluated correctly and - caused errors on some non-English locales. - - Removed Around-MRU-File mode and integrated its feature to MRU-File mode. - -4.0: - - From this version, L9 library (vimscript #3252) is required. - - Added Coverage-File mode for users wanting something like TextMate's - command-t. (But I've never used it.) - - Added Around-MRU-File mode. (Too slow. There is room for improvement.) - - Added new feature which deletes selected buffer with FuzzyFinder and - g:fuf_buffer_keyDelete option. - - Added new feature which allows to set one-time options/variables with - fuf#setOneTimeVariables() function. - - Added g:fuf_dataDir option and removed g:fuf_infoFile, - g:g:fuf_tag_cache_dir, g:fuf_taggedfile_cache_dir, and - g:fuf_help_cache_dir options. - - Added :FufEditDataFile command and removed :FufEditInfo command. - - Added g:fuf_fuzzyRefining option. - - Added new feature which is auto-preview and g:fuf_autoPreview option. - - Changed the default value of g:fuf_previewHeight to 0 in order to disable - preview feature. There is an unfixable problem which is caused by a Vim's - bug. - - Changed the default value of g:fuf_modesDisable option. - - Changed the default value of g:fuf_*_switchOrder options. - - Improved speed of changing buffers. - - Improved the way to add user-defined mode. - - Fixed a bug that FuzzyFinder caused reseting window layout. - - Removed g:fuf_smartBs option. Use instead. - -3.5: - - Added Line mode. - - Added Help mode. - - Added key mapping to switch between fuzzy matching and partial matching. - - Changed the default values of g:fuf_file_exclude for ignoring "*.dll". - - Changed Tag mode and Tagged-File mode to cache parsed data to files in - "~/.vim-fuf-cache/". - - Fixed a bug that repeating preview key produced no effect. - - Fixed a bug that File mode and Directory mode didn't list items in a - directory whose name includes uppercase characters. (Thanks, ryo7000) - -3.4: - - Added new feature which makes it possible to preview selected completion - item. - - Changed matching rules and added g:fuf_splitPathMatching. - - Changed sorting rules. - - Changed the default values of g:fuf_file_exclude and g:fuf_dir_exclude in - order to ignore ".hg", ".git", and ".bzr" directories. - - Changed the default value of g:fuf_mrufile_exclude in order to ignore - network files (\\*) on Windows and ignore /mnt/* and /media/* on Unix like - systems. - - Fixed a bug that an exclude pattern of File, Dir, and Callback-File mode - can't be changed. - -3.3: - - Added Jump-List mode, Change-List mode, and Quickfix mode which enable - jumps with jump list, change list, and quickfix list. - - Added new feature which deletes selected bookmark with FuzzyFinder and - g:fuf_bookmark_keyDelete option. - - Changed default values of g:fuf_keyPrevPattern. - - Changed to show error message when incompatible with a installed vim. - -3.2: - - Added g:fuf_promptHighlight option to integrate such options for each - mode. - - Changed APIs of Given-File, Given-Directory, Given-Command, Callback-File, - and Callback-Item modes to be able to set a prompt string. - - Changed default values of g:fuf_keyPrevPattern and g:fuf_keyNextPattern. - - Fixed a bug that MRU-File data was not updated When a file was opened with - FuzzyFinder. - - Fixed a bug with scoring matchings for sorting. Thanks to Vincent. - - Brought back the removed feature which is switching to an other mode in - FuzzyFinder. - -3.1: - - Added new feature to recall patterns which have been entered before from - history. - -3.0: - - Redesigned the whole plugin for improvements of maintainability and - performance. "fuzzyfinder" is abbreviated to "fuf" in the sorce code and - filenames. All commands and options are renamed. - - Added new feature which is refining pattern. - - Improved the rules for sorting completion items. Thanks to the suggestion - by Nathan, the rule for boundary matching was implemented. - - Changed to open one line buffer of FuzzyFinder with :topleft command - instead of :leftabove. The window will alway appear at the top and occupy - the full with of the vim window. Thanks to Jan Christoph. - - Changed default filename of information file. - - Changed MRU-File mode and MRU-Command mode to be disabled by default - due to performance and side effect issues. - - Removed the feature which is switching to an other mode in FuzzyFinder. - - Removed the feature which is temporarily switching 'ignorecase' in - FuzzyFinder. - -2.22.3: - - Fixed a bug that Fuzzyfinder could not open files with '$' in the name on - Windows. - -2.22.2: - - Changed to consider a length of a date/time string when abbreviates long - completion items. - - Fixed a bug that '**/' pattern did not search for files directly under the - current working directory in File mode. Thanks to Martin for reporting. - -2.22.1: - - Fixed a bug that Fuzzyfinder could not expand abbreviations to patterns - including '\' correctly. - - Fixed to show item number in Given-File, Given-Directory, and - Given-Command mode. - -2.22.0: - - More improved the abbreviation method for long completion items. - - Added Given-File mode for third-party script to select a file from a given - list and open. - - Added Given-Directory mode for third-party script to select a directory - from a given list and change current working directory to it. - - Added Given-Command mode for third-party script to select a command from a - given list and execute. - - Changed ways to launch Callback-File mode and Callback-item mode. - -2.21.0: - - Improved a method of trimming long completion items. Thanks to Andy, - pyrhockz, and Nathan. - - Changed not to map command-line for MRU-Command mode if - g:FuzzyFinderOptions.MruCmd.mode_available is set 0 before loading - fuzzyfinder.vim. - - Added Callback-File mode and Callback-Item mode for third-party script to - find a file/directory or an item from a given list using Fuzzyfinder. - - Changed not to append ".." to a completion menu in File/Directory mode. - Use dot sequence feature. - - Changed default value of g:FuzzyFinderOptions.File.excluded_path option. - - Changed default value of g:FuzzyFinderOptions.Dir.excluded_path option. - - Fixed a bug that couldn't jump to a tag. Thanks to Thinca. - -2.20: - - Added help files which are doc/fuzzyfinder.txt and doc/fuzzyfinder.jax. - - Fixed a bug that an error occurs if current directory included spaces. - Thanks id:cho45 and id:secondlife. - - Implemented a feature to reuse a window containing target buffer. - - Added g:FuzzyFinderOptions.Buffer.reuse_window option. - - Added g:FuzzyFinderOptions.File.reuse_window option. - - Added g:FuzzyFinderOptions.MruFile.reuse_window option. - - Added g:FuzzyFinderOptions.Bookmark.reuse_window option. - - Added g:FuzzyFinderOptions.TaggedFile.reuse_window option. - - Changed to use 'omnifunc' instead of 'completefunc'. Now you can use - to delete all entered characters. - - Changed default value of g:FuzzyFinderOptions.Base.key_open_tab option. - - Changed default value of g:FuzzyFinderOptions.Base.key_next_mode option. - - Changed default value of g:FuzzyFinderOptions.Base.key_prev_mode option. - - Changed default value of g:FuzzyFinderOptions.Base.key_ignore_case option. - - Changed to truncate long completion items from the head instead of tail. - - Added g:FuzzyFinderOptions.Base.max_menu_width option instead of - g:FuzzyFinderOptions.Base.trim_length option. - - Added :FuzzyFinderFileWithFullCwd command. - - Added :FuzzyFinderFileWithCurrentBufferDir command. - - Added :FuzzyFinderDirWithFullCwd command. - - Added :FuzzyFinderDirWithCurrentBufferDir command. - - Added :FuzzyFinderTagWithCursorWord command. - - Renamed :FuzzyFinderRemoveCache command to :FuzzyFinderRenewCache. - -2.19: - - Changed MRU-File mode that always formats completion items to be relative - to the home directory. - - Fixed a bug that a file was opened in an unintended window with Tag List - plugin. Thanks Alexey. - - Fixed a bug that garbage characters were entered when switched current - mode. Thanks id:lugecy. - -2.18: - - Improved rules for the sorting of completion items. - - Changed not to learn a completion if an entered pattern is empty. - - Fixed a bug that Buffer mode did not work. Thanks ryo7000. - -2.17: - - Introduced a learning system for the sorting of completion items. - - Added g:FuzzyFinderOptions.Base.learning_limit option. - - Changed the specification of the information file. Please remove your - information file for Fuzzyfinder. - -2.16: - - Improved response time by caching in MRU-File mode. - - Fixed a bug in Bookmark mode that Fuzzyfinder did not jump to the - Bookmarked line number when Bookmarked pattern was not found. - -2.15: - - Added Bookmark mode. - - Removed Favorite-file mode. Use Bookmark mode instead. - - Fixed not to record a entry of input() in MRU-Command mode. - -2.14: - - Changed to show buffer status in Buffer mode. - - Fixed a bug that an error occurs when nonexistent buffer-name was entered - in Buffer mode. Thanks Maxim Kim. - - Added 'enumerating_limit' option. Thanks id:secondlife. - - Removed 'matching_limit' option. Use 'enumerating_limit' instead. - -2.13: - - Fixed a bug that a directory disappeared when a file in that directory was - being opened in File/Mru-File mode. - -2.12: - - Changed to be able to show completion items in the order of recently used - in Buffer mode. - - Added g:FuzzyFinderOptions.Buffer.mru_order option. - -2.11: - - Changed that a dot sequence of entered pattern is expanded to parent - directories in File/Dir mode. - E.g.: "foo/...bar" -> "foo/../../bar" - - Fixed a bug that a prompt string was excessively inserted. - -2.10: - - Changed not to show a current buffer in a completion menu. - - Fixed a bug that a filename to open was not been escaped. - - Added 'prompt' option. - - Added 'prompt_highlight' option. - - Removed g:FuzzyFinderOptions.MruFile.no_special_buffer option. - -2.9: - - Enhanced behavior in Fuzzyfinder and added 'smart_bs' option. - - Fixed a bug that entered pattern was not been escaped. - - Fixed not to insert "zv" with "c/pattern" command in Normal mode. - - Avoid the slow down problem caused by filereadable() check for the MRU - information in BufEnter/BufWritePost. - -2.8.1: - - Fixed a bug caused by the non-escaped buffer name "[Fuzzyfinder]". - - Fixed a command to open in a new tab page in Buffer mode. -2.8: - - Added 'trim_length' option. - - Added 'switch_order' option. - - Fixed a bug that entered command did not become the newest in the history. - - Fixed a bug that folds could not open with in a command-line when - searching. - - Removed 'excluded_indicator' option. Now a completion list in Buffer mode - is the same as a result of :buffers. - -2.7: - - Changed to find an item whose index is matched with the number suffixed - with entered pattern. - - Fixed the cache bug after changing current directory in File mode. - -2.6.2: - - Fixed not to miss changes in options when updates the MRU information. - -2.6.1: - - Fixed a bug related to floating-point support. - - Added support for GetLatestVimScripts. - -2.6: - - Revived MRU-command mode. The problem with a command-line abbreviation was - solved. - - Changed the specification of the information file. - - Added :FuzzyFinderEditInfo command. - -2.5.1: - - Fixed to be able to match "foo/./bar" by "foo/**/bar" in File mode. - - Fixed to be able to open a space-containing file in File mode. - - Fixed to honor the current working directory properly in File mode. - -2.5: - - Fixed the bug that a wrong initial text is entered after switching to a - next mode. - - Fixed the bug that it does not return to previous window after leaving - Fuzzyfinder one. - -2.4: - - Fixed the bug that Fuzzyfinder fails to open a file caused by auto-cd - plugin/script. - -2.3: - - Added a key mapping to open items in a new tab page and - g:FuzzyFinderOptions.Base.key_open_tab option. - - Changed to show Fuzzyfinder window above last window even if 'splitbelow' - was set. - - Changed to set nocursorline and nocursorcolumn in Fuzzyfinder. - - Fixed not to push up a buffer number unlimitedly. - -2.2: - - Added new feature, which is the partial matching. - - Fixed the bug that an error occurs when "'" was entered. - -2.1: - - Restructured the option system AGAIN. Sorry :p - - Changed to inherit a typed text when switching a mode without leaving - Insert mode. - - Changed commands which launch explorers to be able to take a argument for - initial text. - - Changed to complete file names by relative path and not full path in the - buffer/mru-file/tagged-file mode. - - Changed to highlight a typed text when the completion item was not found - or the completion process was aborted. - - Changed to create caches for each tag file and not working directory in - the tag/tagged-file mode. - - Fixed the bug that the buffer mode couldn't open a unnamed buffer. - - Added 'matching_limit' option. - - Removed 'max_match' option. Use 'matching_limit' option instead. - - Removed 'initial_text' option. Use command argument instead. - - Removed the MRU-command mode. - -2.0: - - Added the tag mode. - - Added the tagged-file mode. - - Added :FuzzyFinderRemoveCache command. - - Restructured the option system. many options are changed names or default - values of some options. - - Changed to hold and reuse caches of completion lists by default. - - Changed to set filetype 'fuzzyfinder'. - - Disabled the MRU-command mode by default because there are problems. - - Removed FuzzyFinderAddMode command. - -1.5: - - Added the directory mode. - - Fixed the bug that it caused an error when switch a mode in Insert mode. - - Changed g:FuzzyFinder_KeySwitchMode type to a list. - -1.4: - - Changed the specification of the information file. - - Added the MRU-commands mode. - - Renamed :FuzzyFinderAddFavorite command to :FuzzyFinderAddFavFile. - - Renamed g:FuzzyFinder_MruModeVars option to g:FuzzyFinder_MruFileModeVars. - - Renamed g:FuzzyFinder_FavoriteModeVars option to - g:FuzzyFinder_FavFileModeVars. - - Changed to show registered time of each item in MRU/favorite mode. - - Added 'timeFormat' option for MRU/favorite modes. - -1.3: - - Fixed a handling of multi-byte characters. - -1.2: - - Added support for Migemo. (Migemo is Japanese search method.) - -1.1: - - Added the favorite mode. - - Added new features, which are abbreviations and multiple search. - - Added 'abbrevMap' option for each mode. - - Added g:FuzzyFinder_MruModeVars['ignoreSpecialBuffers'] option. - - Fixed the bug that it did not work correctly when a user have mapped - or . - -1.0: - - Added the MRU mode. - - Added commands to add and use original mode. - - Improved the sorting algorithm for completion items. - - Added 'initialInput' option to automatically insert a text at the - beginning of a mode. - - Changed that 'excludedPath' option works for the entire path. - - Renamed some options. - - Changed default values of some options. - - Packed the mode-specific options to dictionaries. - - Removed some options. - -0.6: - - Fixed some bugs. - -0.5: - - Improved response by aborting processing too many items. - - Changed to be able to open a buffer/file not only in previous window but - also in new window. - - Fixed a bug that recursive searching with '**' does not work. - - Added g:FuzzyFinder_CompletionItemLimit option. - - Added g:FuzzyFinder_KeyOpen option. - -0.4: - - Improved response of the input. - - Improved the sorting algorithm for completion items. It is based on the - matching level. 1st is perfect matching, 2nd is prefix matching, and 3rd - is fuzzy matching. - - Added g:FuzzyFinder_ExcludePattern option. - - Removed g:FuzzyFinder_WildIgnore option. - - Removed g:FuzzyFinder_EchoPattern option. - - Removed g:FuzzyFinder_PathSeparator option. - - Changed the default value of g:FuzzyFinder_MinLengthFile from 1 to 0. - -0.3: - - Added g:FuzzyFinder_IgnoreCase option. - - Added g:FuzzyFinder_KeyToggleIgnoreCase option. - - Added g:FuzzyFinder_EchoPattern option. - - Changed the open command in a buffer mode from ":edit" to ":buffer" to - avoid being reset cursor position. - - Changed the default value of g:FuzzyFinder_KeyToggleMode from to - because does not work on some CUI environments. - - Changed to avoid being loaded by Vim before 7.0. - - Fixed a bug with making a fuzzy pattern which has '\'. - -0.2: - - A bug it does not work on Linux is fixed. - -0.1: - - First release. - - -============================================================================== -ABOUT *fuf-about* *fuf-contact* *fuf-author* - -Author: Takeshi NISHIDA -Licence: MIT Licence -URL: http://www.vim.org/scripts/script.php?script_id=1984 - http://bitbucket.org/ns9tks/vim-fuzzyfinder/ - -Bugs/Issues/Suggestions/Improvements ~ - -Please submit to http://bitbucket.org/ns9tks/vim-fuzzyfinder/issues/ . - -============================================================================== - vim:tw=78:ts=8:ft=help:norl: diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags b/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags deleted file mode 100644 index a7b51032..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags +++ /dev/null @@ -1,176 +0,0 @@ -:FufBookmarkDir fuf.txt /*:FufBookmarkDir* -:FufBookmarkDirAdd fuf.txt /*:FufBookmarkDirAdd* -:FufBookmarkFile fuf.txt /*:FufBookmarkFile* -:FufBookmarkFileAdd fuf.txt /*:FufBookmarkFileAdd* -:FufBookmarkFileAddAsSelectedText fuf.txt /*:FufBookmarkFileAddAsSelectedText* -:FufBuffer fuf.txt /*:FufBuffer* -:FufBufferTag fuf.txt /*:FufBufferTag* -:FufBufferTagAll fuf.txt /*:FufBufferTagAll* -:FufBufferTagAllWithCursorWord fuf.txt /*:FufBufferTagAllWithCursorWord* -:FufBufferTagAllWithSelectedText fuf.txt /*:FufBufferTagAllWithSelectedText* -:FufBufferTagWithCursorWord fuf.txt /*:FufBufferTagWithCursorWord* -:FufBufferTagWithSelectedText fuf.txt /*:FufBufferTagWithSelectedText* -:FufChangeList fuf.txt /*:FufChangeList* -:FufCoverageFile fuf.txt /*:FufCoverageFile* -:FufCoverageFileChange fuf.txt /*:FufCoverageFileChange* -:FufCoverageFileRegister fuf.txt /*:FufCoverageFileRegister* -:FufDir fuf.txt /*:FufDir* -:FufDirWithCurrentBufferDir fuf.txt /*:FufDirWithCurrentBufferDir* -:FufDirWithFullCwd fuf.txt /*:FufDirWithFullCwd* -:FufEditDataFile fuf.txt /*:FufEditDataFile* -:FufFile fuf.txt /*:FufFile* -:FufFileWithCurrentBufferDir fuf.txt /*:FufFileWithCurrentBufferDir* -:FufFileWithFullCwd fuf.txt /*:FufFileWithFullCwd* -:FufHelp fuf.txt /*:FufHelp* -:FufJumpList fuf.txt /*:FufJumpList* -:FufLine fuf.txt /*:FufLine* -:FufMruCmd fuf.txt /*:FufMruCmd* -:FufMruFile fuf.txt /*:FufMruFile* -:FufMruFileInCwd fuf.txt /*:FufMruFileInCwd* -:FufQuickfix fuf.txt /*:FufQuickfix* -:FufRenewCache fuf.txt /*:FufRenewCache* -:FufTag fuf.txt /*:FufTag* -:FufTagWithCursorWord fuf.txt /*:FufTagWithCursorWord* -:FufTaggedFile fuf.txt /*:FufTaggedFile* -abc fuf.txt /*abc* -fuf fuf.txt /*fuf* -fuf#setOneTimeVariables() fuf.txt /*fuf#setOneTimeVariables()* -fuf-abbreviation fuf.txt /*fuf-abbreviation* -fuf-about fuf.txt /*fuf-about* -fuf-author fuf.txt /*fuf-author* -fuf-bookmarkdir-mode fuf.txt /*fuf-bookmarkdir-mode* -fuf-bookmarkfile-mode fuf.txt /*fuf-bookmarkfile-mode* -fuf-buffer-mode fuf.txt /*fuf-buffer-mode* -fuf-buffertag-mode fuf.txt /*fuf-buffertag-mode* -fuf-cache fuf.txt /*fuf-cache* -fuf-callbackfile-mode fuf.txt /*fuf-callbackfile-mode* -fuf-callbackitem-mode fuf.txt /*fuf-callbackitem-mode* -fuf-changelist-mode fuf.txt /*fuf-changelist-mode* -fuf-changelog fuf.txt /*fuf-changelog* -fuf-commands fuf.txt /*fuf-commands* -fuf-contact fuf.txt /*fuf-contact* -fuf-coveragefile-mode fuf.txt /*fuf-coveragefile-mode* -fuf-data-file fuf.txt /*fuf-data-file* -fuf-detailed-topics fuf.txt /*fuf-detailed-topics* -fuf-dir-mode fuf.txt /*fuf-dir-mode* -fuf-dot-sequence fuf.txt /*fuf-dot-sequence* -fuf-file-mode fuf.txt /*fuf-file-mode* -fuf-givencmd-mode fuf.txt /*fuf-givencmd-mode* -fuf-givendir-mode fuf.txt /*fuf-givendir-mode* -fuf-givenfile-mode fuf.txt /*fuf-givenfile-mode* -fuf-help-mode fuf.txt /*fuf-help-mode* -fuf-hiding-menu fuf.txt /*fuf-hiding-menu* -fuf-how-to-add-mode fuf.txt /*fuf-how-to-add-mode* -fuf-installation fuf.txt /*fuf-installation* -fuf-introduction fuf.txt /*fuf-introduction* -fuf-jumplist-mode fuf.txt /*fuf-jumplist-mode* -fuf-line-mode fuf.txt /*fuf-line-mode* -fuf-migemo fuf.txt /*fuf-migemo* -fuf-modes fuf.txt /*fuf-modes* -fuf-mrucmd-mode fuf.txt /*fuf-mrucmd-mode* -fuf-mrufile-mode fuf.txt /*fuf-mrufile-mode* -fuf-multiple-search fuf.txt /*fuf-multiple-search* -fuf-options fuf.txt /*fuf-options* -fuf-options-for-all-modes fuf.txt /*fuf-options-for-all-modes* -fuf-options-for-bookmarkdir-mode fuf.txt /*fuf-options-for-bookmarkdir-mode* -fuf-options-for-bookmarkfile-mode fuf.txt /*fuf-options-for-bookmarkfile-mode* -fuf-options-for-buffer-mode fuf.txt /*fuf-options-for-buffer-mode* -fuf-options-for-buffertag-mode fuf.txt /*fuf-options-for-buffertag-mode* -fuf-options-for-changelist-mode fuf.txt /*fuf-options-for-changelist-mode* -fuf-options-for-coveragefile-mode fuf.txt /*fuf-options-for-coveragefile-mode* -fuf-options-for-dir-mode fuf.txt /*fuf-options-for-dir-mode* -fuf-options-for-file-mode fuf.txt /*fuf-options-for-file-mode* -fuf-options-for-help-mode fuf.txt /*fuf-options-for-help-mode* -fuf-options-for-jumplist-mode fuf.txt /*fuf-options-for-jumplist-mode* -fuf-options-for-line-mode fuf.txt /*fuf-options-for-line-mode* -fuf-options-for-mrucmd-mode fuf.txt /*fuf-options-for-mrucmd-mode* -fuf-options-for-mrufile-mode fuf.txt /*fuf-options-for-mrufile-mode* -fuf-options-for-quickfix-mode fuf.txt /*fuf-options-for-quickfix-mode* -fuf-options-for-tag-mode fuf.txt /*fuf-options-for-tag-mode* -fuf-options-for-taggedfile-mode fuf.txt /*fuf-options-for-taggedfile-mode* -fuf-quickfix-mode fuf.txt /*fuf-quickfix-mode* -fuf-reusing-window fuf.txt /*fuf-reusing-window* -fuf-search-patterns fuf.txt /*fuf-search-patterns* -fuf-setting-one-time-option fuf.txt /*fuf-setting-one-time-option* -fuf-sorting-of-completion-items fuf.txt /*fuf-sorting-of-completion-items* -fuf-tag-mode fuf.txt /*fuf-tag-mode* -fuf-taggedfile-mode fuf.txt /*fuf-taggedfile-mode* -fuf-thanks fuf.txt /*fuf-thanks* -fuf-usage fuf.txt /*fuf-usage* -fuf-vimrc-example fuf.txt /*fuf-vimrc-example* -fuf.txt fuf.txt /*fuf.txt* -fuzzyfinder fuf.txt /*fuzzyfinder* -g:fuf_abbrevMap fuf.txt /*g:fuf_abbrevMap* -g:fuf_autoPreview fuf.txt /*g:fuf_autoPreview* -g:fuf_bookmarkdir_keyDelete fuf.txt /*g:fuf_bookmarkdir_keyDelete* -g:fuf_bookmarkdir_prompt fuf.txt /*g:fuf_bookmarkdir_prompt* -g:fuf_bookmarkdir_switchOrder fuf.txt /*g:fuf_bookmarkdir_switchOrder* -g:fuf_bookmarkfile_keyDelete fuf.txt /*g:fuf_bookmarkfile_keyDelete* -g:fuf_bookmarkfile_prompt fuf.txt /*g:fuf_bookmarkfile_prompt* -g:fuf_bookmarkfile_searchRange fuf.txt /*g:fuf_bookmarkfile_searchRange* -g:fuf_bookmarkfile_switchOrder fuf.txt /*g:fuf_bookmarkfile_switchOrder* -g:fuf_buffer_keyDelete fuf.txt /*g:fuf_buffer_keyDelete* -g:fuf_buffer_mruOrder fuf.txt /*g:fuf_buffer_mruOrder* -g:fuf_buffer_prompt fuf.txt /*g:fuf_buffer_prompt* -g:fuf_buffer_switchOrder fuf.txt /*g:fuf_buffer_switchOrder* -g:fuf_buffertag_ctagsPath fuf.txt /*g:fuf_buffertag_ctagsPath* -g:fuf_buffertag_prompt fuf.txt /*g:fuf_buffertag_prompt* -g:fuf_buffertag_switchOrder fuf.txt /*g:fuf_buffertag_switchOrder* -g:fuf_changelist_prompt fuf.txt /*g:fuf_changelist_prompt* -g:fuf_changelist_switchOrder fuf.txt /*g:fuf_changelist_switchOrder* -g:fuf_coveragefile_exclude fuf.txt /*g:fuf_coveragefile_exclude* -g:fuf_coveragefile_globPatterns fuf.txt /*g:fuf_coveragefile_globPatterns* -g:fuf_coveragefile_prompt fuf.txt /*g:fuf_coveragefile_prompt* -g:fuf_coveragefile_switchOrder fuf.txt /*g:fuf_coveragefile_switchOrder* -g:fuf_dataDir fuf.txt /*g:fuf_dataDir* -g:fuf_dir_exclude fuf.txt /*g:fuf_dir_exclude* -g:fuf_dir_prompt fuf.txt /*g:fuf_dir_prompt* -g:fuf_dir_switchOrder fuf.txt /*g:fuf_dir_switchOrder* -g:fuf_enumeratingLimit fuf.txt /*g:fuf_enumeratingLimit* -g:fuf_file_exclude fuf.txt /*g:fuf_file_exclude* -g:fuf_file_prompt fuf.txt /*g:fuf_file_prompt* -g:fuf_file_switchOrder fuf.txt /*g:fuf_file_switchOrder* -g:fuf_fuzzyRefining fuf.txt /*g:fuf_fuzzyRefining* -g:fuf_help_prompt fuf.txt /*g:fuf_help_prompt* -g:fuf_help_switchOrder fuf.txt /*g:fuf_help_switchOrder* -g:fuf_ignoreCase fuf.txt /*g:fuf_ignoreCase* -g:fuf_jumplist_prompt fuf.txt /*g:fuf_jumplist_prompt* -g:fuf_jumplist_switchOrder fuf.txt /*g:fuf_jumplist_switchOrder* -g:fuf_keyNextMode fuf.txt /*g:fuf_keyNextMode* -g:fuf_keyNextPattern fuf.txt /*g:fuf_keyNextPattern* -g:fuf_keyOpen fuf.txt /*g:fuf_keyOpen* -g:fuf_keyOpenSplit fuf.txt /*g:fuf_keyOpenSplit* -g:fuf_keyOpenTabpage fuf.txt /*g:fuf_keyOpenTabpage* -g:fuf_keyOpenVsplit fuf.txt /*g:fuf_keyOpenVsplit* -g:fuf_keyPrevMode fuf.txt /*g:fuf_keyPrevMode* -g:fuf_keyPrevPattern fuf.txt /*g:fuf_keyPrevPattern* -g:fuf_keyPreview fuf.txt /*g:fuf_keyPreview* -g:fuf_keySwitchMatching fuf.txt /*g:fuf_keySwitchMatching* -g:fuf_learningLimit fuf.txt /*g:fuf_learningLimit* -g:fuf_line_prompt fuf.txt /*g:fuf_line_prompt* -g:fuf_line_switchOrder fuf.txt /*g:fuf_line_switchOrder* -g:fuf_maxMenuWidth fuf.txt /*g:fuf_maxMenuWidth* -g:fuf_modesDisable fuf.txt /*g:fuf_modesDisable* -g:fuf_mrucmd_exclude fuf.txt /*g:fuf_mrucmd_exclude* -g:fuf_mrucmd_maxItem fuf.txt /*g:fuf_mrucmd_maxItem* -g:fuf_mrucmd_prompt fuf.txt /*g:fuf_mrucmd_prompt* -g:fuf_mrucmd_switchOrder fuf.txt /*g:fuf_mrucmd_switchOrder* -g:fuf_mrufile_exclude fuf.txt /*g:fuf_mrufile_exclude* -g:fuf_mrufile_keyExpand fuf.txt /*g:fuf_mrufile_keyExpand* -g:fuf_mrufile_maxItem fuf.txt /*g:fuf_mrufile_maxItem* -g:fuf_mrufile_maxItemDir fuf.txt /*g:fuf_mrufile_maxItemDir* -g:fuf_mrufile_prompt fuf.txt /*g:fuf_mrufile_prompt* -g:fuf_mrufile_switchOrder fuf.txt /*g:fuf_mrufile_switchOrder* -g:fuf_patternSeparator fuf.txt /*g:fuf_patternSeparator* -g:fuf_previewHeight fuf.txt /*g:fuf_previewHeight* -g:fuf_promptHighlight fuf.txt /*g:fuf_promptHighlight* -g:fuf_quickfix_prompt fuf.txt /*g:fuf_quickfix_prompt* -g:fuf_quickfix_switchOrder fuf.txt /*g:fuf_quickfix_switchOrder* -g:fuf_reuseWindow fuf.txt /*g:fuf_reuseWindow* -g:fuf_splitPathMatching fuf.txt /*g:fuf_splitPathMatching* -g:fuf_tag_prompt fuf.txt /*g:fuf_tag_prompt* -g:fuf_tag_switchOrder fuf.txt /*g:fuf_tag_switchOrder* -g:fuf_taggedfile_prompt fuf.txt /*g:fuf_taggedfile_prompt* -g:fuf_taggedfile_switchOrder fuf.txt /*g:fuf_taggedfile_switchOrder* -g:fuf_timeFormat fuf.txt /*g:fuf_timeFormat* -g:fuf_useMigemo fuf.txt /*g:fuf_useMigemo* diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags-ja b/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags-ja deleted file mode 100644 index f031b242..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/doc/tags-ja +++ /dev/null @@ -1,174 +0,0 @@ -!_TAG_FILE_ENCODING utf-8 // -:FufBookmarkDir fuf.jax /*:FufBookmarkDir* -:FufBookmarkDirAdd fuf.jax /*:FufBookmarkDirAdd* -:FufBookmarkFile fuf.jax /*:FufBookmarkFile* -:FufBookmarkFileAdd fuf.jax /*:FufBookmarkFileAdd* -:FufBookmarkFileAddAsSelectedText fuf.jax /*:FufBookmarkFileAddAsSelectedText* -:FufBuffer fuf.jax /*:FufBuffer* -:FufBufferTag fuf.jax /*:FufBufferTag* -:FufBufferTagAll fuf.jax /*:FufBufferTagAll* -:FufBufferTagAllWithCursorWord fuf.jax /*:FufBufferTagAllWithCursorWord* -:FufBufferTagAllWithSelectedText fuf.jax /*:FufBufferTagAllWithSelectedText* -:FufBufferTagWithCursorWord fuf.jax /*:FufBufferTagWithCursorWord* -:FufBufferTagWithSelectedText fuf.jax /*:FufBufferTagWithSelectedText* -:FufChangeList fuf.jax /*:FufChangeList* -:FufCoverageFileChange fuf.jax /*:FufCoverageFileChange* -:FufCoverageFileRegister fuf.jax /*:FufCoverageFileRegister* -:FufDir fuf.jax /*:FufDir* -:FufDirWithCurrentBufferDir fuf.jax /*:FufDirWithCurrentBufferDir* -:FufDirWithFullCwd fuf.jax /*:FufDirWithFullCwd* -:FufEditDataFile fuf.jax /*:FufEditDataFile* -:FufFile fuf.jax /*:FufFile* -:FufFileWithCurrentBufferDir fuf.jax /*:FufFileWithCurrentBufferDir* -:FufFileWithFullCwd fuf.jax /*:FufFileWithFullCwd* -:FufHelp fuf.jax /*:FufHelp* -:FufJumpList fuf.jax /*:FufJumpList* -:FufLine fuf.jax /*:FufLine* -:FufMruCmd fuf.jax /*:FufMruCmd* -:FufMruFile fuf.jax /*:FufMruFile* -:FufMruFileInCwd fuf.jax /*:FufMruFileInCwd* -:FufQuickfix fuf.jax /*:FufQuickfix* -:FufRenewCache fuf.jax /*:FufRenewCache* -:FufTag fuf.jax /*:FufTag* -:FufTagWithCursorWord fuf.jax /*:FufTagWithCursorWord* -:FufTaggedFile fuf.jax /*:FufTaggedFile* -abc fuf.jax /*abc* -fuf fuf.jax /*fuf* -fuf#setOneTimeVariables() fuf.jax /*fuf#setOneTimeVariables()* -fuf-abbreviation fuf.jax /*fuf-abbreviation* -fuf-about fuf.jax /*fuf-about* -fuf-author fuf.jax /*fuf-author* -fuf-bookmarkdir-mode fuf.jax /*fuf-bookmarkdir-mode* -fuf-bookmarkfile-mode fuf.jax /*fuf-bookmarkfile-mode* -fuf-buffer-mode fuf.jax /*fuf-buffer-mode* -fuf-buffertag-mode fuf.jax /*fuf-buffertag-mode* -fuf-cache fuf.jax /*fuf-cache* -fuf-callbackfile-mode fuf.jax /*fuf-callbackfile-mode* -fuf-callbackitem-mode fuf.jax /*fuf-callbackitem-mode* -fuf-changelist-mode fuf.jax /*fuf-changelist-mode* -fuf-commands fuf.jax /*fuf-commands* -fuf-contact fuf.jax /*fuf-contact* -fuf-coveragefile-mode fuf.jax /*fuf-coveragefile-mode* -fuf-data-file fuf.jax /*fuf-data-file* -fuf-detailed-topics fuf.jax /*fuf-detailed-topics* -fuf-dir-mode fuf.jax /*fuf-dir-mode* -fuf-dot-sequence fuf.jax /*fuf-dot-sequence* -fuf-file-mode fuf.jax /*fuf-file-mode* -fuf-givencmd-mode fuf.jax /*fuf-givencmd-mode* -fuf-givendir-mode fuf.jax /*fuf-givendir-mode* -fuf-givenfile-mode fuf.jax /*fuf-givenfile-mode* -fuf-help-mode fuf.jax /*fuf-help-mode* -fuf-hiding-menu fuf.jax /*fuf-hiding-menu* -fuf-how-to-add-mode fuf.jax /*fuf-how-to-add-mode* -fuf-installation fuf.jax /*fuf-installation* -fuf-introduction fuf.jax /*fuf-introduction* -fuf-jumplist-mode fuf.jax /*fuf-jumplist-mode* -fuf-line-mode fuf.jax /*fuf-line-mode* -fuf-migemo fuf.jax /*fuf-migemo* -fuf-modes fuf.jax /*fuf-modes* -fuf-mrucmd-mode fuf.jax /*fuf-mrucmd-mode* -fuf-mrufile-mode fuf.jax /*fuf-mrufile-mode* -fuf-multiple-search fuf.jax /*fuf-multiple-search* -fuf-options fuf.jax /*fuf-options* -fuf-options-for-all-modes fuf.jax /*fuf-options-for-all-modes* -fuf-options-for-bookmarkdir-mode fuf.jax /*fuf-options-for-bookmarkdir-mode* -fuf-options-for-bookmarkfile-mode fuf.jax /*fuf-options-for-bookmarkfile-mode* -fuf-options-for-buffer-mode fuf.jax /*fuf-options-for-buffer-mode* -fuf-options-for-buffertag-mode fuf.jax /*fuf-options-for-buffertag-mode* -fuf-options-for-changelist-mode fuf.jax /*fuf-options-for-changelist-mode* -fuf-options-for-coveragefile-mode fuf.jax /*fuf-options-for-coveragefile-mode* -fuf-options-for-dir-mode fuf.jax /*fuf-options-for-dir-mode* -fuf-options-for-file-mode fuf.jax /*fuf-options-for-file-mode* -fuf-options-for-help-mode fuf.jax /*fuf-options-for-help-mode* -fuf-options-for-jumplist-mode fuf.jax /*fuf-options-for-jumplist-mode* -fuf-options-for-line-mode fuf.jax /*fuf-options-for-line-mode* -fuf-options-for-mrucmd-mode fuf.jax /*fuf-options-for-mrucmd-mode* -fuf-options-for-mrufile-mode fuf.jax /*fuf-options-for-mrufile-mode* -fuf-options-for-quickfix-mode fuf.jax /*fuf-options-for-quickfix-mode* -fuf-options-for-tag-mode fuf.jax /*fuf-options-for-tag-mode* -fuf-options-for-taggedfile-mode fuf.jax /*fuf-options-for-taggedfile-mode* -fuf-quickfix-mode fuf.jax /*fuf-quickfix-mode* -fuf-reusing-window fuf.jax /*fuf-reusing-window* -fuf-search-patterns fuf.jax /*fuf-search-patterns* -fuf-setting-one-time-option fuf.jax /*fuf-setting-one-time-option* -fuf-sorting-of-completion-items fuf.jax /*fuf-sorting-of-completion-items* -fuf-tag-mode fuf.jax /*fuf-tag-mode* -fuf-taggedfile-mode fuf.jax /*fuf-taggedfile-mode* -fuf-usage fuf.jax /*fuf-usage* -fuf-vimrc-example fuf.jax /*fuf-vimrc-example* -fuf.jax fuf.jax /*fuf.jax* -fuzzyfinder fuf.jax /*fuzzyfinder* -g:fuf_abbrevMap fuf.jax /*g:fuf_abbrevMap* -g:fuf_autoPreview fuf.jax /*g:fuf_autoPreview* -g:fuf_bookmarkdir_keyDelete fuf.jax /*g:fuf_bookmarkdir_keyDelete* -g:fuf_bookmarkdir_prompt fuf.jax /*g:fuf_bookmarkdir_prompt* -g:fuf_bookmarkdir_switchOrder fuf.jax /*g:fuf_bookmarkdir_switchOrder* -g:fuf_bookmarkfile_keyDelete fuf.jax /*g:fuf_bookmarkfile_keyDelete* -g:fuf_bookmarkfile_prompt fuf.jax /*g:fuf_bookmarkfile_prompt* -g:fuf_bookmarkfile_searchRange fuf.jax /*g:fuf_bookmarkfile_searchRange* -g:fuf_bookmarkfile_switchOrder fuf.jax /*g:fuf_bookmarkfile_switchOrder* -g:fuf_buffer_keyDelete fuf.jax /*g:fuf_buffer_keyDelete* -g:fuf_buffer_mruOrder fuf.jax /*g:fuf_buffer_mruOrder* -g:fuf_buffer_prompt fuf.jax /*g:fuf_buffer_prompt* -g:fuf_buffer_switchOrder fuf.jax /*g:fuf_buffer_switchOrder* -g:fuf_buffertag_ctagsPath fuf.jax /*g:fuf_buffertag_ctagsPath* -g:fuf_buffertag_prompt fuf.jax /*g:fuf_buffertag_prompt* -g:fuf_buffertag_switchOrder fuf.jax /*g:fuf_buffertag_switchOrder* -g:fuf_changelist_prompt fuf.jax /*g:fuf_changelist_prompt* -g:fuf_changelist_switchOrder fuf.jax /*g:fuf_changelist_switchOrder* -g:fuf_coveragefile_exclude fuf.jax /*g:fuf_coveragefile_exclude* -g:fuf_coveragefile_globPatterns fuf.jax /*g:fuf_coveragefile_globPatterns* -g:fuf_coveragefile_prompt fuf.jax /*g:fuf_coveragefile_prompt* -g:fuf_coveragefile_switchOrder fuf.jax /*g:fuf_coveragefile_switchOrder* -g:fuf_dataDir fuf.jax /*g:fuf_dataDir* -g:fuf_dir_exclude fuf.jax /*g:fuf_dir_exclude* -g:fuf_dir_prompt fuf.jax /*g:fuf_dir_prompt* -g:fuf_dir_switchOrder fuf.jax /*g:fuf_dir_switchOrder* -g:fuf_enumeratingLimit fuf.jax /*g:fuf_enumeratingLimit* -g:fuf_file_exclude fuf.jax /*g:fuf_file_exclude* -g:fuf_file_prompt fuf.jax /*g:fuf_file_prompt* -g:fuf_file_switchOrder fuf.jax /*g:fuf_file_switchOrder* -g:fuf_fuzzyRefining fuf.jax /*g:fuf_fuzzyRefining* -g:fuf_help_prompt fuf.jax /*g:fuf_help_prompt* -g:fuf_help_switchOrder fuf.jax /*g:fuf_help_switchOrder* -g:fuf_ignoreCase fuf.jax /*g:fuf_ignoreCase* -g:fuf_jumplist_prompt fuf.jax /*g:fuf_jumplist_prompt* -g:fuf_jumplist_switchOrder fuf.jax /*g:fuf_jumplist_switchOrder* -g:fuf_keyNextMode fuf.jax /*g:fuf_keyNextMode* -g:fuf_keyNextPattern fuf.jax /*g:fuf_keyNextPattern* -g:fuf_keyOpen fuf.jax /*g:fuf_keyOpen* -g:fuf_keyOpenSplit fuf.jax /*g:fuf_keyOpenSplit* -g:fuf_keyOpenTabpage fuf.jax /*g:fuf_keyOpenTabpage* -g:fuf_keyOpenVsplit fuf.jax /*g:fuf_keyOpenVsplit* -g:fuf_keyPrevMode fuf.jax /*g:fuf_keyPrevMode* -g:fuf_keyPrevPattern fuf.jax /*g:fuf_keyPrevPattern* -g:fuf_keyPreview fuf.jax /*g:fuf_keyPreview* -g:fuf_keySwitchMatching fuf.jax /*g:fuf_keySwitchMatching* -g:fuf_learningLimit fuf.jax /*g:fuf_learningLimit* -g:fuf_line_prompt fuf.jax /*g:fuf_line_prompt* -g:fuf_line_switchOrder fuf.jax /*g:fuf_line_switchOrder* -g:fuf_maxMenuWidth fuf.jax /*g:fuf_maxMenuWidth* -g:fuf_modesDisable fuf.jax /*g:fuf_modesDisable* -g:fuf_mrucmd_exclude fuf.jax /*g:fuf_mrucmd_exclude* -g:fuf_mrucmd_maxItem fuf.jax /*g:fuf_mrucmd_maxItem* -g:fuf_mrucmd_prompt fuf.jax /*g:fuf_mrucmd_prompt* -g:fuf_mrucmd_switchOrder fuf.jax /*g:fuf_mrucmd_switchOrder* -g:fuf_mrufile_exclude fuf.jax /*g:fuf_mrufile_exclude* -g:fuf_mrufile_keyExpand fuf.jax /*g:fuf_mrufile_keyExpand* -g:fuf_mrufile_maxItem fuf.jax /*g:fuf_mrufile_maxItem* -g:fuf_mrufile_maxItemDir fuf.jax /*g:fuf_mrufile_maxItemDir* -g:fuf_mrufile_prompt fuf.jax /*g:fuf_mrufile_prompt* -g:fuf_mrufile_switchOrder fuf.jax /*g:fuf_mrufile_switchOrder* -g:fuf_patternSeparator fuf.jax /*g:fuf_patternSeparator* -g:fuf_previewHeight fuf.jax /*g:fuf_previewHeight* -g:fuf_promptHighlight fuf.jax /*g:fuf_promptHighlight* -g:fuf_quickfix_prompt fuf.jax /*g:fuf_quickfix_prompt* -g:fuf_quickfix_switchOrder fuf.jax /*g:fuf_quickfix_switchOrder* -g:fuf_reuseWindow fuf.jax /*g:fuf_reuseWindow* -g:fuf_splitPathMatching fuf.jax /*g:fuf_splitPathMatching* -g:fuf_tag_prompt fuf.jax /*g:fuf_tag_prompt* -g:fuf_tag_switchOrder fuf.jax /*g:fuf_tag_switchOrder* -g:fuf_taggedfile_prompt fuf.jax /*g:fuf_taggedfile_prompt* -g:fuf_taggedfile_switchOrder fuf.jax /*g:fuf_taggedfile_switchOrder* -g:fuf_timeFormat fuf.jax /*g:fuf_timeFormat* -g:fuf_useMigemo fuf.jax /*g:fuf_useMigemo* diff --git a/bundle/vim-org-vim-fuzzyfinder-4.2.2/plugin/fuf.vim b/bundle/vim-org-vim-fuzzyfinder-4.2.2/plugin/fuf.vim deleted file mode 100644 index 9826dabe..00000000 --- a/bundle/vim-org-vim-fuzzyfinder-4.2.2/plugin/fuf.vim +++ /dev/null @@ -1,158 +0,0 @@ -"============================================================================= -" Copyright (c) 2007-2010 Takeshi NISHIDA -" -" GetLatestVimScripts: 1984 1 :AutoInstall: FuzzyFinder -"============================================================================= -" LOAD GUARD {{{1 - -try - if !l9#guardScriptLoading(expand(':p'), 702, 101, []) - finish - endif -catch /E117/ - echoerr '***** L9 library must be installed! *****' - finish -endtry - -" }}}1 -"============================================================================= -" LOCAL FUNCTIONS {{{1 - -" -function s:initialize() - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_modesDisable' , [ 'mrufile', 'mrucmd', ]) - call l9#defineVariableDefault('g:fuf_keyOpen' , '') - call l9#defineVariableDefault('g:fuf_keyOpenSplit' , '') - call l9#defineVariableDefault('g:fuf_keyOpenVsplit' , '') - call l9#defineVariableDefault('g:fuf_keyOpenTabpage' , '') - call l9#defineVariableDefault('g:fuf_keyPreview' , '') - call l9#defineVariableDefault('g:fuf_keyNextMode' , '') - call l9#defineVariableDefault('g:fuf_keyPrevMode' , '') - call l9#defineVariableDefault('g:fuf_keyPrevPattern' , '') - call l9#defineVariableDefault('g:fuf_keyNextPattern' , '') - call l9#defineVariableDefault('g:fuf_keySwitchMatching', '') - call l9#defineVariableDefault('g:fuf_dataDir' , '~/.vim-fuf-data') - call l9#defineVariableDefault('g:fuf_abbrevMap' , {}) - call l9#defineVariableDefault('g:fuf_patternSeparator' , ';') - call l9#defineVariableDefault('g:fuf_promptHighlight' , 'Question') - call l9#defineVariableDefault('g:fuf_ignoreCase' , 1) - call l9#defineVariableDefault('g:fuf_splitPathMatching', 1) - call l9#defineVariableDefault('g:fuf_fuzzyRefining' , 0) - call l9#defineVariableDefault('g:fuf_smartBs' , 1) - call l9#defineVariableDefault('g:fuf_reuseWindow' , 1) - call l9#defineVariableDefault('g:fuf_timeFormat' , '(%Y-%m-%d %H:%M:%S)') - call l9#defineVariableDefault('g:fuf_learningLimit' , 100) - call l9#defineVariableDefault('g:fuf_enumeratingLimit' , 50) - call l9#defineVariableDefault('g:fuf_maxMenuWidth' , 78) - call l9#defineVariableDefault('g:fuf_previewHeight' , 0) - call l9#defineVariableDefault('g:fuf_autoPreview' , 0) - call l9#defineVariableDefault('g:fuf_useMigemo' , 0) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_buffer_prompt' , '>Buffer[]>') - call l9#defineVariableDefault('g:fuf_buffer_switchOrder', 10) - call l9#defineVariableDefault('g:fuf_buffer_mruOrder' , 1) - call l9#defineVariableDefault('g:fuf_buffer_keyDelete' , '') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_file_prompt' , '>File[]>') - call l9#defineVariableDefault('g:fuf_file_switchOrder', 20) - call l9#defineVariableDefault('g:fuf_file_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_coveragefile_prompt' , '>CoverageFile[]>') - call l9#defineVariableDefault('g:fuf_coveragefile_switchOrder', 30) - call l9#defineVariableDefault('g:fuf_coveragefile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])') - call l9#defineVariableDefault('g:fuf_coveragefile_globPatterns', ['**/.*', '**/*']) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_dir_prompt' , '>Dir[]>') - call l9#defineVariableDefault('g:fuf_dir_switchOrder', 40) - call l9#defineVariableDefault('g:fuf_dir_exclude' , '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_mrufile_prompt' , '>MRU-File[]>') - call l9#defineVariableDefault('g:fuf_mrufile_switchOrder', 50) - call l9#defineVariableDefault('g:fuf_mrufile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)') - call l9#defineVariableDefault('g:fuf_mrufile_maxItem' , 200) - call l9#defineVariableDefault('g:fuf_mrufile_maxItemDir' , 50) - call l9#defineVariableDefault('g:fuf_mrufile_keyExpand' , '') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_mrucmd_prompt' , '>MRU-Cmd[]>') - call l9#defineVariableDefault('g:fuf_mrucmd_switchOrder', 60) - call l9#defineVariableDefault('g:fuf_mrucmd_exclude' , '^$') - call l9#defineVariableDefault('g:fuf_mrucmd_maxItem' , 200) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_bookmarkfile_prompt' , '>Bookmark-File[]>') - call l9#defineVariableDefault('g:fuf_bookmarkfile_switchOrder', 70) - call l9#defineVariableDefault('g:fuf_bookmarkfile_searchRange', 400) - call l9#defineVariableDefault('g:fuf_bookmarkfile_keyDelete' , '') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_bookmarkdir_prompt' , '>Bookmark-Dir[]>') - call l9#defineVariableDefault('g:fuf_bookmarkdir_switchOrder', 80) - call l9#defineVariableDefault('g:fuf_bookmarkdir_keyDelete' , '') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_tag_prompt' , '>Tag[]>') - call l9#defineVariableDefault('g:fuf_tag_switchOrder', 90) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_buffertag_prompt' , '>Buffer-Tag[]>') - call l9#defineVariableDefault('g:fuf_buffertag_switchOrder', 100) - call l9#defineVariableDefault('g:fuf_buffertag_ctagsPath' , 'ctags') - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_taggedfile_prompt' , '>Tagged-File[]>') - call l9#defineVariableDefault('g:fuf_taggedfile_switchOrder', 110) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_jumplist_prompt' , '>Jump-List[]>') - call l9#defineVariableDefault('g:fuf_jumplist_switchOrder', 120) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_changelist_prompt' , '>Change-List[]>') - call l9#defineVariableDefault('g:fuf_changelist_switchOrder', 130) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_quickfix_prompt' , '>Quickfix[]>') - call l9#defineVariableDefault('g:fuf_quickfix_switchOrder', 140) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_line_prompt' , '>Line[]>') - call l9#defineVariableDefault('g:fuf_line_switchOrder', 150) - "--------------------------------------------------------------------------- - call l9#defineVariableDefault('g:fuf_help_prompt' , '>Help[]>') - call l9#defineVariableDefault('g:fuf_help_switchOrder', 160) - "--------------------------------------------------------------------------- - command! -bang -narg=0 FufEditDataFile call fuf#editDataFile() - command! -bang -narg=0 FufRenewCache call s:renewCachesOfAllModes() - "--------------------------------------------------------------------------- - call fuf#addMode('buffer') - call fuf#addMode('file') - call fuf#addMode('coveragefile') - call fuf#addMode('dir') - call fuf#addMode('mrufile') - call fuf#addMode('mrucmd') - call fuf#addMode('bookmarkfile') - call fuf#addMode('bookmarkdir') - call fuf#addMode('tag') - call fuf#addMode('buffertag') - call fuf#addMode('taggedfile') - call fuf#addMode('jumplist') - call fuf#addMode('changelist') - call fuf#addMode('quickfix') - call fuf#addMode('line') - call fuf#addMode('help') - call fuf#addMode('givenfile') - call fuf#addMode('givendir') - call fuf#addMode('givencmd') - call fuf#addMode('callbackfile') - call fuf#addMode('callbackitem') - "--------------------------------------------------------------------------- -endfunction - -" -function s:renewCachesOfAllModes() - for m in fuf#getModeNames() - call fuf#{m}#renewCache() - endfor -endfunction - -" }}}1 -"============================================================================= -" INITIALIZATION {{{1 - -call s:initialize() - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-l9-1.1/autoload/l9.vim b/bundle/vim-org-vim-l9-1.1/autoload/l9.vim deleted file mode 100644 index b6a0ae7f..00000000 --- a/bundle/vim-org-vim-l9-1.1/autoload/l9.vim +++ /dev/null @@ -1,570 +0,0 @@ -"============================================================================= -" Copyright (c) 2009-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if exists('g:loaded_autoload_l9') - finish -endif -let g:loaded_autoload_l9 = 1 - -" }}}1 -"============================================================================= -" COMPATIBILITY TEST {{{1 - -" -let s:L9_VERSION_CURRENT = 101 -let s:L9_VERSION_PASSABLE = 101 - -" returns true if given version is compatible. -function l9#isCompatible(ver) - return -endfunction - -let s:VERSION_FACTOR = str2float('0.01') - -" returns false if the caller script should finish. -" a:vimVersion: if 0, don't check vim version -" a:l9Version: same rule as v:version -function l9#guardScriptLoading(path, vimVersion, l9Version, exprs) - let loadedVarName = 'g:loaded_' . substitute(a:path, '\W', '_', 'g') - if exists(loadedVarName) - return 0 - elseif a:vimVersion > 0 && a:vimVersion > v:version - echoerr a:path . ' requires Vim version ' . string(a:vimVersion * s:VERSION_FACTOR) - return 0 - elseif a:l9Version > 0 && (a:l9Version > s:L9_VERSION_CURRENT || - \ a:l9Version < s:L9_VERSION_PASSABLE) - echoerr a:path . ' requires L9 library version ' . string(a:l9Version * s:VERSION_FACTOR) - return 0 - endif - for expr in a:exprs - if !eval(expr) - echoerr a:path . ' requires: ' . expr - return 0 - endif - endfor - let {loadedVarName} = 1 - return 1 -endfunction - -" -function l9#getVersion() - return s:L9_VERSION_CURRENT -endfunction - -" }}}1 -"============================================================================= -" LIST {{{1 - -" Removes duplicates (unstable) -" This function doesn't change the list of argument. -function l9#unique(items) - let sorted = sort(a:items) - if len(sorted) < 2 - return sorted - endif - let last = remove(sorted, 0) - let result = [last] - for item in sorted - if item != last - call add(result, item) - let last = item - endif - endfor - return result -endfunction - -" Removes duplicates (stable) -" This function doesn't change the list of argument. -function l9#uniqueStably(items) - let result = [] - for item in a:items - if count(result, item, &ignorecase) == 0 - call add(result, item) - endif - endfor - return result -endfunction - -" [ [0], [1,2], [3] ] -> [ 0, 1, 2, 3 ] -" This function doesn't change the list of argument. -function l9#concat(items) - let result = [] - for l in a:items - let result += l - endfor - return result -endfunction - -" [ [0,1,2], [3,4], [5,6,7,8] ] -> [ [0,3,5],[1,4,6] ] -" This function doesn't change the list of argument. -function l9#zip(items) - let result = [] - for i in range(min(map(copy(a:items), 'len(v:val)'))) - call add(result, map(copy(a:items), 'v:val[i]')) - endfor - return result -endfunction - -" filter() with the maximum number of items -" This function doesn't change the list of argument. -function l9#filterWithLimit(items, expr, limit) - if a:limit <= 0 - return filter(copy(a:items), a:expr) - endif - let result = [] - let stride = a:limit * 3 / 2 " x1.5 - for i in range(0, len(a:items) - 1, stride) - let result += filter(a:items[i : i + stride - 1], a:expr) - if len(result) >= a:limit - return remove(result, 0, a:limit - 1) - endif - endfor - return result -endfunction - -" Removes if a:expr is evaluated as non-zero and returns removed items. -" This function change the list of argument. -function l9#removeIf(items, expr) - let removed = filter(copy(a:items), a:expr) - call filter(a:items, '!( ' . a:expr . ')') - return removed -endfunction - -" }}}1 -"============================================================================= -" NUMERIC {{{1 - -" }}}1 -"============================================================================= -" STRING {{{1 - -" Snips a:str and add a:mask if the length of a:str is more than a:len -function l9#snipHead(str, len, mask) - if a:len >= len(a:str) - return a:str - elseif a:len <= len(a:mask) - return a:mask - endif - return a:mask . a:str[-a:len + len(a:mask):] -endfunction - -" Snips a:str and add a:mask if the length of a:str is more than a:len -function l9#snipTail(str, len, mask) - if a:len >= len(a:str) - return a:str - elseif a:len <= len(a:mask) - return a:mask - endif - return a:str[:a:len - 1 - len(a:mask)] . a:mask -endfunction - -" Snips a:str and add a:mask if the length of a:str is more than a:len -function l9#snipMid(str, len, mask) - if a:len >= len(a:str) - return a:str - elseif a:len <= len(a:mask) - return a:mask - endif - let len_head = (a:len - len(a:mask)) / 2 - let len_tail = a:len - len(a:mask) - len_head - return (len_head > 0 ? a:str[: len_head - 1] : '') . a:mask . - \ (len_tail > 0 ? a:str[-len_tail :] : '') -endfunction - -" -function l9#hash224(str) - let a = 0x00000800 " shift 11 bit (if unsigned) - let b = 0x001fffff " extract 11 bit (if unsigned) - let nHash = 7 - let hashes = repeat([0], nHash) - for i in range(len(a:str)) - let iHash = i % nHash - let hashes[iHash] = hashes[iHash] * a + hashes[iHash] / b - let hashes[iHash] += char2nr(a:str[i]) - endfor - return join(map(hashes, 'printf("%08x", v:val)'), '') -endfunction - -" wildcard -> regexp -function l9#convertWildcardToRegexp(expr) - let re = escape(a:expr, '\') - for [pat, sub] in [ [ '*', '\\.\\*' ], [ '?', '\\.' ], [ '[', '\\[' ], ] - let re = substitute(re, pat, sub, 'g') - endfor - return '\V' . re -endfunction - -" }}}1 -"============================================================================= -" LINES {{{1 - -" Removes from the line matching with a:begin first to the line matching with -" a:end next and returns removed lines. -" If matching range is not found, returns [] -function l9#removeLinesBetween(lines, begin, end) - for i in range(len(a:lines) - 1) - if a:lines[i] =~ a:begin - break - endif - endfor - for j in range(i + 1, len(a:lines) - 1) - if a:lines[j] =~ a:end - let g:l0 += [a:lines[i : j]] - return remove(a:lines, i, j) - endif - endfor - return [] -endfunction - -" }}}1 -"============================================================================= -" PATH {{{1 - -" returns the path separator charactor. -function l9#getPathSeparator() - return (!&shellslash && (has('win32') || has('win64')) ? '\' : '/') -endfunction - -" [ 'a', 'b/', '/c' ] -> 'a/b/c' -function l9#concatPaths(paths) - let result = '' - for p in a:paths - if empty(p) - continue - elseif empty(result) - let result = p - else - let result = substitute(result, '[/\\]$', '', '') . l9#getPathSeparator() - \ . substitute(p, '^[/\\]', '', '') - endif - endfor - return result -endfunction - -" path: '/a/b/c/d', dir: '/a/b' => 'c/d' -function l9#modifyPathRelativeToDir(path, dir) - let pathFull = fnamemodify(a:path, ':p') - let dirFull = fnamemodify(a:dir, ':p') - if len(pathFull) < len(dirFull) || pathFull[:len(dirFull) - 1] !=# dirFull - return pathFull - endif - return pathFull[len(dirFull):] -endfunction - -" }}}1 -"============================================================================= -" FILE {{{1 - -" Almost same as readfile(). -function l9#readFile(...) - let args = copy(a:000) - let args[0] = expand(args[0]) - try - return call('readfile', args) - catch - endtry - return [] -endfunction - -" Almost same as writefile(). -function l9#writeFile(...) - let args = copy(a:000) - let args[1] = expand(args[1]) - let dir = fnamemodify(args[1], ':h') - try - if !isdirectory(dir) - call mkdir(dir, 'p') - endif - return call('writefile', args) - catch - endtry - return -1 " -1 is error code. -endfunction - -" }}}1 -"============================================================================= -" BUFFER {{{1 - -" :wall/:wall! wrapper. Useful for writing readonly buffers. -function l9#writeAll() - try - silent update " NOTE: avoiding a problem with a buftype=acwrite buffer. - silent wall - catch /^Vim/ " E45, E505 - if l9#inputHl('Question', v:exception . "\nWrite readonly files? (Y/N) : ", 'Y') ==? 'y' - redraw - :wall! - endif - endtry -endfunction - -" Loads given files with :edit command -function l9#loadFilesToBuffers(files) - for file in filter(copy(a:files), '!bufloaded(v:val)') - execute 'edit ' . fnameescape(file) - if !exists('bufNrFirst') - let bufNrFirst = bufnr('%') - endif - endfor - if exists('bufNrFirst') - execute bufNrFirst . 'buffer' - endif -endfunction - -" Deletes all buffers except given files with :bdelete command -function l9#deleteAllBuffersExcept(files) - let bufNrExcepts = map(copy(a:files), 'bufnr("^" . v:val . "$")') - for bufNr in filter(range(1, bufnr('$')), 'bufloaded(v:val)') - if count(bufNrExcepts, bufNr) == 0 - execute bufNr . 'bdelete' - endif - endfor -endfunction - -" }}}1 -"============================================================================= -" WINDOW {{{1 - -" move current window to next tabpage. -function l9#shiftWinNextTabpage() - if tabpagenr('$') < 2 - return - endif - let bufnr = bufnr('%') - tabnext - execute bufnr . 'sbuffer' - tabprevious - if winnr('$') > 1 - close - tabnext - else - close " if tabpage is closed, next tabpage will become current - endif -endfunction - -" move current window to previous tabpage. -function l9#shiftWinPrevTabpage() - if tabpagenr('$') < 2 - return - endif - let bufnr = bufnr('%') - tabprevious - execute bufnr . 'sbuffer' - tabnext - close - tabprevious -endfunction - -" move to a window containing specified buffer. -" returns 0 if the buffer is not found. -function l9#moveToBufferWindowInCurrentTabpage(bufNr) - if bufnr('%') == a:bufNr - return 1 - elseif count(tabpagebuflist(), a:bufNr) == 0 - return 0 - endif - execute bufwinnr(a:bufNr) . 'wincmd w' - return 1 -endfunction - -" returns 0 if the buffer is not found. -function s:moveToOtherTabpageOpeningBuffer(bufNr) - for tabNr in range(1, tabpagenr('$')) - if tabNr != tabpagenr() && count(tabpagebuflist(tabNr), a:bufNr) > 0 - execute 'tabnext ' . tabNr - return 1 - endif - endfor - return 0 -endfunction - -" move to a window containing specified buffer. -" returns 0 if the buffer is not found. -function l9#moveToBufferWindowInOtherTabpage(bufNr) - if !s:moveToOtherTabpageOpeningBuffer(a:bufNr) - return 0 - endif - return l9#moveToBufferWindowInCurrentTabpage(a:bufNr) -endfunction - -" }}}1 -"============================================================================= -" COMMAND LINE {{{1 - -" echo/echomsg with highlighting. -function l9#echoHl(hl, msg, prefix, addingHistory) - let echoCmd = (a:addingHistory ? 'echomsg' : 'echo') - execute "echohl " . a:hl - try - for l in (type(a:msg) == type([]) ? a:msg : split(a:msg, "\n")) - execute echoCmd . ' a:prefix . l' - endfor - finally - echohl None - endtry -endfunction - -" input() with highlighting. -" This function can take list as {completion} argument. -function l9#inputHl(hl, ...) - execute "echohl " . a:hl - try - let args = copy(a:000) - if len(args) > 2 && type(args[2]) == type([]) - let s:candidatesForInputHl = args[2] - let args[2] = 'custom,l9#completeForInputHl' - endif - let s = call('input', args) - unlet! s:candidatesForInputHl - finally - echohl None - endtry - redraw " needed to show following echo to next line. - return s -endfunction - -" only called by l9#inputHl() for completion. -function l9#completeForInputHl(lead, line, pos) - return join(s:candidatesForInputHl, "\n") -endfunction - -" }}}1 -"============================================================================= -" VISUAL MODE {{{1 - -" returns last selected text in Visual mode. -function l9#getSelectedText() - let reg_ = [@", getregtype('"')] - let regA = [@a, getregtype('a')] - if mode() =~# "[vV\]" - silent normal! "aygv - else - let pos = getpos('.') - silent normal! gv"ay - call setpos('.', pos) - endif - let text = @a - call setreg('"', reg_[0], reg_[1]) - call setreg('a', regA[0], regA[1]) - return text -endfunction - - -" }}}1 -"============================================================================= -" EVAL {{{1 - -" loads given text as Vim script with :source command -function l9#loadScript(text) - let lines = (type(a:text) == type([]) ? a:text : split(a:text, "\n")) - let fname = tempname() - call writefile(lines, fname) - source `=fname` - call delete(fname) -endfunction - - -" }}}1 -"============================================================================= -" VARIABLES {{{1 - -" -function l9#defineVariableDefault(name, default) - if !exists(a:name) - let {a:name} = a:default - endif -endfunction - -" }}}1 -"============================================================================= -" GREP {{{1 - -" Execute :vimgrep and opens the quickfix window if matches are found. -" -" a:pattern: search pattern. If ommitted, last search pattern (@/) is used. -" a:files: List of files -function l9#grepFiles(pattern, files) - let target = join(map(a:files, 'escape(v:val, " ")'), ' ') - let pattern = (a:pattern[0] ==# '/' ? a:pattern[1:] : a:pattern) - let pattern = (empty(pattern) ? @/ : pattern) - try - execute printf('vimgrep/%s/j %s', pattern, target) - catch /^Vim/ - call setqflist([]) - endtry - call l9#quickfix#sort() - call l9#quickfix#openIfNotEmpty(1, 0) -endfunction - -" Execute :vimgrep for buffers using l9#grepFiles() -" See also: :L9GrepBuffer :L9GrepBufferAll -function l9#grepBuffers(pattern, bufNrs) - let files = map(filter(a:bufNrs, 'bufloaded(v:val)'), 'bufname(v:val)') - call l9#grepFiles(a:pattern, files) -endfunction - -" }}}1 -"============================================================================= -" SIGN {{{1 - -" Highlights lines using :sign define and :sign place. -" -" a:linehl, a:text, a:texthl: See |signs|. Ignored if empty string. -" a:locations: List of [{buffer number}, {line number}] for highlighting -function l9#placeSign(linehl, text, texthl, locations) - let argLinehl = (empty(a:linehl) ? '' : 'linehl=' . a:linehl) - let argText = (empty(a:text) ? '' : 'text=' . a:text) - let argTexthl = (empty(a:texthl) ? '' : 'texthl=' . a:texthl) - let name = 'l9--' . a:linehl . '--' . a:text . '--' . a:texthl - execute printf('sign define %s linehl=%s text=%s texthl=%s', - \ name, a:linehl, a:text, a:texthl) - for [bufNr, lnum] in a:locations - execute printf('sign place 1 line=%d name=%s buffer=%d', lnum, name, bufNr) - endfor -endfunction - -" }}}1 -"============================================================================= -" NOTIFY EXTERNALLY {{{1 - -" Notify a message using an external program. -" Currently supports Balloonly, Screen, and Tmux. -function l9#notifyExternally(msg) - return l9#notifyBalloonly(a:msg) - \ || l9#notifyScreen(a:msg) - \ || l9#notifyTmux(a:msg) -endfunction - -" -function l9#notifyBalloonly(msg) - if !(has('win32') || has('win64')) || !executable(g:l9_balloonly) - return 0 - endif - execute 'silent !start ' . shellescape(g:l9_balloonly) . ' 4000 "l9" ' . shellescape(a:msg) - return 1 -endfunction - -" -function l9#notifyScreen(msg) - if !has('unix') || has('gui_running') || $WINDOW !~ '\d' || !executable('screen') - return 0 - endif - call system('screen -X wall ' . shellescape('l9: ' . a:msg)) - return 1 -endfunction - -" -function l9#notifyTmux(msg) - if !has('unix') || has('gui_running') || empty($TMUX) || !executable('tmux') - return 0 - endif - call system('tmux display-message ' . shellescape('l9: ' . a:msg)) - return 1 -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-org-vim-l9-1.1/autoload/l9/async.py b/bundle/vim-org-vim-l9-1.1/autoload/l9/async.py deleted file mode 100644 index eeb0cc3b..00000000 --- a/bundle/vim-org-vim-l9-1.1/autoload/l9/async.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python - -from __future__ import with_statement -import vim -import os -import subprocess -import threading -import Queue - - -class Asyncer: - - def __init__(self): - self._workers = {} - - def execute(self, var_key, var_command, var_cwd, var_input, var_appends): - key = vim.eval(var_key) - command = vim.eval(var_command) - cwd = vim.eval(var_cwd) - input = vim.eval(var_input) - appends = vim.eval(var_appends) - if key not in self._workers: - self._workers[key] = Worker() - self._workers[key].start() - self._workers[key].put(Executor(command, cwd, input, appends)) - - def print_output(self, var_key): - key = vim.eval(var_key) - if key not in self._workers: - return - for l in self._workers[key].copy_outputs(): - print l, - - def print_worker_keys(self): - for k in self._workers.keys(): - print k - - def print_active_worker_keys(self): - for k in self._workers.keys(): - print k - - -class Worker(threading.Thread): - - def __init__(self): - threading.Thread.__init__(self) - self._queue = Queue.Queue() - self._lines = [] - self._lock = threading.Lock() - - def run(self): - while True: - self._queue.get().execute(self) - self._queue.task_done() - - def put(self, executor): - self._queue.put(executor) - - def clear_outputs(self): - with self._lock: - self._lines = [] - - def record_output(self, line): - with self._lock: - self._lines.append(line) - - def copy_outputs(self): - with self._lock: - return self._lines[:] - - -class Executor: - - def __init__(self, command, cwd, input, appends): - self._command = command - self._cwd = cwd - self._input = input - self._appends = appends - - def execute(self, worker): - if not self._appends: - worker.clear_outputs() - os.chdir(self._cwd) - p = subprocess.Popen(self._command, shell=True, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - p.stdin.write(self._input) - line = p.stdout.readline() - while line: - worker.record_output(line) - line = p.stdout.readline() - - diff --git a/bundle/vim-org-vim-l9-1.1/autoload/l9/async.vim b/bundle/vim-org-vim-l9-1.1/autoload/l9/async.vim deleted file mode 100644 index fa66e9f1..00000000 --- a/bundle/vim-org-vim-l9-1.1/autoload/l9/async.vim +++ /dev/null @@ -1,67 +0,0 @@ -"============================================================================= -" Copyright (C) 2009-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, ['has("python")']) - finish -endif - -" }}}1 -"============================================================================= -" ASYNC EXECUTE {{{1 - -" -function s:checkKey(key) - if a:key =~ '\n' || a:key !~ '\S' - throw "Asyncer: Invalid key: " . a:key - endif -endfunction - -" -function l9#async#execute(key, cmd, cwd, input, appends) - call s:checkKey(a:key) - python asyncer.execute('a:key', 'a:cmd', 'a:cwd', 'a:input', 'a:appends') -endfunction - -" -function l9#async#read(key) - call s:checkKey(a:key) - redir => result - silent python asyncer.print_output('a:key') - redir END - " NOTE: "\n" is somehow inserted by redir. - return (result[0] ==# "\n" ? result[1:] : result) -endfunction - -" -function l9#async#listWorkers() - redir => result - silent python asyncer.print_worker_keys() - redir END - return split(result, "\n") -endfunction - -" -function l9#async#listActiveWorkers() - redir => result - silent python asyncer.print_active_worker_keys() - redir END - return split(result, "\n") -endfunction - -" }}}1 -"============================================================================= -" INITIALIZATION {{{1 - -let s:ASYNC_PY_PATH = fnamemodify(expand(':p:h'), ':p') . 'async.py' - -pyfile `=s:ASYNC_PY_PATH` -python asyncer = Asyncer() - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - - diff --git a/bundle/vim-org-vim-l9-1.1/autoload/l9/quickfix.vim b/bundle/vim-org-vim-l9-1.1/autoload/l9/quickfix.vim deleted file mode 100644 index 1758b39c..00000000 --- a/bundle/vim-org-vim-l9-1.1/autoload/l9/quickfix.vim +++ /dev/null @@ -1,107 +0,0 @@ -"============================================================================= -" Copyright (C) 2009-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" QUICKFIX {{{1 - -" Returns non-zero if quickfix window is opened. -function l9#quickfix#isWindowOpened() - return count(map(range(1, winnr('$')), 'getwinvar(v:val, "&buftype")'), 'quickfix') > 0 -endfunction - -" Opens quickfix window if quickfix is not empty, and echo the number of errors. -" -" a:onlyRecognized: if non-zero, opens only if quickfix has recognized errors. -" a:holdCursor: if non-zero, the cursor won't move to quickfix window. -function l9#quickfix#openIfNotEmpty(onlyRecognized, holdCursor) - let numErrors = len(filter(getqflist(), 'v:val.valid')) - let numOthers = len(getqflist()) - numErrors - if numErrors > 0 || (!a:onlyRecognized && numOthers > 0) - copen - if a:holdCursor - wincmd p - endif - else - cclose - endif - redraw - if numOthers > 0 - echo printf('Quickfix: %d(+%d)', numErrors, numOthers) - else - echo printf('Quickfix: %d', numErrors) - endif -endfunction - -" Toggles Quickfix window -function l9#quickfix#toggleWindow() - if l9#quickfix#isWindowOpened() - cclose - else - call l9#quickfix#openIfNotEmpty(0, 0) - endif -endfunction - -" Creates quickfix list form given lines and opens the quickfix window if -" errors exists. -" -" a:lines: -" a:jump: if non-zero, jump to the first error. -function l9#quickfix#setMakeResult(lines) - cexpr a:lines - call l9#quickfix#openIfNotEmpty(0, 1) -endfunction - -" Compares quickfix entries for sorting. -function l9#quickfix#compareEntries(e0, e1) - if a:e0.bufnr != a:e1.bufnr - let i0 = bufname(a:e0.bufnr) - let i1 = bufname(a:e1.bufnr) - elseif a:e0.lnum != a:e1.lnum - let i0 = a:e0.lnum - let i1 = a:e1.lnum - elseif a:e0.col != a:e1.col - let i0 = a:e0.col - let i1 = a:e1.col - else - return 0 - endif - return (i0 > i1 ? +1 : -1) -endfunction - -" Sorts quickfix -function l9#quickfix#sort() - call setqflist(sort(getqflist(), 'l9#quickfix#compareEntries'), 'r') -endfunction - -" Highlights Quickfix lines by :sign. -" Inspired by errormarker plugin. -" -" You can customize the highlighting via L9ErrorLine and L9WarningLine -" highlight groups. -function l9#quickfix#placeSign() - let warnings = [] - let errors = [] - for e in filter(getqflist(), 'v:val.valid') - let warning = (e.type ==? 'w' || e.text =~? '^\s*warning:') - call add((warning ? warnings : errors), [e.bufnr, e.lnum]) - endfor - sign unplace * - call l9#placeSign('L9WarningLine', '>>', '', warnings) - call l9#placeSign('L9ErrorLine', '>>', '', errors) -endfunction - -highlight default L9ErrorLine ctermfg=white ctermbg=52 guibg=#5F0000 -highlight default L9WarningLine ctermfg=white ctermbg=17 guibg=#00005F - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-l9-1.1/autoload/l9/tempbuffer.vim b/bundle/vim-org-vim-l9-1.1/autoload/l9/tempbuffer.vim deleted file mode 100644 index 6f11a781..00000000 --- a/bundle/vim-org-vim-l9-1.1/autoload/l9/tempbuffer.vim +++ /dev/null @@ -1,112 +0,0 @@ -"============================================================================= -" Copyright (C) 2009-2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" TEMPORARY BUFFER {{{1 - -" each key is a buffer name. -let s:dataMap = {} - -" -function s:onBufDelete(bufname) - if exists('s:dataMap[a:bufname].listener.onClose') - call s:dataMap[a:bufname].listener.onClose(s:dataMap[a:bufname].written) - endif - if bufnr('%') == s:dataMap[a:bufname].bufNr && winnr('#') != 0 - " if winnr('#') returns 0, "wincmd p" causes ringing the bell. - wincmd p - endif -endfunction - -" -function s:onBufWriteCmd(bufname) - if !exists('s:dataMap[a:bufname].listener.onWrite') || - \ s:dataMap[a:bufname].listener.onWrite(getline(1, '$')) - setlocal nomodified - let s:dataMap[a:bufname].written = 1 - call l9#tempbuffer#close(a:bufname) - else - endif -endfunction - -" a:bufname: -" a:height: Window height. If 0, default height is used. -" If less than 0, the window becomes full-screen. -" a:listener: -" a:listener.onClose(written) -function l9#tempbuffer#openScratch(bufname, filetype, lines, topleft, vertical, height, listener) - let openCmdPrefix = (a:topleft ? 'topleft ' : '') - \ . (a:vertical ? 'vertical ' : '') - \ . (a:height > 0 ? a:height : '') - if !exists('s:dataMap[a:bufname]') || !bufexists(s:dataMap[a:bufname].bufNr) - execute openCmdPrefix . 'new' - else - call l9#tempbuffer#close(a:bufname) - execute openCmdPrefix . 'split' - execute 'silent ' . s:dataMap[a:bufname].bufNr . 'buffer' - endif - if a:height < 0 - only - endif - setlocal buflisted noswapfile bufhidden=delete modifiable noreadonly buftype=nofile - let &l:filetype = a:filetype - silent file `=a:bufname` - call setline(1, a:lines) - setlocal nomodified - augroup L9TempBuffer - autocmd! * - execute printf('autocmd BufDelete call s:onBufDelete (%s)', string(a:bufname)) - execute printf('autocmd BufWriteCmd nested call s:onBufWriteCmd(%s)', string(a:bufname)) - augroup END - let s:dataMap[a:bufname] = { - \ 'bufNr': bufnr('%'), - \ 'written': 0, - \ 'listener': a:listener, - \ } -endfunction - -" -function l9#tempbuffer#openReadOnly(bufname, filetype, lines, topleft, vertical, height, listener) - call l9#tempbuffer#openScratch(a:bufname, a:filetype, a:lines, a:topleft, a:vertical, a:height, a:listener) - setlocal nomodifiable readonly -endfunction - -" a:listener: -" a:listener.onClose(written) -" a:listener.onWrite(lines) -function l9#tempbuffer#openWritable(bufname, filetype, lines, topleft, vertical, height, listener) - call l9#tempbuffer#openScratch(a:bufname, a:filetype, a:lines, a:topleft, a:vertical, a:height, a:listener) - setlocal buftype=acwrite -endfunction - -" makes specified temp buffer current. -function l9#tempbuffer#moveTo(bufname) - return l9#moveToBufferWindowInCurrentTabpage(s:dataMap[a:bufname].bufNr) || - \ l9#moveToBufferWindowInOtherTabpage(s:dataMap[a:bufname].bufNr) -endfunction - -" -function l9#tempbuffer#close(bufname) - if !l9#tempbuffer#isOpen(a:bufname) - return - endif - execute printf('%dbdelete!', s:dataMap[a:bufname].bufNr) -endfunction - -" -function l9#tempbuffer#isOpen(bufname) - return exists('s:dataMap[a:bufname]') && bufloaded(s:dataMap[a:bufname].bufNr) -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-l9-1.1/autoload/l9/tempvariables.vim b/bundle/vim-org-vim-l9-1.1/autoload/l9/tempvariables.vim deleted file mode 100644 index ee847ee4..00000000 --- a/bundle/vim-org-vim-l9-1.1/autoload/l9/tempvariables.vim +++ /dev/null @@ -1,60 +0,0 @@ -"============================================================================= -" Copyright (C) 2010 Takeshi NISHIDA -" -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 0, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" TEMPORARY VARIABLES {{{1 - -" -let s:origMap = {} - -" set temporary variables -function l9#tempvariables#set(group, name, value) - if !exists('s:origMap[a:group]') - let s:origMap[a:group] = {} - endif - if !exists('s:origMap[a:group][a:name]') - let s:origMap[a:group][a:name] = eval(a:name) - endif - execute 'let ' . a:name . ' = a:value' -endfunction - -" set temporary variables -function l9#tempvariables#setList(group, variables) - for [name, value] in a:variables - call l9#tempvariables#set(a:group, name, value) - unlet value " to avoid E706 - endfor -endfunction - -" get temporary variables -function l9#tempvariables#getList(group) - if !exists('s:origMap[a:group]') - return [] - endif - return map(keys(s:origMap[a:group]), '[v:val, eval(v:val)]') -endfunction - -" restore original variables and clean up. -function l9#tempvariables#end(group) - if !exists('s:origMap[a:group]') - return - endif - for [name, value] in items(s:origMap[a:group]) - execute 'let ' . name . ' = value' - unlet value " to avoid E706 - endfor - unlet s:origMap[a:group] -endfunction - -" }}}1 -"============================================================================= -" vim: set fdm=marker: - diff --git a/bundle/vim-org-vim-l9-1.1/doc/l9.jax b/bundle/vim-org-vim-l9-1.1/doc/l9.jax deleted file mode 100644 index c84d45f9..00000000 --- a/bundle/vim-org-vim-l9-1.1/doc/l9.jax +++ /dev/null @@ -1,55 +0,0 @@ -*l9.txt* Vimスクリプトライブラリ - - Copyright (c) 2009-2010 Takeshi NISHIDA - -l9 *l9* - -概要 |l9-introduction| -インストール |l9-installation| -使い方 |l9-usage| -CHANGELOG |l9-changelog| -あばうと |l9-about| - -============================================================================== -概要 *l9-introduction* - -l9はVimスクリプトの関数やコマンドを提供するライブラリです。 - - -============================================================================== - インストール *l9-installation* - -ZIPファイルをランタイムディレクトリに展開します。 - -以下のようにファイルが配置されるはずです。 -> - /plugin/l9.vim - /doc/l9.txt - ... -< -もしランタイムディレクトリが多数のプラグインでごちゃごちゃになるのが嫌なら、各 -プラグインを個別のディレクトリに配置し、そのディレクトリのパスを 'runtimepath' -に追加してください。アンインストールも楽になります。 - -その後、ヘルプを有効にするためにタグファイルを更新してください。詳しくは -|add-local-help|を参照してください。 - -============================================================================== -使い方 *l9-usage* - -ソースコードを参照してください。 - -============================================================================== -あばうと *l9-about* *l9-contact* *l9-author* - -作者: Takeshi NISHIDA -ライセンス: MIT Licence -URL: http://www.vim.org/scripts/script.php?script_id=3252 - http://bitbucket.org/ns9tks/vim-l9/ - -バグや要望など ~ - -こちらへどうぞ: http://bitbucket.org/ns9tks/vim-l9/issues/ - -============================================================================== - vim:tw=78:ts=8:ft=help:norl: diff --git a/bundle/vim-org-vim-l9-1.1/doc/l9.txt b/bundle/vim-org-vim-l9-1.1/doc/l9.txt deleted file mode 100644 index 8664ad47..00000000 --- a/bundle/vim-org-vim-l9-1.1/doc/l9.txt +++ /dev/null @@ -1,73 +0,0 @@ -*l9.txt* Vim-script library - - Copyright (c) 2009-2010 Takeshi NISHIDA - -l9 *l9* - -INTRODUCTION |l9-introduction| -INSTALLATION |l9-installation| -USAGE |l9-usage| -CHANGELOG |l9-changelog| -ABOUT |l9-about| - -============================================================================== -INTRODUCTION *l9-introduction* - -l9 is a Vim-script library, which provides some utility functions and commands -for programming in Vim. - -============================================================================== - INSTALLATION *l9-installation* - -Put all files into your runtime directory. If you have the zip file, extract -it to your runtime directory. - -You should place the files as follows: -> - /plugin/l9.vim - /doc/l9.txt - ... -< -If you are disgusted to make your runtime directory confused with a lot of -plugins, put each of the plugins into a directory individually and just add -the directory path to 'runtimepath'. It's easy to uninstall the plugin. - -Then update your help tags files to enable fuzzyfinder help. See -|add-local-help| for details. - -============================================================================== -USAGE *l9-usage* - -See source code. - -============================================================================== -CHANGELOG *l9-changelog* - -1.1: - - Added l9#zip() - - Added l9#tempvariables#getList() - - Changed l9#guardScriptLoading() - - Removed l9#tempvariables#swap() - -1.0.1: - - Fixed a bug that floating point numbers weren't evaluated correctly and - caused errors on some non-English locales. - -1.0: - - First release. - - -============================================================================== -ABOUT *l9-about* *l9-contact* *l9-author* - -Author: Takeshi NISHIDA -Licence: MIT Licence -URL: http://www.vim.org/scripts/script.php?script_id=3252 - http://bitbucket.org/ns9tks/vim-l9/ - -Bugs/Issues/Suggestions/Improvements ~ - -Please submit to http://bitbucket.org/ns9tks/vim-l9/issues/ . - -============================================================================== - vim:tw=78:ts=8:ft=help:norl: diff --git a/bundle/vim-org-vim-l9-1.1/doc/tags b/bundle/vim-org-vim-l9-1.1/doc/tags deleted file mode 100644 index f26b5fa1..00000000 --- a/bundle/vim-org-vim-l9-1.1/doc/tags +++ /dev/null @@ -1,9 +0,0 @@ -l9 l9.txt /*l9* -l9-about l9.txt /*l9-about* -l9-author l9.txt /*l9-author* -l9-changelog l9.txt /*l9-changelog* -l9-contact l9.txt /*l9-contact* -l9-installation l9.txt /*l9-installation* -l9-introduction l9.txt /*l9-introduction* -l9-usage l9.txt /*l9-usage* -l9.txt l9.txt /*l9.txt* diff --git a/bundle/vim-org-vim-l9-1.1/doc/tags-ja b/bundle/vim-org-vim-l9-1.1/doc/tags-ja deleted file mode 100644 index dbb4de6f..00000000 --- a/bundle/vim-org-vim-l9-1.1/doc/tags-ja +++ /dev/null @@ -1,9 +0,0 @@ -!_TAG_FILE_ENCODING utf-8 // -l9 l9.jax /*l9* -l9-about l9.jax /*l9-about* -l9-author l9.jax /*l9-author* -l9-contact l9.jax /*l9-contact* -l9-installation l9.jax /*l9-installation* -l9-introduction l9.jax /*l9-introduction* -l9-usage l9.jax /*l9-usage* -l9.txt l9.jax /*l9.txt* diff --git a/bundle/vim-org-vim-l9-1.1/plugin/l9.vim b/bundle/vim-org-vim-l9-1.1/plugin/l9.vim deleted file mode 100644 index 03613e40..00000000 --- a/bundle/vim-org-vim-l9-1.1/plugin/l9.vim +++ /dev/null @@ -1,108 +0,0 @@ -"============================================================================= -" Copyright (C) 2009-2010 Takeshi NISHIDA -" -" GetLatestVimScripts: 3252 1 :AutoInstall: L9 -"============================================================================= -" LOAD GUARD {{{1 - -if !l9#guardScriptLoading(expand(':p'), 702, 0, []) - finish -endif - -" }}}1 -"============================================================================= -" OPTIONS: {{{1 - -call l9#defineVariableDefault('g:l9_balloonly', 'balloonly.exe') - -" }}}1 -"============================================================================= -" ASSERTION: {{{1 - -" This command has effect only if $L9_DEBUG is non-zero. -" Used as follows: -" L9Assert a:i > 0 -" This command can't interpret script-local variables directly. -" NG: L9Assert s:a == 1 -" OK: execute 'L9Assert ' . s:a . ' == 1' -" -if $L9_DEBUG - command -nargs=* L9Assert call eval(() ? 0 : s:handleFailedAssersion()) - - function s:handleFailedAssersion(expr) - echoerr '[L9Assert] Assersion failure: ' . a:expr - if input('[L9Assert] Continue? (Y/N) ', 'Y') !=? 'Y' - throw 'L9Assert ' . a:expr - endif - endfunction - -else - command -nargs=* L9Assert : -endif - -" }}}1 -"============================================================================= -" TIMER: {{{1 - -" These commands have effect only if $L9_TIMER is non-zero. -" Used as follows: -" L9Timer foo -" ... (1) -" L9Timer bar -" ... (2) -" L9TimerStop -" ... -" L9TimerDump <- shows each elapsed time of (1) and (2) -" -if $L9_TIMER - command -nargs=1 L9Timer call s:timerBegin() - command -nargs=0 L9TimerStop call s:timerStop() - command -nargs=0 L9TimerDump call s:timerDump() - - let s:timerData = [] - let s:timerTagMaxLen = 0 - - function s:timerBegin(tag) - L9TimerStop - let s:timerCurrent = {'tag': strftime('%c ') . a:tag . ' ', 'time': reltime()} - let s:timerTagMaxLen = max([len(s:timerCurrent.tag), s:timerTagMaxLen]) - endfunction - - function s:timerStop() - if !exists('s:timerCurrent') - return - endif - let s:timerCurrent.time = reltimestr(reltime(s:timerCurrent.time)) - call add(s:timerData, s:timerCurrent) - unlet s:timerCurrent - endfunction - - function s:timerDump() - L9TimerStop - let lines = map(s:timerData, 'v:val.tag . repeat(" ", s:timerTagMaxLen - len(v:val.tag)) . v:val.time') - call l9#tempbuffer#openReadOnly('[l9-timer]', '', lines, 0, 0, 0, {}) - let s:timerData = [] - let s:timerTagMaxLen = 0 - endfunction - -else - command -nargs=1 L9Timer : - command -nargs=0 L9TimerStop : - command -nargs=0 L9TimerDump : -endif - -" }}}1 -"============================================================================= -" GREP BUFFER: {{{1 - -" Grep for current buffer by l9#grepBuffers() -" Used as :L9GrepBuffer/pattern -command -nargs=? L9GrepBuffer call l9#grepBuffers(, [bufnr('%')]) - -" Grep for all buffers by l9#grepBuffers() -" Used as :L9GrepBufferAll/pattern -command -nargs=? L9GrepBufferAll call l9#grepBuffers(, range(1, bufnr('$'))) - -" }}}1 -"============================================================================= -" vim: set fdm=marker: diff --git a/bundle/vim-powerline b/bundle/vim-powerline deleted file mode 160000 index 114f8e5c..00000000 --- a/bundle/vim-powerline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 114f8e5c204f1cac9b2443065910fa182de39fb8 diff --git a/bundle/vim-qargs b/bundle/vim-qargs deleted file mode 160000 index 9f09f240..00000000 --- a/bundle/vim-qargs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9f09f240c601789029564dabdad5e8cadbb54474 diff --git a/bundle/vim-rails b/bundle/vim-rails deleted file mode 160000 index bdc32389..00000000 --- a/bundle/vim-rails +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bdc32389e7053c608a65f870c6c8f5e1210432a7 diff --git a/bundle/vim-repeat b/bundle/vim-repeat deleted file mode 160000 index a81bef76..00000000 --- a/bundle/vim-repeat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a81bef76031ca1c71766b516417480caeb01c932 diff --git a/bundle/vim-ruby b/bundle/vim-ruby deleted file mode 160000 index f4c550e2..00000000 --- a/bundle/vim-ruby +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f4c550e26483ce27b87440f27186dcb566a54a80 diff --git a/bundle/vim-ruby-refactoring b/bundle/vim-ruby-refactoring deleted file mode 160000 index 6447a4de..00000000 --- a/bundle/vim-ruby-refactoring +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6447a4debc3263a0fa99feeab5548edf27ecf045 diff --git a/bundle/vim-scala b/bundle/vim-scala deleted file mode 160000 index 11804cee..00000000 --- a/bundle/vim-scala +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 11804ceeaaf3343fc640cbb47e1c5f77209323d7 diff --git a/bundle/vim-slim b/bundle/vim-slim deleted file mode 160000 index 9f5018af..00000000 --- a/bundle/vim-slim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9f5018afd13539203e40f152b7e7b3955eec496a diff --git a/bundle/vim-surround b/bundle/vim-surround deleted file mode 160000 index 02199ea0..00000000 --- a/bundle/vim-surround +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 02199ea0080d744ec76b79d74ce56d51d25cf7ae diff --git a/bundle/vim-textobj-rubyblock b/bundle/vim-textobj-rubyblock deleted file mode 160000 index 97e41086..00000000 --- a/bundle/vim-textobj-rubyblock +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 97e41086a8ca040e40955a6a968c0b50ae953222 diff --git a/bundle/vim-textobj-user b/bundle/vim-textobj-user deleted file mode 160000 index 567931b1..00000000 --- a/bundle/vim-textobj-user +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 567931b10b067e96e77ea58a3db668fe0c1d251d diff --git a/bundle/vim-tomorrow-theme b/bundle/vim-tomorrow-theme deleted file mode 160000 index 010d2492..00000000 --- a/bundle/vim-tomorrow-theme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 010d2492ba8f2eea59191fe0f3c33a1dc6ce93a7 diff --git a/bundle/vim-unimpaired b/bundle/vim-unimpaired deleted file mode 160000 index 48d1cb6b..00000000 --- a/bundle/vim-unimpaired +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 48d1cb6bf0000159291014226d8d8d3330ad875e diff --git a/bundle/vim-vividchalk b/bundle/vim-vividchalk deleted file mode 160000 index fd696065..00000000 --- a/bundle/vim-vividchalk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd696065c7b27e8fca91907ba51151a887c36803 From 3b0b3236d305d4d03a8b3cd60b5fad7659da73b9 Mon Sep 17 00:00:00 2001 From: Dan Finnie and Grant Hutchins Date: Mon, 9 Sep 2013 11:05:42 -0400 Subject: [PATCH 3/7] Remove pathogen --- autoload/pathogen.vim | 326 ------------------------------------------ 1 file changed, 326 deletions(-) delete mode 100644 autoload/pathogen.vim diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim deleted file mode 100644 index 87ef0b68..00000000 --- a/autoload/pathogen.vim +++ /dev/null @@ -1,326 +0,0 @@ -" pathogen.vim - path option manipulation -" Maintainer: Tim Pope -" Version: 2.2 - -" Install in ~/.vim/autoload (or ~\vimfiles\autoload). -" -" For management of individually installed plugins in ~/.vim/bundle (or -" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your -" .vimrc is the only other setup necessary. -" -" The API is documented inline below. For maximum ease of reading, -" :set foldmethod=marker - -if exists("g:loaded_pathogen") || &cp - finish -endif -let g:loaded_pathogen = 1 - -function! s:warn(msg) - echohl WarningMsg - echomsg a:msg - echohl NONE -endfunction - -" Point of entry for basic default usage. Give a relative path to invoke -" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke -" pathogen#surround(). For backwards compatibility purposes, a full path that -" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() -" instead. -function! pathogen#infect(...) abort " {{{1 - for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}'] - if path =~# '^[^\\/]\+$' - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#incubate(path . '/{}') - elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$' - call pathogen#incubate(path) - elseif path =~# '[\\/]\%({}\|\*\)$' - call pathogen#surround(path) - else - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#surround(path . '/{}') - endif - endfor - call pathogen#cycle_filetype() - return '' -endfunction " }}}1 - -" Split a path into a list. -function! pathogen#split(path) abort " {{{1 - if type(a:path) == type([]) | return a:path | endif - let split = split(a:path,'\\\@"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags')) - silent! execute 'helptags' pathogen#fnameescape(dir.'/doc') - endif - endfor - endfor -endfunction " }}}1 - -command! -bar Helptags :call pathogen#helptags() - -" Execute the given command. This is basically a backdoor for --remote-expr. -function! pathogen#execute(...) abort " {{{1 - for command in a:000 - execute command - endfor - return '' -endfunction " }}}1 - -" Like findfile(), but hardcoded to use the runtimepath. -function! pathogen#runtime_findfile(file,count) abort "{{{1 - let rtp = pathogen#join(1,pathogen#split(&rtp)) - let file = findfile(a:file,rtp,a:count) - if file ==# '' - return '' - else - return fnamemodify(file,':p') - endif -endfunction " }}}1 - -" Backport of fnameescape(). -function! pathogen#fnameescape(string) abort " {{{1 - if exists('*fnameescape') - return fnameescape(a:string) - elseif a:string ==# '-' - return '\-' - else - return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','') - endif -endfunction " }}}1 - -if exists(':Vedit') - finish -endif - -let s:vopen_warning = 0 - -function! s:find(count,cmd,file,lcd) " {{{1 - let rtp = pathogen#join(1,pathogen#split(&runtimepath)) - let file = pathogen#runtime_findfile(a:file,a:count) - if file ==# '' - return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" - endif - if !s:vopen_warning - let s:vopen_warning = 1 - let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' - else - let warning = '' - endif - if a:lcd - let path = file[0:-strlen(a:file)-2] - execute 'lcd `=path`' - return a:cmd.' '.pathogen#fnameescape(a:file) . warning - else - return a:cmd.' '.pathogen#fnameescape(file) . warning - endif -endfunction " }}}1 - -function! s:Findcomplete(A,L,P) " {{{1 - let sep = pathogen#separator() - let cheats = { - \'a': 'autoload', - \'d': 'doc', - \'f': 'ftplugin', - \'i': 'indent', - \'p': 'plugin', - \'s': 'syntax'} - if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) - let request = cheats[a:A[0]].a:A[1:-1] - else - let request = a:A - endif - let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' - let found = {} - for path in pathogen#split(&runtimepath) - let path = expand(path, ':p') - let matches = split(glob(path.sep.pattern),"\n") - call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') - call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') - for match in matches - let found[match] = 1 - endfor - endfor - return sort(keys(found)) -endfunction " }}}1 - -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) - -" vim:set et sw=2: From 5ad1f1ba315ed1389a23ea3516584f845944bbdb Mon Sep 17 00:00:00 2001 From: Dan Finnie and Grant Hutchins Date: Mon, 9 Sep 2013 11:06:16 -0400 Subject: [PATCH 4/7] Adjust bundle comments to prevent warnings * Also update comment to refer to Vundle --- vimrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vimrc b/vimrc index 53a90a4c..0f720293 100644 --- a/vimrc +++ b/vimrc @@ -10,7 +10,7 @@ " merge between branches and repos. " " Please do not add configuration to this file, unless it *really* needs to -" come first or last, like Pathogen and sourcing the machine-local config. +" come first or last, like Vundle and sourcing the machine-local config. " Instead, add it to one of the files in .vim/init, or create a new one. set nocompatible " be iMproved @@ -54,7 +54,8 @@ Bundle 'tpope/vim-unimpaired' Bundle 'sjl/gundo.vim' Bundle 'godlygeek/tabular' Bundle 'scrooloose/syntastic' -Bundle 'Lokaltog/vim-powerline' " Will be depricated soon +" Will be depricated soon +Bundle 'Lokaltog/vim-powerline' Bundle 'ervandew/supertab' Bundle 'mgamba/j-split' Bundle 'matt-royal/diffthese' @@ -106,12 +107,11 @@ Bundle 'chrisbra/csv.vim' " Development Tool Integration " Bundle 'tpope/vim-fugitive' -Bundle 'airblade/vim-gitgutter' " This plugin is slow +" This plugin is slow +Bundle 'airblade/vim-gitgutter' Bundle 'pivotal/tmux-config' Bundle 'tpope/vim-dispatch' - - syntax on filetype plugin indent on From 83a649a2bcdb2e27a21094b36df35f3d1cfb47a9 Mon Sep 17 00:00:00 2001 From: Dan Finnie and Grant Hutchins Date: Mon, 9 Sep 2013 11:16:31 -0400 Subject: [PATCH 5/7] Update README to reflect switchover to vundle --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2af1c867..54c98a38 100644 --- a/README.md +++ b/README.md @@ -5,24 +5,32 @@ cd ~/.vim git submodule update --init ln -s ~/.vim/vimrc ~/.vimrc + vim +BundleInstall +qall # tmux support (optional) -If you will be using VIM with tmux for remote pairing or window management, + +If you will be using VIM with tmux for remote pairing or window management, see the README at [https://github.com/pivotal/tmux-config](https://github.com/pivotal/tmux-config) -# Compile command-t matcher for CtrlP +# Custom "command-t" matcher for CtrlP + +We use a custom matcher for CtrlP that makes it act similarly to CommandT. Run the following to install it. cd ~/.vim/bundle/matcher - make && sudo make install + make && make install # or sudo make install if necessary + +If you find yourself needing sudo, you might want to change the ownership of your /usr/local directory to the current user (for single-user machines only): + + sudo chown -R $USER:admin /usr/local # Updating -As long as your checkout is kept clean, you can easily update, rebase your local changes and update submodules with: + +First, fetch the latest vim-config via Git. You can also rebase or merge your own project-specific customizations. + +Then make sure the right version of Vundle is installed: cd ~/.vim && git pull --rebase && git submodule sync && git submodule update; cd - - -## Bumping plugin versions to latest -Git submodule update will give you the checked in versions for all the plugins, you can bump up the versions with: - git submodule foreach git co master && git pull - -You can also commit the bumped versions and submit a pull request if you'd like. +To install/upgrade the necessary bundles: + + vim +BundleInstall +qall # or run :BundleInstall within Vim From 1bd46268e087b294b314ced645712f768f1d2827 Mon Sep 17 00:00:00 2001 From: Dan Finnie and Grant Hutchins Date: Mon, 9 Sep 2013 11:28:11 -0400 Subject: [PATCH 6/7] Don't ignore bundle/vundle as a submodule --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f05a7ada..0ed22855 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ doc/tags .vimlog bundle/* +!bundle/vundle From 258b6a49fd6127186252115db7bf55f0bd6d2768 Mon Sep 17 00:00:00 2001 From: Dan Finnie and Grant Hutchins Date: Mon, 9 Sep 2013 11:28:39 -0400 Subject: [PATCH 7/7] Lock vundle submodule to master branch --- .gitmodules | 1 + bundle/vundle | 1 + 2 files changed, 2 insertions(+) create mode 160000 bundle/vundle diff --git a/.gitmodules b/.gitmodules index fb40c667..58cf62c9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,4 @@ path = bundle/vundle url = https://github.com/gmarik/vundle.git ignore = dirty + branch = master diff --git a/bundle/vundle b/bundle/vundle new file mode 160000 index 00000000..c3ec8796 --- /dev/null +++ b/bundle/vundle @@ -0,0 +1 @@ +Subproject commit c3ec8796944a372c6d44496ad6113e7d2e74331e