utils 0.0.57 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
 - data/VERSION +1 -1
 - data/bin/on_change +31 -0
 - data/bin/probe +7 -3
 - data/lib/utils/config/vim/autoload/ctrlp/bookmarkdir.vim +139 -0
 - data/lib/utils/config/vim/autoload/ctrlp/buffertag.vim +238 -0
 - data/lib/utils/config/vim/autoload/ctrlp/changes.vim +96 -0
 - data/lib/utils/config/vim/autoload/ctrlp/dir.vim +90 -0
 - data/lib/utils/config/vim/autoload/ctrlp/line.vim +63 -0
 - data/lib/utils/config/vim/autoload/ctrlp/mixed.vim +83 -0
 - data/lib/utils/config/vim/autoload/ctrlp/mrufiles.vim +119 -0
 - data/lib/utils/config/vim/autoload/ctrlp/quickfix.vim +62 -0
 - data/lib/utils/config/vim/autoload/ctrlp/rtscript.vim +49 -0
 - data/lib/utils/config/vim/autoload/ctrlp/tag.vim +112 -0
 - data/lib/utils/config/vim/autoload/ctrlp/undo.vim +154 -0
 - data/lib/utils/config/vim/autoload/ctrlp/utils.vim +72 -0
 - data/lib/utils/config/vim/autoload/ctrlp.vim +1772 -0
 - data/lib/utils/config/vim/autoload/rails.vim +89 -92
 - data/lib/utils/config/vim/doc/Decho.txt +372 -0
 - data/lib/utils/config/vim/doc/ctrlp.txt +1113 -0
 - data/lib/utils/config/vim/doc/rails.txt +1022 -0
 - data/lib/utils/config/vim/plugin/Decho.vim +14 -14
 - data/lib/utils/config/vim/plugin/cecutil.vim +96 -70
 - data/lib/utils/config/vim/plugin/ctrlp.vim +61 -0
 - data/lib/utils/config/vim/plugin/rails.vim +2 -5
 - data/lib/utils/config/vim/syntax/ruby.vim +1 -1
 - data/lib/utils/config/vimrc +14 -15
 - data/lib/utils/version.rb +1 -1
 - data/utils.gemspec +7 -7
 - metadata +24 -5
 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -15,7 +15,7 @@ GemHadar do 
     | 
|
| 
       15 
15 
     | 
    
         
             
              ignore      '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', '.AppleDouble', 'tags'
         
     | 
| 
       16 
16 
     | 
    
         
             
              readme      'README.rdoc'
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
              dependency  'tins',           '~>0. 
     | 
| 
      
 18 
     | 
    
         
            +
              dependency  'tins',           '~>0.6'
         
     | 
| 
       19 
19 
     | 
    
         
             
              dependency  'term-ansicolor', '~>1.0'
         
     | 
| 
       20 
20 
     | 
    
         
             
              dependency  'dslkit',         '~>0.2.10'
         
     | 
| 
       21 
21 
     | 
    
         
             
              dependency  'pry-editline'
         
     | 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.0. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.0.58
         
     | 
    
        data/bin/on_change
    ADDED
    
    | 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/usr/bin/env ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
            # encoding: UTF-8
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            def execute(*args)
         
     | 
| 
      
 5 
     | 
    
         
            +
              cmd = args.map(&:inspect) * ' '
         
     | 
| 
      
 6 
     | 
    
         
            +
              puts "Executing: #{cmd}"
         
     | 
| 
      
 7 
     | 
    
         
            +
              IO.popen(cmd, 'r') do |io|
         
     | 
| 
      
 8 
     | 
    
         
            +
                io.each { |l| puts l }
         
     | 
| 
      
 9 
     | 
    
         
            +
              end
         
     | 
| 
      
 10 
     | 
    
         
            +
            end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            argv = ARGV
         
     | 
| 
      
 13 
     | 
    
         
            +
            filename = argv.shift or fail "require a filename as first argument"
         
     | 
| 
      
 14 
     | 
    
         
            +
            warn "Observing #{filename.inspect} for changes now and execute #{argv.inspect}."
         
     | 
| 
      
 15 
     | 
    
         
            +
            argv.empty? and argv << 'true'
         
     | 
| 
      
 16 
     | 
    
         
            +
            old_mtime = nil
         
     | 
| 
      
 17 
     | 
    
         
            +
            loop do
         
     | 
| 
      
 18 
     | 
    
         
            +
              begin
         
     | 
| 
      
 19 
     | 
    
         
            +
                mtime = File.mtime(filename)
         
     | 
| 
      
 20 
     | 
    
         
            +
                if old_mtime.nil? || mtime > old_mtime
         
     | 
| 
      
 21 
     | 
    
         
            +
                  execute(*argv)
         
     | 
| 
      
 22 
     | 
    
         
            +
                else
         
     | 
| 
      
 23 
     | 
    
         
            +
                  sleep 0.1
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
              rescue Interrupt
         
     | 
| 
      
 26 
     | 
    
         
            +
                exit 1
         
     | 
| 
      
 27 
     | 
    
         
            +
              rescue Errno::ENOENT
         
     | 
| 
      
 28 
     | 
    
         
            +
              ensure
         
     | 
| 
      
 29 
     | 
    
         
            +
                old_mtime = mtime
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
    
        data/bin/probe
    CHANGED
    
    | 
         @@ -27,6 +27,11 @@ def cmd(*args) 
     | 
|
| 
       27 
27 
     | 
    
         
             
              system(*args)
         
     | 
| 
       28 
28 
     | 
    
         
             
            end
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
      
 30 
     | 
    
         
            +
            def find_cmd(*cmds)
         
     | 
| 
      
 31 
     | 
    
         
            +
              cmds.map { |c| `which #{c}`.full?(:chomp) }.compact.first or
         
     | 
| 
      
 32 
     | 
    
         
            +
                raise fail "no #{cmds * '|'} command found"
         
     | 
| 
      
 33 
     | 
    
         
            +
            end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
       30 
35 
     | 
    
         
             
            $config = Utils::Config::ConfigFile.new
         
     | 
| 
       31 
36 
     | 
    
         
             
            $config.configure_from_paths
         
     | 
| 
       32 
37 
     | 
    
         
             
            testrunner_args = []
         
     | 
| 
         @@ -44,8 +49,7 @@ puts "Running tests in #{args.inspect}" 
     | 
|
| 
       44 
49 
     | 
    
         | 
| 
       45 
50 
     | 
    
         
             
            case ($opt['t'] || $config.probe.test_framework).to_sym
         
     | 
| 
       46 
51 
     | 
    
         
             
            when :rspec
         
     | 
| 
       47 
     | 
    
         
            -
              rspec =  
     | 
| 
       48 
     | 
    
         
            -
                raise fail "no spec or rspec command found"
         
     | 
| 
      
 52 
     | 
    
         
            +
              rspec = find_cmd('rspec', 'spec')
         
     | 
| 
       49 
53 
     | 
    
         
             
              if linenumber = $opt['n']
         
     | 
| 
       50 
54 
     | 
    
         
             
                cmd 'ruby', '-I', $config.probe.include_dirs_argument, rspec, '-l',
         
     | 
| 
       51 
55 
     | 
    
         
             
                  linenumber, *(args + testrunner_args)
         
     | 
| 
         @@ -61,7 +65,7 @@ when :rspec 
     | 
|
| 
       61 
65 
     | 
    
         
             
                  *(args + testrunner_args)
         
     | 
| 
       62 
66 
     | 
    
         
             
              end
         
     | 
| 
       63 
67 
     | 
    
         
             
            when :'test-unit'
         
     | 
| 
       64 
     | 
    
         
            -
              testrb =  
     | 
| 
      
 68 
     | 
    
         
            +
              testrb = find_cmd('testrb')
         
     | 
| 
       65 
69 
     | 
    
         
             
              if testname = $opt['n']
         
     | 
| 
       66 
70 
     | 
    
         
             
                cmd 'ruby', '-I', $config.probe.include_dirs_argument, '-S', testrb,
         
     | 
| 
       67 
71 
     | 
    
         
             
                  '-n', testname, *(args + testrunner_args)
         
     | 
| 
         @@ -0,0 +1,139 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 2 
     | 
    
         
            +
            " File:          autoload/ctrlp/bookmarkdir.vim
         
     | 
| 
      
 3 
     | 
    
         
            +
            " Description:   Bookmarked directories extension
         
     | 
| 
      
 4 
     | 
    
         
            +
            " Author:        Kien Nguyen <github.com/kien>
         
     | 
| 
      
 5 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            " Init {{{1
         
     | 
| 
      
 8 
     | 
    
         
            +
            if exists('g:loaded_ctrlp_bookmarkdir') && g:loaded_ctrlp_bookmarkdir
         
     | 
| 
      
 9 
     | 
    
         
            +
            	fini
         
     | 
| 
      
 10 
     | 
    
         
            +
            en
         
     | 
| 
      
 11 
     | 
    
         
            +
            let g:loaded_ctrlp_bookmarkdir = 1
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            cal add(g:ctrlp_ext_vars, {
         
     | 
| 
      
 14 
     | 
    
         
            +
            	\ 'init': 'ctrlp#bookmarkdir#init()',
         
     | 
| 
      
 15 
     | 
    
         
            +
            	\ 'accept': 'ctrlp#bookmarkdir#accept',
         
     | 
| 
      
 16 
     | 
    
         
            +
            	\ 'lname': 'bookmarked dirs',
         
     | 
| 
      
 17 
     | 
    
         
            +
            	\ 'sname': 'bkd',
         
     | 
| 
      
 18 
     | 
    
         
            +
            	\ 'type': 'tabs',
         
     | 
| 
      
 19 
     | 
    
         
            +
            	\ 'opmul': 1,
         
     | 
| 
      
 20 
     | 
    
         
            +
            	\ 'nolim': 1,
         
     | 
| 
      
 21 
     | 
    
         
            +
            	\ 'wipe': 'ctrlp#bookmarkdir#remove',
         
     | 
| 
      
 22 
     | 
    
         
            +
            	\ })
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
         
     | 
| 
      
 25 
     | 
    
         
            +
            " Utilities {{{1
         
     | 
| 
      
 26 
     | 
    
         
            +
            fu! s:getinput(str, ...)
         
     | 
| 
      
 27 
     | 
    
         
            +
            	echoh Identifier
         
     | 
| 
      
 28 
     | 
    
         
            +
            	cal inputsave()
         
     | 
| 
      
 29 
     | 
    
         
            +
            	let input = call('input', a:0 ? [a:str] + a:000 : [a:str])
         
     | 
| 
      
 30 
     | 
    
         
            +
            	cal inputrestore()
         
     | 
| 
      
 31 
     | 
    
         
            +
            	echoh None
         
     | 
| 
      
 32 
     | 
    
         
            +
            	retu input
         
     | 
| 
      
 33 
     | 
    
         
            +
            endf
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            fu! s:cachefile()
         
     | 
| 
      
 36 
     | 
    
         
            +
            	if !exists('s:cadir') || !exists('s:cafile')
         
     | 
| 
      
 37 
     | 
    
         
            +
            		let s:cadir = ctrlp#utils#cachedir().ctrlp#utils#lash().'bkd'
         
     | 
| 
      
 38 
     | 
    
         
            +
            		let s:cafile = s:cadir.ctrlp#utils#lash().'cache.txt'
         
     | 
| 
      
 39 
     | 
    
         
            +
            	en
         
     | 
| 
      
 40 
     | 
    
         
            +
            	retu s:cafile
         
     | 
| 
      
 41 
     | 
    
         
            +
            endf
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            fu! s:writecache(lines)
         
     | 
| 
      
 44 
     | 
    
         
            +
            	cal ctrlp#utils#writecache(a:lines, s:cadir, s:cafile)
         
     | 
| 
      
 45 
     | 
    
         
            +
            endf
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            fu! s:getbookmarks()
         
     | 
| 
      
 48 
     | 
    
         
            +
            	retu ctrlp#utils#readfile(s:cachefile())
         
     | 
| 
      
 49 
     | 
    
         
            +
            endf
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
            fu! s:savebookmark(name, cwd)
         
     | 
| 
      
 52 
     | 
    
         
            +
            	let entries = filter(s:getbookmarks(), 's:parts(v:val)[1] != a:cwd')
         
     | 
| 
      
 53 
     | 
    
         
            +
            	cal s:writecache(insert(entries, a:name.'	'.a:cwd))
         
     | 
| 
      
 54 
     | 
    
         
            +
            endf
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            fu! s:setentries()
         
     | 
| 
      
 57 
     | 
    
         
            +
            	let time = getftime(s:cachefile())
         
     | 
| 
      
 58 
     | 
    
         
            +
            	if !( exists('s:bookmarks') && time == s:bookmarks[0] )
         
     | 
| 
      
 59 
     | 
    
         
            +
            		let s:bookmarks = [time, s:getbookmarks()]
         
     | 
| 
      
 60 
     | 
    
         
            +
            	en
         
     | 
| 
      
 61 
     | 
    
         
            +
            endf
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            fu! s:parts(str)
         
     | 
| 
      
 64 
     | 
    
         
            +
            	let mlist = matchlist(a:str, '\v([^\t]+)\t(.*)$')
         
     | 
| 
      
 65 
     | 
    
         
            +
            	retu mlist != [] ? mlist[1:2] : ['', '']
         
     | 
| 
      
 66 
     | 
    
         
            +
            endf
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
            fu! s:process(entries, type)
         
     | 
| 
      
 69 
     | 
    
         
            +
            	retu map(a:entries, 's:modify(v:val, a:type)')
         
     | 
| 
      
 70 
     | 
    
         
            +
            endf
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            fu! s:modify(entry, type)
         
     | 
| 
      
 73 
     | 
    
         
            +
            	let [name, dir] = s:parts(a:entry)
         
     | 
| 
      
 74 
     | 
    
         
            +
            	let dir = fnamemodify(dir, a:type)
         
     | 
| 
      
 75 
     | 
    
         
            +
            	retu name.'	'.( dir == '' ? '.' : dir )
         
     | 
| 
      
 76 
     | 
    
         
            +
            endf
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            fu! s:msg(name, cwd)
         
     | 
| 
      
 79 
     | 
    
         
            +
            	redr
         
     | 
| 
      
 80 
     | 
    
         
            +
            	echoh Identifier | echon 'Bookmarked ' | echoh Constant
         
     | 
| 
      
 81 
     | 
    
         
            +
            	echon a:name.' ' | echoh Directory | echon a:cwd
         
     | 
| 
      
 82 
     | 
    
         
            +
            	echoh None
         
     | 
| 
      
 83 
     | 
    
         
            +
            endf
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
            fu! s:syntax()
         
     | 
| 
      
 86 
     | 
    
         
            +
            	if !ctrlp#nosy()
         
     | 
| 
      
 87 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPBookmark', 'Identifier')
         
     | 
| 
      
 88 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPTabExtra', 'Comment')
         
     | 
| 
      
 89 
     | 
    
         
            +
            		sy match CtrlPBookmark '^> [^\t]\+' contains=CtrlPLinePre
         
     | 
| 
      
 90 
     | 
    
         
            +
            		sy match CtrlPTabExtra '\zs\t.*\ze$'
         
     | 
| 
      
 91 
     | 
    
         
            +
            	en
         
     | 
| 
      
 92 
     | 
    
         
            +
            endf
         
     | 
| 
      
 93 
     | 
    
         
            +
            " Public {{{1
         
     | 
| 
      
 94 
     | 
    
         
            +
            fu! ctrlp#bookmarkdir#init()
         
     | 
| 
      
 95 
     | 
    
         
            +
            	cal s:setentries()
         
     | 
| 
      
 96 
     | 
    
         
            +
            	cal s:syntax()
         
     | 
| 
      
 97 
     | 
    
         
            +
            	retu s:process(copy(s:bookmarks[1]), ':.')
         
     | 
| 
      
 98 
     | 
    
         
            +
            endf
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            fu! ctrlp#bookmarkdir#accept(mode, str)
         
     | 
| 
      
 101 
     | 
    
         
            +
            	let parts = s:parts(s:modify(a:str, ':p'))
         
     | 
| 
      
 102 
     | 
    
         
            +
            	cal call('s:savebookmark', parts)
         
     | 
| 
      
 103 
     | 
    
         
            +
            	if a:mode =~ 't\|v\|h'
         
     | 
| 
      
 104 
     | 
    
         
            +
            		cal ctrlp#exit()
         
     | 
| 
      
 105 
     | 
    
         
            +
            	en
         
     | 
| 
      
 106 
     | 
    
         
            +
            	cal ctrlp#setdir(parts[1], a:mode =~ 't\|h' ? 'chd!' : 'lc!')
         
     | 
| 
      
 107 
     | 
    
         
            +
            	if a:mode == 'e'
         
     | 
| 
      
 108 
     | 
    
         
            +
            		cal ctrlp#switchtype(0)
         
     | 
| 
      
 109 
     | 
    
         
            +
            		cal ctrlp#recordhist()
         
     | 
| 
      
 110 
     | 
    
         
            +
            		cal ctrlp#prtclear()
         
     | 
| 
      
 111 
     | 
    
         
            +
            	en
         
     | 
| 
      
 112 
     | 
    
         
            +
            endf
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            fu! ctrlp#bookmarkdir#add(dir)
         
     | 
| 
      
 115 
     | 
    
         
            +
            	let str = 'Directory to bookmark: '
         
     | 
| 
      
 116 
     | 
    
         
            +
            	let cwd = a:dir != '' ? a:dir : s:getinput(str, getcwd(), 'dir')
         
     | 
| 
      
 117 
     | 
    
         
            +
            	if cwd == '' | retu | en
         
     | 
| 
      
 118 
     | 
    
         
            +
            	let cwd = fnamemodify(cwd, ':p')
         
     | 
| 
      
 119 
     | 
    
         
            +
            	let name = s:getinput('Bookmark as: ', cwd)
         
     | 
| 
      
 120 
     | 
    
         
            +
            	if name == '' | retu | en
         
     | 
| 
      
 121 
     | 
    
         
            +
            	let name = tr(name, '	', ' ')
         
     | 
| 
      
 122 
     | 
    
         
            +
            	cal s:savebookmark(name, cwd)
         
     | 
| 
      
 123 
     | 
    
         
            +
            	cal s:msg(name, cwd)
         
     | 
| 
      
 124 
     | 
    
         
            +
            endf
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
            fu! ctrlp#bookmarkdir#remove(entries)
         
     | 
| 
      
 127 
     | 
    
         
            +
            	cal s:process(a:entries, ':p')
         
     | 
| 
      
 128 
     | 
    
         
            +
            	cal s:writecache(a:entries == [] ? [] :
         
     | 
| 
      
 129 
     | 
    
         
            +
            		\ filter(s:getbookmarks(), 'index(a:entries, v:val) < 0'))
         
     | 
| 
      
 130 
     | 
    
         
            +
            	cal s:setentries()
         
     | 
| 
      
 131 
     | 
    
         
            +
            	retu s:process(copy(s:bookmarks[1]), ':.')
         
     | 
| 
      
 132 
     | 
    
         
            +
            endf
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
            fu! ctrlp#bookmarkdir#id()
         
     | 
| 
      
 135 
     | 
    
         
            +
            	retu s:id
         
     | 
| 
      
 136 
     | 
    
         
            +
            endf
         
     | 
| 
      
 137 
     | 
    
         
            +
            "}}}
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
            " vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
         
     | 
| 
         @@ -0,0 +1,238 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 2 
     | 
    
         
            +
            " File:          autoload/ctrlp/buffertag.vim
         
     | 
| 
      
 3 
     | 
    
         
            +
            " Description:   Buffer Tag extension
         
     | 
| 
      
 4 
     | 
    
         
            +
            " Maintainer:    Kien Nguyen <github.com/kien>
         
     | 
| 
      
 5 
     | 
    
         
            +
            " Credits:       Much of the code was taken from tagbar.vim by Jan Larres, plus
         
     | 
| 
      
 6 
     | 
    
         
            +
            "                a few lines from taglist.vim by Yegappan Lakshmanan and from
         
     | 
| 
      
 7 
     | 
    
         
            +
            "                buffertag.vim by Takeshi Nishida.
         
     | 
| 
      
 8 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            " Init {{{1
         
     | 
| 
      
 11 
     | 
    
         
            +
            if exists('g:loaded_ctrlp_buftag') && g:loaded_ctrlp_buftag
         
     | 
| 
      
 12 
     | 
    
         
            +
            	fini
         
     | 
| 
      
 13 
     | 
    
         
            +
            en
         
     | 
| 
      
 14 
     | 
    
         
            +
            let g:loaded_ctrlp_buftag = 1
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            cal add(g:ctrlp_ext_vars, {
         
     | 
| 
      
 17 
     | 
    
         
            +
            	\ 'init': 'ctrlp#buffertag#init(s:crfile)',
         
     | 
| 
      
 18 
     | 
    
         
            +
            	\ 'accept': 'ctrlp#buffertag#accept',
         
     | 
| 
      
 19 
     | 
    
         
            +
            	\ 'lname': 'buffer tags',
         
     | 
| 
      
 20 
     | 
    
         
            +
            	\ 'sname': 'bft',
         
     | 
| 
      
 21 
     | 
    
         
            +
            	\ 'exit': 'ctrlp#buffertag#exit()',
         
     | 
| 
      
 22 
     | 
    
         
            +
            	\ 'type': 'tabs',
         
     | 
| 
      
 23 
     | 
    
         
            +
            	\ 'opts': 'ctrlp#buffertag#opts()',
         
     | 
| 
      
 24 
     | 
    
         
            +
            	\ })
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            let [s:pref, s:opts] = ['g:ctrlp_buftag_', {
         
     | 
| 
      
 29 
     | 
    
         
            +
            	\ 'systemenc': ['s:enc', &enc],
         
     | 
| 
      
 30 
     | 
    
         
            +
            	\ 'ctags_bin': ['s:bin', ''],
         
     | 
| 
      
 31 
     | 
    
         
            +
            	\ 'types': ['s:usr_types', {}],
         
     | 
| 
      
 32 
     | 
    
         
            +
            	\ }]
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            let s:bins = [
         
     | 
| 
      
 35 
     | 
    
         
            +
            	\ 'ctags-exuberant',
         
     | 
| 
      
 36 
     | 
    
         
            +
            	\ 'exuberant-ctags',
         
     | 
| 
      
 37 
     | 
    
         
            +
            	\ 'exctags',
         
     | 
| 
      
 38 
     | 
    
         
            +
            	\ '/usr/local/bin/ctags',
         
     | 
| 
      
 39 
     | 
    
         
            +
            	\ '/opt/local/bin/ctags',
         
     | 
| 
      
 40 
     | 
    
         
            +
            	\ 'ctags',
         
     | 
| 
      
 41 
     | 
    
         
            +
            	\ 'ctags.exe',
         
     | 
| 
      
 42 
     | 
    
         
            +
            	\ 'tags',
         
     | 
| 
      
 43 
     | 
    
         
            +
            	\ ]
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            let s:types = {
         
     | 
| 
      
 46 
     | 
    
         
            +
            	\ 'asm'    : '%sasm%sasm%sdlmt',
         
     | 
| 
      
 47 
     | 
    
         
            +
            	\ 'aspperl': '%sasp%sasp%sfsv',
         
     | 
| 
      
 48 
     | 
    
         
            +
            	\ 'aspvbs' : '%sasp%sasp%sfsv',
         
     | 
| 
      
 49 
     | 
    
         
            +
            	\ 'awk'    : '%sawk%sawk%sf',
         
     | 
| 
      
 50 
     | 
    
         
            +
            	\ 'beta'   : '%sbeta%sbeta%sfsv',
         
     | 
| 
      
 51 
     | 
    
         
            +
            	\ 'c'      : '%sc%sc%sdgsutvf',
         
     | 
| 
      
 52 
     | 
    
         
            +
            	\ 'cpp'    : '%sc++%sc++%snvdtcgsuf',
         
     | 
| 
      
 53 
     | 
    
         
            +
            	\ 'cs'     : '%sc#%sc#%sdtncEgsipm',
         
     | 
| 
      
 54 
     | 
    
         
            +
            	\ 'cobol'  : '%scobol%scobol%sdfgpPs',
         
     | 
| 
      
 55 
     | 
    
         
            +
            	\ 'eiffel' : '%seiffel%seiffel%scf',
         
     | 
| 
      
 56 
     | 
    
         
            +
            	\ 'erlang' : '%serlang%serlang%sdrmf',
         
     | 
| 
      
 57 
     | 
    
         
            +
            	\ 'expect' : '%stcl%stcl%scfp',
         
     | 
| 
      
 58 
     | 
    
         
            +
            	\ 'fortran': '%sfortran%sfortran%spbceiklmntvfs',
         
     | 
| 
      
 59 
     | 
    
         
            +
            	\ 'html'   : '%shtml%shtml%saf',
         
     | 
| 
      
 60 
     | 
    
         
            +
            	\ 'java'   : '%sjava%sjava%spcifm',
         
     | 
| 
      
 61 
     | 
    
         
            +
            	\ 'javascript': '%sjavascript%sjavascript%sf',
         
     | 
| 
      
 62 
     | 
    
         
            +
            	\ 'lisp'   : '%slisp%slisp%sf',
         
     | 
| 
      
 63 
     | 
    
         
            +
            	\ 'lua'    : '%slua%slua%sf',
         
     | 
| 
      
 64 
     | 
    
         
            +
            	\ 'make'   : '%smake%smake%sm',
         
     | 
| 
      
 65 
     | 
    
         
            +
            	\ 'pascal' : '%spascal%spascal%sfp',
         
     | 
| 
      
 66 
     | 
    
         
            +
            	\ 'perl'   : '%sperl%sperl%sclps',
         
     | 
| 
      
 67 
     | 
    
         
            +
            	\ 'php'    : '%sphp%sphp%scdvf',
         
     | 
| 
      
 68 
     | 
    
         
            +
            	\ 'python' : '%spython%spython%scmf',
         
     | 
| 
      
 69 
     | 
    
         
            +
            	\ 'rexx'   : '%srexx%srexx%ss',
         
     | 
| 
      
 70 
     | 
    
         
            +
            	\ 'ruby'   : '%sruby%sruby%scfFm',
         
     | 
| 
      
 71 
     | 
    
         
            +
            	\ 'scheme' : '%sscheme%sscheme%ssf',
         
     | 
| 
      
 72 
     | 
    
         
            +
            	\ 'sh'     : '%ssh%ssh%sf',
         
     | 
| 
      
 73 
     | 
    
         
            +
            	\ 'csh'    : '%ssh%ssh%sf',
         
     | 
| 
      
 74 
     | 
    
         
            +
            	\ 'zsh'    : '%ssh%ssh%sf',
         
     | 
| 
      
 75 
     | 
    
         
            +
            	\ 'slang'  : '%sslang%sslang%snf',
         
     | 
| 
      
 76 
     | 
    
         
            +
            	\ 'sml'    : '%ssml%ssml%secsrtvf',
         
     | 
| 
      
 77 
     | 
    
         
            +
            	\ 'sql'    : '%ssql%ssql%scFPrstTvfp',
         
     | 
| 
      
 78 
     | 
    
         
            +
            	\ 'tcl'    : '%stcl%stcl%scfmp',
         
     | 
| 
      
 79 
     | 
    
         
            +
            	\ 'vera'   : '%svera%svera%scdefgmpPtTvx',
         
     | 
| 
      
 80 
     | 
    
         
            +
            	\ 'verilog': '%sverilog%sverilog%smcPertwpvf',
         
     | 
| 
      
 81 
     | 
    
         
            +
            	\ 'vim'    : '%svim%svim%savf',
         
     | 
| 
      
 82 
     | 
    
         
            +
            	\ 'yacc'   : '%syacc%syacc%sl',
         
     | 
| 
      
 83 
     | 
    
         
            +
            	\ }
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
            cal map(s:types, 'printf(v:val, "--language-force=", " --", "-types=")')
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
            if executable('jsctags')
         
     | 
| 
      
 88 
     | 
    
         
            +
            	cal extend(s:types, { 'javascript': { 'args': '-f -', 'bin': 'jsctags' } })
         
     | 
| 
      
 89 
     | 
    
         
            +
            en
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
            fu! ctrlp#buffertag#opts()
         
     | 
| 
      
 92 
     | 
    
         
            +
            	for [ke, va] in items(s:opts)
         
     | 
| 
      
 93 
     | 
    
         
            +
            		let {va[0]} = exists(s:pref.ke) ? {s:pref.ke} : va[1]
         
     | 
| 
      
 94 
     | 
    
         
            +
            	endfo
         
     | 
| 
      
 95 
     | 
    
         
            +
            	" Ctags bin
         
     | 
| 
      
 96 
     | 
    
         
            +
            	if empty(s:bin)
         
     | 
| 
      
 97 
     | 
    
         
            +
            		for bin in s:bins | if executable(bin)
         
     | 
| 
      
 98 
     | 
    
         
            +
            			let s:bin = bin
         
     | 
| 
      
 99 
     | 
    
         
            +
            			brea
         
     | 
| 
      
 100 
     | 
    
         
            +
            		en | endfo
         
     | 
| 
      
 101 
     | 
    
         
            +
            	el
         
     | 
| 
      
 102 
     | 
    
         
            +
            		let s:bin = expand(s:bin, 1)
         
     | 
| 
      
 103 
     | 
    
         
            +
            	en
         
     | 
| 
      
 104 
     | 
    
         
            +
            	" Types
         
     | 
| 
      
 105 
     | 
    
         
            +
            	cal extend(s:types, s:usr_types)
         
     | 
| 
      
 106 
     | 
    
         
            +
            endf
         
     | 
| 
      
 107 
     | 
    
         
            +
            " Utilities {{{1
         
     | 
| 
      
 108 
     | 
    
         
            +
            fu! s:validfile(fname, ftype)
         
     | 
| 
      
 109 
     | 
    
         
            +
            	if ( !empty(a:fname) || !empty(a:ftype) ) && filereadable(a:fname)
         
     | 
| 
      
 110 
     | 
    
         
            +
            		\ && index(keys(s:types), a:ftype) >= 0 | retu 1 | en
         
     | 
| 
      
 111 
     | 
    
         
            +
            	retu 0
         
     | 
| 
      
 112 
     | 
    
         
            +
            endf
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            fu! s:exectags(cmd)
         
     | 
| 
      
 115 
     | 
    
         
            +
            	if exists('+ssl')
         
     | 
| 
      
 116 
     | 
    
         
            +
            		let [ssl, &ssl] = [&ssl, 0]
         
     | 
| 
      
 117 
     | 
    
         
            +
            	en
         
     | 
| 
      
 118 
     | 
    
         
            +
            	if &sh =~ 'cmd\.exe'
         
     | 
| 
      
 119 
     | 
    
         
            +
            		let [sxq, &sxq, shcf, &shcf] = [&sxq, '"', &shcf, '/s /c']
         
     | 
| 
      
 120 
     | 
    
         
            +
            	en
         
     | 
| 
      
 121 
     | 
    
         
            +
            	let output = system(a:cmd)
         
     | 
| 
      
 122 
     | 
    
         
            +
            	if &sh =~ 'cmd\.exe'
         
     | 
| 
      
 123 
     | 
    
         
            +
            		let [&sxq, &shcf] = [sxq, shcf]
         
     | 
| 
      
 124 
     | 
    
         
            +
            	en
         
     | 
| 
      
 125 
     | 
    
         
            +
            	if exists('+ssl')
         
     | 
| 
      
 126 
     | 
    
         
            +
            		let &ssl = ssl
         
     | 
| 
      
 127 
     | 
    
         
            +
            	en
         
     | 
| 
      
 128 
     | 
    
         
            +
            	retu output
         
     | 
| 
      
 129 
     | 
    
         
            +
            endf
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
            fu! s:exectagsonfile(fname, ftype)
         
     | 
| 
      
 132 
     | 
    
         
            +
            	let [ags, ft] = ['-f - --sort=no --excmd=pattern --fields=nKs ', a:ftype]
         
     | 
| 
      
 133 
     | 
    
         
            +
            	if type(s:types[ft]) == 1
         
     | 
| 
      
 134 
     | 
    
         
            +
            		let ags .= s:types[ft]
         
     | 
| 
      
 135 
     | 
    
         
            +
            		let bin = s:bin
         
     | 
| 
      
 136 
     | 
    
         
            +
            	elsei type(s:types[ft]) == 4
         
     | 
| 
      
 137 
     | 
    
         
            +
            		let ags = s:types[ft]['args']
         
     | 
| 
      
 138 
     | 
    
         
            +
            		let bin = expand(s:types[ft]['bin'], 1)
         
     | 
| 
      
 139 
     | 
    
         
            +
            	en
         
     | 
| 
      
 140 
     | 
    
         
            +
            	if empty(bin) | retu '' | en
         
     | 
| 
      
 141 
     | 
    
         
            +
            	let cmd = s:esctagscmd(bin, ags, a:fname)
         
     | 
| 
      
 142 
     | 
    
         
            +
            	if empty(cmd) | retu '' | en
         
     | 
| 
      
 143 
     | 
    
         
            +
            	let output = s:exectags(cmd)
         
     | 
| 
      
 144 
     | 
    
         
            +
            	if v:shell_error || output =~ 'Warning: cannot open' | retu '' | en
         
     | 
| 
      
 145 
     | 
    
         
            +
            	retu output
         
     | 
| 
      
 146 
     | 
    
         
            +
            endf
         
     | 
| 
      
 147 
     | 
    
         
            +
             
     | 
| 
      
 148 
     | 
    
         
            +
            fu! s:esctagscmd(bin, args, ...)
         
     | 
| 
      
 149 
     | 
    
         
            +
            	if exists('+ssl')
         
     | 
| 
      
 150 
     | 
    
         
            +
            		let [ssl, &ssl] = [&ssl, 0]
         
     | 
| 
      
 151 
     | 
    
         
            +
            	en
         
     | 
| 
      
 152 
     | 
    
         
            +
            	let fname = a:0 == 1 ? shellescape(a:1) : ''
         
     | 
| 
      
 153 
     | 
    
         
            +
            	let cmd = shellescape(a:bin).' '.a:args.' '.fname
         
     | 
| 
      
 154 
     | 
    
         
            +
            	if exists('+ssl')
         
     | 
| 
      
 155 
     | 
    
         
            +
            		let &ssl = ssl
         
     | 
| 
      
 156 
     | 
    
         
            +
            	en
         
     | 
| 
      
 157 
     | 
    
         
            +
            	if has('iconv')
         
     | 
| 
      
 158 
     | 
    
         
            +
            		let last = s:enc != &enc ? s:enc : !empty($LANG) ? $LANG : &enc
         
     | 
| 
      
 159 
     | 
    
         
            +
            		let cmd = iconv(cmd, &enc, last)
         
     | 
| 
      
 160 
     | 
    
         
            +
            	en
         
     | 
| 
      
 161 
     | 
    
         
            +
            	retu cmd
         
     | 
| 
      
 162 
     | 
    
         
            +
            endf
         
     | 
| 
      
 163 
     | 
    
         
            +
             
     | 
| 
      
 164 
     | 
    
         
            +
            fu! s:process(fname, ftype)
         
     | 
| 
      
 165 
     | 
    
         
            +
            	if !s:validfile(a:fname, a:ftype) | retu [] | endif
         
     | 
| 
      
 166 
     | 
    
         
            +
            	let ftime = getftime(a:fname)
         
     | 
| 
      
 167 
     | 
    
         
            +
            	if has_key(g:ctrlp_buftags, a:fname)
         
     | 
| 
      
 168 
     | 
    
         
            +
            		\ && g:ctrlp_buftags[a:fname]['time'] >= ftime
         
     | 
| 
      
 169 
     | 
    
         
            +
            		let lines = g:ctrlp_buftags[a:fname]['lines']
         
     | 
| 
      
 170 
     | 
    
         
            +
            	el
         
     | 
| 
      
 171 
     | 
    
         
            +
            		let data = s:exectagsonfile(a:fname, a:ftype)
         
     | 
| 
      
 172 
     | 
    
         
            +
            		let [raw, lines] = [split(data, '\n\+'), []]
         
     | 
| 
      
 173 
     | 
    
         
            +
            		for line in raw | if len(split(line, ';"')) == 2
         
     | 
| 
      
 174 
     | 
    
         
            +
            			let parsed_line = s:parseline(line)
         
     | 
| 
      
 175 
     | 
    
         
            +
            			if parsed_line != ''
         
     | 
| 
      
 176 
     | 
    
         
            +
            				cal add(lines, parsed_line)
         
     | 
| 
      
 177 
     | 
    
         
            +
            			en
         
     | 
| 
      
 178 
     | 
    
         
            +
            		en | endfo
         
     | 
| 
      
 179 
     | 
    
         
            +
            		let cache = { a:fname : { 'time': ftime, 'lines': lines } }
         
     | 
| 
      
 180 
     | 
    
         
            +
            		cal extend(g:ctrlp_buftags, cache)
         
     | 
| 
      
 181 
     | 
    
         
            +
            	en
         
     | 
| 
      
 182 
     | 
    
         
            +
            	retu lines
         
     | 
| 
      
 183 
     | 
    
         
            +
            endf
         
     | 
| 
      
 184 
     | 
    
         
            +
             
     | 
| 
      
 185 
     | 
    
         
            +
            fu! s:parseline(line)
         
     | 
| 
      
 186 
     | 
    
         
            +
            	let eval = '\v^([^\t]+)\t(.+)\t\/\^(.+)\$\/\;\"\t(.+)\tline(no)?\:(\d+)'
         
     | 
| 
      
 187 
     | 
    
         
            +
            	let vals = matchlist(a:line, eval)
         
     | 
| 
      
 188 
     | 
    
         
            +
            	if vals == [] | retu '' | en
         
     | 
| 
      
 189 
     | 
    
         
            +
            	let [bufnr, bufname] = [bufnr('^'.vals[2].'$'), fnamemodify(vals[2], ':p:t')]
         
     | 
| 
      
 190 
     | 
    
         
            +
            	retu vals[1].'	'.vals[4].'|'.bufnr.':'.bufname.'|'.vals[6].'| '.vals[3]
         
     | 
| 
      
 191 
     | 
    
         
            +
            endf
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
            fu! s:syntax()
         
     | 
| 
      
 194 
     | 
    
         
            +
            	if !ctrlp#nosy()
         
     | 
| 
      
 195 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPTagKind', 'Title')
         
     | 
| 
      
 196 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPBufName', 'Directory')
         
     | 
| 
      
 197 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPTabExtra', 'Comment')
         
     | 
| 
      
 198 
     | 
    
         
            +
            		sy match CtrlPTagKind '\zs[^\t|]\+\ze|\d\+:[^|]\+|\d\+|'
         
     | 
| 
      
 199 
     | 
    
         
            +
            		sy match CtrlPBufName '|\d\+:\zs[^|]\+\ze|\d\+|'
         
     | 
| 
      
 200 
     | 
    
         
            +
            		sy match CtrlPTabExtra '\zs\t.*\ze$' contains=CtrlPBufName,CtrlPTagKind
         
     | 
| 
      
 201 
     | 
    
         
            +
            	en
         
     | 
| 
      
 202 
     | 
    
         
            +
            endf
         
     | 
| 
      
 203 
     | 
    
         
            +
            " Public {{{1
         
     | 
| 
      
 204 
     | 
    
         
            +
            fu! ctrlp#buffertag#init(fname)
         
     | 
| 
      
 205 
     | 
    
         
            +
            	let bufs = exists('s:btmode') && s:btmode
         
     | 
| 
      
 206 
     | 
    
         
            +
            		\ ? filter(ctrlp#buffers(), 'filereadable(v:val)')
         
     | 
| 
      
 207 
     | 
    
         
            +
            		\ : [exists('s:bufname') ? s:bufname : a:fname]
         
     | 
| 
      
 208 
     | 
    
         
            +
            	let lines = []
         
     | 
| 
      
 209 
     | 
    
         
            +
            	for each in bufs
         
     | 
| 
      
 210 
     | 
    
         
            +
            		let bname = fnamemodify(each, ':p')
         
     | 
| 
      
 211 
     | 
    
         
            +
            		let tftype = get(split(getbufvar(bname, '&ft'), '\.'), 0, '')
         
     | 
| 
      
 212 
     | 
    
         
            +
            		cal extend(lines, s:process(bname, tftype))
         
     | 
| 
      
 213 
     | 
    
         
            +
            	endfo
         
     | 
| 
      
 214 
     | 
    
         
            +
            	cal s:syntax()
         
     | 
| 
      
 215 
     | 
    
         
            +
            	retu lines
         
     | 
| 
      
 216 
     | 
    
         
            +
            endf
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
      
 218 
     | 
    
         
            +
            fu! ctrlp#buffertag#accept(mode, str)
         
     | 
| 
      
 219 
     | 
    
         
            +
            	let vals = matchlist(a:str, '\v^[^\t]+\t+[^\t|]+\|(\d+)\:[^\t|]+\|(\d+)\|')
         
     | 
| 
      
 220 
     | 
    
         
            +
            	if vals == [] | retu | en
         
     | 
| 
      
 221 
     | 
    
         
            +
            	let [bufnm, linenr] = [fnamemodify(bufname(str2nr(vals[1])), ':p'), vals[2]]
         
     | 
| 
      
 222 
     | 
    
         
            +
            	cal ctrlp#acceptfile(a:mode, bufnm, linenr)
         
     | 
| 
      
 223 
     | 
    
         
            +
            endf
         
     | 
| 
      
 224 
     | 
    
         
            +
             
     | 
| 
      
 225 
     | 
    
         
            +
            fu! ctrlp#buffertag#cmd(mode, ...)
         
     | 
| 
      
 226 
     | 
    
         
            +
            	let s:btmode = a:mode
         
     | 
| 
      
 227 
     | 
    
         
            +
            	if a:0 && !empty(a:1)
         
     | 
| 
      
 228 
     | 
    
         
            +
            		let s:bufname = fnamemodify(a:1, ':p')
         
     | 
| 
      
 229 
     | 
    
         
            +
            	en
         
     | 
| 
      
 230 
     | 
    
         
            +
            	retu s:id
         
     | 
| 
      
 231 
     | 
    
         
            +
            endf
         
     | 
| 
      
 232 
     | 
    
         
            +
             
     | 
| 
      
 233 
     | 
    
         
            +
            fu! ctrlp#buffertag#exit()
         
     | 
| 
      
 234 
     | 
    
         
            +
            	unl! s:btmode s:bufname
         
     | 
| 
      
 235 
     | 
    
         
            +
            endf
         
     | 
| 
      
 236 
     | 
    
         
            +
            "}}}
         
     | 
| 
      
 237 
     | 
    
         
            +
             
     | 
| 
      
 238 
     | 
    
         
            +
            " vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
         
     | 
| 
         @@ -0,0 +1,96 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 2 
     | 
    
         
            +
            " File:          autoload/ctrlp/changes.vim
         
     | 
| 
      
 3 
     | 
    
         
            +
            " Description:   Change list extension
         
     | 
| 
      
 4 
     | 
    
         
            +
            " Author:        Kien Nguyen <github.com/kien>
         
     | 
| 
      
 5 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            " Init {{{1
         
     | 
| 
      
 8 
     | 
    
         
            +
            if exists('g:loaded_ctrlp_changes') && g:loaded_ctrlp_changes
         
     | 
| 
      
 9 
     | 
    
         
            +
            	fini
         
     | 
| 
      
 10 
     | 
    
         
            +
            en
         
     | 
| 
      
 11 
     | 
    
         
            +
            let g:loaded_ctrlp_changes = 1
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            cal add(g:ctrlp_ext_vars, {
         
     | 
| 
      
 14 
     | 
    
         
            +
            	\ 'init': 'ctrlp#changes#init(s:bufnr, s:crbufnr)',
         
     | 
| 
      
 15 
     | 
    
         
            +
            	\ 'accept': 'ctrlp#changes#accept',
         
     | 
| 
      
 16 
     | 
    
         
            +
            	\ 'lname': 'changes',
         
     | 
| 
      
 17 
     | 
    
         
            +
            	\ 'sname': 'chs',
         
     | 
| 
      
 18 
     | 
    
         
            +
            	\ 'exit': 'ctrlp#changes#exit()',
         
     | 
| 
      
 19 
     | 
    
         
            +
            	\ 'type': 'tabe',
         
     | 
| 
      
 20 
     | 
    
         
            +
            	\ 'sort': 0,
         
     | 
| 
      
 21 
     | 
    
         
            +
            	\ 'nolim': 1,
         
     | 
| 
      
 22 
     | 
    
         
            +
            	\ })
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
         
     | 
| 
      
 25 
     | 
    
         
            +
            " Utilities {{{1
         
     | 
| 
      
 26 
     | 
    
         
            +
            fu! s:changelist(bufnr)
         
     | 
| 
      
 27 
     | 
    
         
            +
            	sil! exe 'noa hid b' a:bufnr
         
     | 
| 
      
 28 
     | 
    
         
            +
            	redi => result
         
     | 
| 
      
 29 
     | 
    
         
            +
            	sil! changes
         
     | 
| 
      
 30 
     | 
    
         
            +
            	redi END
         
     | 
| 
      
 31 
     | 
    
         
            +
            	retu map(split(result, "\n")[1:], 'tr(v:val, "	", " ")')
         
     | 
| 
      
 32 
     | 
    
         
            +
            endf
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            fu! s:process(clines, ...)
         
     | 
| 
      
 35 
     | 
    
         
            +
            	let [clines, evas] = [[], []]
         
     | 
| 
      
 36 
     | 
    
         
            +
            	for each in a:clines
         
     | 
| 
      
 37 
     | 
    
         
            +
            		let parts = matchlist(each, '\v^.\s*\d+\s+(\d+)\s+(\d+)\s(.*)$')
         
     | 
| 
      
 38 
     | 
    
         
            +
            		if !empty(parts)
         
     | 
| 
      
 39 
     | 
    
         
            +
            			if parts[3] == '' | let parts[3] = ' ' | en
         
     | 
| 
      
 40 
     | 
    
         
            +
            			cal add(clines, parts[3].'	|'.a:1.':'.a:2.'|'.parts[1].':'.parts[2].'|')
         
     | 
| 
      
 41 
     | 
    
         
            +
            		en
         
     | 
| 
      
 42 
     | 
    
         
            +
            	endfo
         
     | 
| 
      
 43 
     | 
    
         
            +
            	retu reverse(filter(clines, 'count(clines, v:val) == 1'))
         
     | 
| 
      
 44 
     | 
    
         
            +
            endf
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            fu! s:syntax()
         
     | 
| 
      
 47 
     | 
    
         
            +
            	if !ctrlp#nosy()
         
     | 
| 
      
 48 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPBufName', 'Directory')
         
     | 
| 
      
 49 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPTabExtra', 'Comment')
         
     | 
| 
      
 50 
     | 
    
         
            +
            		sy match CtrlPBufName '\t|\d\+:\zs[^|]\+\ze|\d\+:\d\+|$'
         
     | 
| 
      
 51 
     | 
    
         
            +
            		sy match CtrlPTabExtra '\zs\t.*\ze$' contains=CtrlPBufName
         
     | 
| 
      
 52 
     | 
    
         
            +
            	en
         
     | 
| 
      
 53 
     | 
    
         
            +
            endf
         
     | 
| 
      
 54 
     | 
    
         
            +
            " Public {{{1
         
     | 
| 
      
 55 
     | 
    
         
            +
            fu! ctrlp#changes#init(original_bufnr, bufnr)
         
     | 
| 
      
 56 
     | 
    
         
            +
            	let bufnr = exists('s:bufnr') ? s:bufnr : a:bufnr
         
     | 
| 
      
 57 
     | 
    
         
            +
            	let bufs = exists('s:clmode') && s:clmode ? ctrlp#buffers('id') : [bufnr]
         
     | 
| 
      
 58 
     | 
    
         
            +
            	cal filter(bufs, 'v:val > 0')
         
     | 
| 
      
 59 
     | 
    
         
            +
            	let [swb, &swb] = [&swb, '']
         
     | 
| 
      
 60 
     | 
    
         
            +
            	let lines = []
         
     | 
| 
      
 61 
     | 
    
         
            +
            	for each in bufs
         
     | 
| 
      
 62 
     | 
    
         
            +
            		let fnamet = fnamemodify(bufname(each), ':t')
         
     | 
| 
      
 63 
     | 
    
         
            +
            		cal extend(lines, s:process(s:changelist(each), each, fnamet))
         
     | 
| 
      
 64 
     | 
    
         
            +
            	endfo
         
     | 
| 
      
 65 
     | 
    
         
            +
            	sil! exe 'noa hid b' a:original_bufnr
         
     | 
| 
      
 66 
     | 
    
         
            +
            	let &swb = swb
         
     | 
| 
      
 67 
     | 
    
         
            +
            	cal ctrlp#syntax()
         
     | 
| 
      
 68 
     | 
    
         
            +
            	cal s:syntax()
         
     | 
| 
      
 69 
     | 
    
         
            +
            	retu lines
         
     | 
| 
      
 70 
     | 
    
         
            +
            endf
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            fu! ctrlp#changes#accept(mode, str)
         
     | 
| 
      
 73 
     | 
    
         
            +
            	let info = matchlist(a:str, '\t|\(\d\+\):[^|]\+|\(\d\+\):\(\d\+\)|$')
         
     | 
| 
      
 74 
     | 
    
         
            +
            	if info == [] | retu | en
         
     | 
| 
      
 75 
     | 
    
         
            +
            	let bufnr = str2nr(get(info, 1))
         
     | 
| 
      
 76 
     | 
    
         
            +
            	if bufnr
         
     | 
| 
      
 77 
     | 
    
         
            +
            		cal ctrlp#acceptfile(a:mode, fnamemodify(bufname(bufnr), ':p'))
         
     | 
| 
      
 78 
     | 
    
         
            +
            		cal cursor(get(info, 2), get(info, 3))
         
     | 
| 
      
 79 
     | 
    
         
            +
            		sil! norm! zvzz
         
     | 
| 
      
 80 
     | 
    
         
            +
            	en
         
     | 
| 
      
 81 
     | 
    
         
            +
            endf
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
            fu! ctrlp#changes#cmd(mode, ...)
         
     | 
| 
      
 84 
     | 
    
         
            +
            	let s:clmode = a:mode
         
     | 
| 
      
 85 
     | 
    
         
            +
            	if a:0 && !empty(a:1)
         
     | 
| 
      
 86 
     | 
    
         
            +
            		let s:bufnr = bufnr('^'.fnamemodify(a:1, ':p').'$')
         
     | 
| 
      
 87 
     | 
    
         
            +
            	en
         
     | 
| 
      
 88 
     | 
    
         
            +
            	retu s:id
         
     | 
| 
      
 89 
     | 
    
         
            +
            endf
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
            fu! ctrlp#changes#exit()
         
     | 
| 
      
 92 
     | 
    
         
            +
            	unl! s:clmode s:bufnr
         
     | 
| 
      
 93 
     | 
    
         
            +
            endf
         
     | 
| 
      
 94 
     | 
    
         
            +
            "}}}
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
            " vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
         
     | 
| 
         @@ -0,0 +1,90 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 2 
     | 
    
         
            +
            " File:          autoload/ctrlp/dir.vim
         
     | 
| 
      
 3 
     | 
    
         
            +
            " Description:   Directory extension
         
     | 
| 
      
 4 
     | 
    
         
            +
            " Author:        Kien Nguyen <github.com/kien>
         
     | 
| 
      
 5 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            " Init {{{1
         
     | 
| 
      
 8 
     | 
    
         
            +
            if exists('g:loaded_ctrlp_dir') && g:loaded_ctrlp_dir
         
     | 
| 
      
 9 
     | 
    
         
            +
            	fini
         
     | 
| 
      
 10 
     | 
    
         
            +
            en
         
     | 
| 
      
 11 
     | 
    
         
            +
            let [g:loaded_ctrlp_dir, g:ctrlp_newdir] = [1, 0]
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            let s:ars = [
         
     | 
| 
      
 14 
     | 
    
         
            +
            	\ 's:maxdepth',
         
     | 
| 
      
 15 
     | 
    
         
            +
            	\ 's:maxfiles',
         
     | 
| 
      
 16 
     | 
    
         
            +
            	\ 's:compare_lim',
         
     | 
| 
      
 17 
     | 
    
         
            +
            	\ 's:glob',
         
     | 
| 
      
 18 
     | 
    
         
            +
            	\ ]
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            cal add(g:ctrlp_ext_vars, {
         
     | 
| 
      
 21 
     | 
    
         
            +
            	\ 'init': 'ctrlp#dir#init('.join(s:ars, ', ').')',
         
     | 
| 
      
 22 
     | 
    
         
            +
            	\ 'accept': 'ctrlp#dir#accept',
         
     | 
| 
      
 23 
     | 
    
         
            +
            	\ 'lname': 'dirs',
         
     | 
| 
      
 24 
     | 
    
         
            +
            	\ 'sname': 'dir',
         
     | 
| 
      
 25 
     | 
    
         
            +
            	\ 'type': 'path',
         
     | 
| 
      
 26 
     | 
    
         
            +
            	\ 'specinput': 1,
         
     | 
| 
      
 27 
     | 
    
         
            +
            	\ })
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
         
     | 
| 
      
 30 
     | 
    
         
            +
            " Utilities {{{1
         
     | 
| 
      
 31 
     | 
    
         
            +
            fu! s:globdirs(dirs, depth)
         
     | 
| 
      
 32 
     | 
    
         
            +
            	let entries = split(globpath(a:dirs, s:glob), "\n")
         
     | 
| 
      
 33 
     | 
    
         
            +
            	let [dirs, depth] = [ctrlp#dirnfile(entries)[0], a:depth + 1]
         
     | 
| 
      
 34 
     | 
    
         
            +
            	cal extend(g:ctrlp_alldirs, dirs)
         
     | 
| 
      
 35 
     | 
    
         
            +
            	let nr = len(g:ctrlp_alldirs)
         
     | 
| 
      
 36 
     | 
    
         
            +
            	if !empty(dirs) && !s:max(nr, s:maxfiles) && depth <= s:maxdepth
         
     | 
| 
      
 37 
     | 
    
         
            +
            		sil! cal ctrlp#progress(nr)
         
     | 
| 
      
 38 
     | 
    
         
            +
            		cal s:globdirs(join(dirs, ','), depth)
         
     | 
| 
      
 39 
     | 
    
         
            +
            	en
         
     | 
| 
      
 40 
     | 
    
         
            +
            endf
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            fu! s:max(len, max)
         
     | 
| 
      
 43 
     | 
    
         
            +
            	retu a:max && a:len > a:max ? 1 : 0
         
     | 
| 
      
 44 
     | 
    
         
            +
            endf
         
     | 
| 
      
 45 
     | 
    
         
            +
            " Public {{{1
         
     | 
| 
      
 46 
     | 
    
         
            +
            fu! ctrlp#dir#init(...)
         
     | 
| 
      
 47 
     | 
    
         
            +
            	let s:cwd = getcwd()
         
     | 
| 
      
 48 
     | 
    
         
            +
            	for each in range(len(s:ars))
         
     | 
| 
      
 49 
     | 
    
         
            +
            		let {s:ars[each]} = a:{each + 1}
         
     | 
| 
      
 50 
     | 
    
         
            +
            	endfo
         
     | 
| 
      
 51 
     | 
    
         
            +
            	let cadir = ctrlp#utils#cachedir().ctrlp#utils#lash().'dir'
         
     | 
| 
      
 52 
     | 
    
         
            +
            	let cafile = cadir.ctrlp#utils#lash().ctrlp#utils#cachefile('dir')
         
     | 
| 
      
 53 
     | 
    
         
            +
            	if g:ctrlp_newdir || !filereadable(cafile)
         
     | 
| 
      
 54 
     | 
    
         
            +
            		let [s:initcwd, g:ctrlp_alldirs] = [s:cwd, []]
         
     | 
| 
      
 55 
     | 
    
         
            +
            		cal s:globdirs(s:cwd, 0)
         
     | 
| 
      
 56 
     | 
    
         
            +
            		cal ctrlp#rmbasedir(g:ctrlp_alldirs)
         
     | 
| 
      
 57 
     | 
    
         
            +
            		if len(g:ctrlp_alldirs) <= s:compare_lim
         
     | 
| 
      
 58 
     | 
    
         
            +
            			cal sort(g:ctrlp_alldirs, 'ctrlp#complen')
         
     | 
| 
      
 59 
     | 
    
         
            +
            		en
         
     | 
| 
      
 60 
     | 
    
         
            +
            		cal ctrlp#utils#writecache(g:ctrlp_alldirs, cadir, cafile)
         
     | 
| 
      
 61 
     | 
    
         
            +
            		let g:ctrlp_newdir = 0
         
     | 
| 
      
 62 
     | 
    
         
            +
            	el
         
     | 
| 
      
 63 
     | 
    
         
            +
            		if !( exists('s:initcwd') && s:initcwd == s:cwd )
         
     | 
| 
      
 64 
     | 
    
         
            +
            			let s:initcwd = s:cwd
         
     | 
| 
      
 65 
     | 
    
         
            +
            			let g:ctrlp_alldirs = ctrlp#utils#readfile(cafile)
         
     | 
| 
      
 66 
     | 
    
         
            +
            		en
         
     | 
| 
      
 67 
     | 
    
         
            +
            	en
         
     | 
| 
      
 68 
     | 
    
         
            +
            	retu g:ctrlp_alldirs
         
     | 
| 
      
 69 
     | 
    
         
            +
            endf
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
            fu! ctrlp#dir#accept(mode, str)
         
     | 
| 
      
 72 
     | 
    
         
            +
            	let path = a:mode == 'h' ? getcwd() : s:cwd.ctrlp#utils#lash().a:str
         
     | 
| 
      
 73 
     | 
    
         
            +
            	if a:mode =~ 't\|v\|h'
         
     | 
| 
      
 74 
     | 
    
         
            +
            		cal ctrlp#exit()
         
     | 
| 
      
 75 
     | 
    
         
            +
            	en
         
     | 
| 
      
 76 
     | 
    
         
            +
            	cal ctrlp#setdir(path, a:mode =~ 't\|h' ? 'chd!' : 'lc!')
         
     | 
| 
      
 77 
     | 
    
         
            +
            	if a:mode == 'e'
         
     | 
| 
      
 78 
     | 
    
         
            +
            		sil! cal ctrlp#statusline()
         
     | 
| 
      
 79 
     | 
    
         
            +
            		cal ctrlp#setlines(s:id)
         
     | 
| 
      
 80 
     | 
    
         
            +
            		cal ctrlp#recordhist()
         
     | 
| 
      
 81 
     | 
    
         
            +
            		cal ctrlp#prtclear()
         
     | 
| 
      
 82 
     | 
    
         
            +
            	en
         
     | 
| 
      
 83 
     | 
    
         
            +
            endf
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
            fu! ctrlp#dir#id()
         
     | 
| 
      
 86 
     | 
    
         
            +
            	retu s:id
         
     | 
| 
      
 87 
     | 
    
         
            +
            endf
         
     | 
| 
      
 88 
     | 
    
         
            +
            "}}}
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
            " vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
         
     | 
| 
         @@ -0,0 +1,63 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 2 
     | 
    
         
            +
            " File:          autoload/ctrlp/line.vim
         
     | 
| 
      
 3 
     | 
    
         
            +
            " Description:   Line extension
         
     | 
| 
      
 4 
     | 
    
         
            +
            " Author:        Kien Nguyen <github.com/kien>
         
     | 
| 
      
 5 
     | 
    
         
            +
            " =============================================================================
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            " Init {{{1
         
     | 
| 
      
 8 
     | 
    
         
            +
            if exists('g:loaded_ctrlp_line') && g:loaded_ctrlp_line
         
     | 
| 
      
 9 
     | 
    
         
            +
            	fini
         
     | 
| 
      
 10 
     | 
    
         
            +
            en
         
     | 
| 
      
 11 
     | 
    
         
            +
            let g:loaded_ctrlp_line = 1
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            cal add(g:ctrlp_ext_vars, {
         
     | 
| 
      
 14 
     | 
    
         
            +
            	\ 'init': 'ctrlp#line#init()',
         
     | 
| 
      
 15 
     | 
    
         
            +
            	\ 'accept': 'ctrlp#line#accept',
         
     | 
| 
      
 16 
     | 
    
         
            +
            	\ 'lname': 'lines',
         
     | 
| 
      
 17 
     | 
    
         
            +
            	\ 'sname': 'lns',
         
     | 
| 
      
 18 
     | 
    
         
            +
            	\ 'type': 'tabe',
         
     | 
| 
      
 19 
     | 
    
         
            +
            	\ })
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
         
     | 
| 
      
 22 
     | 
    
         
            +
            " Utilities {{{1
         
     | 
| 
      
 23 
     | 
    
         
            +
            fu! s:syntax()
         
     | 
| 
      
 24 
     | 
    
         
            +
            	if !ctrlp#nosy()
         
     | 
| 
      
 25 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPBufName', 'Directory')
         
     | 
| 
      
 26 
     | 
    
         
            +
            		cal ctrlp#hicheck('CtrlPTabExtra', 'Comment')
         
     | 
| 
      
 27 
     | 
    
         
            +
            		sy match CtrlPBufName '\t|\zs[^|]\+\ze|\d\+:\d\+|$'
         
     | 
| 
      
 28 
     | 
    
         
            +
            		sy match CtrlPTabExtra '\zs\t.*\ze$' contains=CtrlPBufName
         
     | 
| 
      
 29 
     | 
    
         
            +
            	en
         
     | 
| 
      
 30 
     | 
    
         
            +
            endf
         
     | 
| 
      
 31 
     | 
    
         
            +
            " Public {{{1
         
     | 
| 
      
 32 
     | 
    
         
            +
            fu! ctrlp#line#init()
         
     | 
| 
      
 33 
     | 
    
         
            +
            	let [bufs, lines] = [ctrlp#buffers('id'), []]
         
     | 
| 
      
 34 
     | 
    
         
            +
            	for bufnr in bufs
         
     | 
| 
      
 35 
     | 
    
         
            +
            		let [lfb, bufn] = [getbufline(bufnr, 1, '$'), bufname(bufnr)]
         
     | 
| 
      
 36 
     | 
    
         
            +
            		let lfb = lfb == [] ? ctrlp#utils#readfile(fnamemodify(bufn, ':p')) : lfb
         
     | 
| 
      
 37 
     | 
    
         
            +
            		cal map(lfb, 'tr(v:val, ''	'', '' '')')
         
     | 
| 
      
 38 
     | 
    
         
            +
            		let [linenr, len_lfb, buft] = [1, len(lfb), fnamemodify(bufn, ':t')]
         
     | 
| 
      
 39 
     | 
    
         
            +
            		wh linenr <= len_lfb
         
     | 
| 
      
 40 
     | 
    
         
            +
            			let lfb[linenr - 1] .= '	|'.buft.'|'.bufnr.':'.linenr.'|'
         
     | 
| 
      
 41 
     | 
    
         
            +
            			let linenr += 1
         
     | 
| 
      
 42 
     | 
    
         
            +
            		endw
         
     | 
| 
      
 43 
     | 
    
         
            +
            		cal extend(lines, filter(lfb, 'v:val !~ ''^\s*\t|[^|]\+|\d\+:\d\+|$'''))
         
     | 
| 
      
 44 
     | 
    
         
            +
            	endfo
         
     | 
| 
      
 45 
     | 
    
         
            +
            	cal s:syntax()
         
     | 
| 
      
 46 
     | 
    
         
            +
            	retu lines
         
     | 
| 
      
 47 
     | 
    
         
            +
            endf
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            fu! ctrlp#line#accept(mode, str)
         
     | 
| 
      
 50 
     | 
    
         
            +
            	let info = matchlist(a:str, '\t|[^|]\+|\(\d\+\):\(\d\+\)|$')
         
     | 
| 
      
 51 
     | 
    
         
            +
            	if info == [] | retu | en
         
     | 
| 
      
 52 
     | 
    
         
            +
            	let [bufnr, linenr] = [str2nr(get(info, 1)), get(info, 2)]
         
     | 
| 
      
 53 
     | 
    
         
            +
            	if bufnr > 0
         
     | 
| 
      
 54 
     | 
    
         
            +
            		cal ctrlp#acceptfile(a:mode, fnamemodify(bufname(bufnr), ':p'), linenr)
         
     | 
| 
      
 55 
     | 
    
         
            +
            	en
         
     | 
| 
      
 56 
     | 
    
         
            +
            endf
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            fu! ctrlp#line#id()
         
     | 
| 
      
 59 
     | 
    
         
            +
            	retu s:id
         
     | 
| 
      
 60 
     | 
    
         
            +
            endf
         
     | 
| 
      
 61 
     | 
    
         
            +
            "}}}
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            " vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
         
     |