mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 11:30:29 +01:00
Added branch pathogen
This commit is contained in:
1
.vimrc
1
.vimrc
@@ -1,4 +1,5 @@
|
||||
"Basic setup for all files {{{
|
||||
call pathogen#infect() "infect path for boundles
|
||||
set nocompatible "VIM over VI
|
||||
|
||||
filetype plugin indent on "turn plugins/indent on
|
||||
|
||||
@@ -4,11 +4,11 @@ ScriptID SourceID Filename
|
||||
2572 10433 ack.vim
|
||||
3619 16816 buffergator
|
||||
102 16171 DirDiff.vim
|
||||
1984 13961 :AutoInstall: FuzzyFinder
|
||||
1984 13961 FuzzyFinder
|
||||
311 7645 grep.vim
|
||||
3304 16172 gundo.vim
|
||||
3304 17406 gundo.vim
|
||||
2727 11120 jsbeautify.vim
|
||||
3252 13948 :AutoInstall: L9
|
||||
3252 13948 L9
|
||||
2289 8922 loremipsum
|
||||
2666 16840 Mark
|
||||
1218 14455 nerdcommenter
|
||||
@@ -16,17 +16,18 @@ ScriptID SourceID Filename
|
||||
2136 8206 repeat.vim
|
||||
152 3342 showmarks.vim
|
||||
2540 11006 snipMate.vim
|
||||
1697 12566 :AutoInstall: surround.vim
|
||||
1697 12566 surround.vim
|
||||
3465 17112 Tagbar
|
||||
90 17031 vcscommand.vim
|
||||
2226 15854 vimwiki.vim
|
||||
1334 6377 vst.vim
|
||||
2321 9055 zoom.vim
|
||||
52 14880 calendar.vim
|
||||
3736 17319 ctrlp.vim
|
||||
### colors
|
||||
2855 12456 github.vim
|
||||
1143 11833 inkpot.vim
|
||||
2555 15432 jellybeans.vim
|
||||
2555 17225 jellybeans.vim
|
||||
2536 16615 lucius.vim
|
||||
3299 16882 sorcerer.vim
|
||||
1165 3741 tolerable.vim
|
||||
@@ -47,7 +48,7 @@ ScriptID SourceID Filename
|
||||
# changes doesn't put it on vim.org scripts. it can be (still) found on
|
||||
# http://monkey.org/~caz/python.vim
|
||||
### syntax
|
||||
790 14268 python.vim
|
||||
790 17430 python.vim
|
||||
2651 10658 fitnesse.vim
|
||||
1858 9244 mako.vim
|
||||
2539 9949 css.vim
|
||||
|
||||
230
autoload/pathogen.vim
Normal file
230
autoload/pathogen.vim
Normal file
@@ -0,0 +1,230 @@
|
||||
" pathogen.vim - path option manipulation
|
||||
" Maintainer: Tim Pope <http://tpo.pe/>
|
||||
" Version: 2.0
|
||||
|
||||
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
|
||||
"
|
||||
" For management of individually installed plugins in ~/.vim/bundle (or
|
||||
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
|
||||
" prior to `fileype plugin indent on` 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
|
||||
|
||||
" Point of entry for basic default usage. Give a directory name to invoke
|
||||
" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path
|
||||
" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards,
|
||||
" pathogen#cycle_filetype() is invoked.
|
||||
function! pathogen#infect(...) abort " {{{1
|
||||
let source_path = a:0 ? a:1 : 'bundle'
|
||||
if source_path =~# '[\\/]'
|
||||
call pathogen#runtime_prepend_subdirectories(source_path)
|
||||
else
|
||||
call pathogen#runtime_append_all_bundles(source_path)
|
||||
endif
|
||||
call pathogen#cycle_filetype()
|
||||
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,'\\\@<!\%(\\\\\)*\zs,')
|
||||
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
|
||||
endfunction " }}}1
|
||||
|
||||
" Convert a list to a path.
|
||||
function! pathogen#join(...) abort " {{{1
|
||||
if type(a:1) == type(1) && a:1
|
||||
let i = 1
|
||||
let space = ' '
|
||||
else
|
||||
let i = 0
|
||||
let space = ''
|
||||
endif
|
||||
let path = ""
|
||||
while i < a:0
|
||||
if type(a:000[i]) == type([])
|
||||
let list = a:000[i]
|
||||
let j = 0
|
||||
while j < len(list)
|
||||
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
|
||||
let path .= ',' . escaped
|
||||
let j += 1
|
||||
endwhile
|
||||
else
|
||||
let path .= "," . a:000[i]
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
return substitute(path,'^,','','')
|
||||
endfunction " }}}1
|
||||
|
||||
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
|
||||
function! pathogen#legacyjoin(...) abort " {{{1
|
||||
return call('pathogen#join',[1] + a:000)
|
||||
endfunction " }}}1
|
||||
|
||||
" Remove duplicates from a list.
|
||||
function! pathogen#uniq(list) abort " {{{1
|
||||
let i = 0
|
||||
let seen = {}
|
||||
while i < len(a:list)
|
||||
if has_key(seen,a:list[i])
|
||||
call remove(a:list,i)
|
||||
else
|
||||
let seen[a:list[i]] = 1
|
||||
let i += 1
|
||||
endif
|
||||
endwhile
|
||||
return a:list
|
||||
endfunction " }}}1
|
||||
|
||||
" \ on Windows unless shellslash is set, / everywhere else.
|
||||
function! pathogen#separator() abort " {{{1
|
||||
return !exists("+shellslash") || &shellslash ? '/' : '\'
|
||||
endfunction " }}}1
|
||||
|
||||
" Convenience wrapper around glob() which returns a list.
|
||||
function! pathogen#glob(pattern) abort " {{{1
|
||||
let files = split(glob(a:pattern),"\n")
|
||||
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
|
||||
endfunction "}}}1
|
||||
|
||||
" Like pathogen#glob(), only limit the results to directories.
|
||||
function! pathogen#glob_directories(pattern) abort " {{{1
|
||||
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
|
||||
endfunction "}}}1
|
||||
|
||||
" Turn filetype detection off and back on again if it was already enabled.
|
||||
function! pathogen#cycle_filetype() " {{{1
|
||||
if exists('g:did_load_filetypes')
|
||||
filetype off
|
||||
filetype on
|
||||
endif
|
||||
endfunction " }}}1
|
||||
|
||||
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if
|
||||
" its 'basename()' is included in g:pathogen_disabled[]' or ends in a tilde.
|
||||
function! pathogen#is_disabled(path) " {{{1
|
||||
if a:path =~# '\~$'
|
||||
return 1
|
||||
elseif !exists("g:pathogen_disabled")
|
||||
return 0
|
||||
endif
|
||||
let sep = pathogen#separator()
|
||||
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1
|
||||
endfunction "}}}1
|
||||
|
||||
" Prepend all subdirectories of path to the rtp, and append all 'after'
|
||||
" directories in those subdirectories.
|
||||
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let before = filter(pathogen#glob_directories(a:path.sep."*"), '!pathogen#is_disabled(v:val)')
|
||||
let after = filter(pathogen#glob_directories(a:path.sep."*".sep."after"), '!pathogen#is_disabled(v:val[0:-7])')
|
||||
let rtp = pathogen#split(&rtp)
|
||||
let path = expand(a:path)
|
||||
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
|
||||
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
|
||||
return &rtp
|
||||
endfunction " }}}1
|
||||
|
||||
" For each directory in rtp, check for a subdirectory named dir. If it
|
||||
" exists, add all subdirectories of that subdirectory to the rtp, immediately
|
||||
" after the original directory. If no argument is given, 'bundle' is used.
|
||||
" Repeated calls with the same arguments are ignored.
|
||||
function! pathogen#runtime_append_all_bundles(...) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let name = a:0 ? a:1 : 'bundle'
|
||||
if "\n".s:done_bundles =~# "\\M\n".name."\n"
|
||||
return ""
|
||||
endif
|
||||
let s:done_bundles .= name . "\n"
|
||||
let list = []
|
||||
for dir in pathogen#split(&rtp)
|
||||
if dir =~# '\<after$'
|
||||
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
|
||||
else
|
||||
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)')
|
||||
endif
|
||||
endfor
|
||||
let &rtp = pathogen#join(pathogen#uniq(list))
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
let s:done_bundles = ''
|
||||
" }}}1
|
||||
|
||||
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
|
||||
function! pathogen#helptags() " {{{1
|
||||
let sep = pathogen#separator()
|
||||
for dir in pathogen#split(&rtp)
|
||||
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.'/doc') == 2 && !empty(glob(dir.'/doc/*')) && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
|
||||
helptags `=dir.'/doc'`
|
||||
endif
|
||||
endfor
|
||||
endfunction " }}}1
|
||||
|
||||
command! -bar Helptags :call pathogen#helptags()
|
||||
|
||||
" Like findfile(), but hardcoded to use the runtimepath.
|
||||
function! pathogen#rtpfindfile(file,count) "{{{1
|
||||
let rtp = pathogen#join(1,pathogen#split(&rtp))
|
||||
return fnamemodify(findfile(a:file,rtp,a:count),':p')
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:find(count,cmd,file,...) " {{{1
|
||||
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
|
||||
let file = pathogen#rtpfindfile(a:file,a:count)
|
||||
if file ==# ''
|
||||
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
|
||||
elseif a:0
|
||||
let path = file[0:-strlen(a:file)-2]
|
||||
execute a:1.' `=path`'
|
||||
return a:cmd.' '.fnameescape(a:file)
|
||||
else
|
||||
return a:cmd.' '.fnameescape(file)
|
||||
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 matches = split(glob(path.sep.pattern),"\n")
|
||||
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
|
||||
call map(matches,'v:val[strlen(path)+1:-1]')
|
||||
for match in matches
|
||||
let found[match] = 1
|
||||
endfor
|
||||
endfor
|
||||
return sort(keys(found))
|
||||
endfunction " }}}1
|
||||
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,'lcd')
|
||||
|
||||
" vim:set ft=vim ts=8 sw=2 sts=2:
|
||||
@@ -1,90 +0,0 @@
|
||||
" Author: Eric Van Dewoestine
|
||||
"
|
||||
" License: {{{
|
||||
" Copyright (c) 2005 - 2010, Eric Van Dewoestine
|
||||
" All rights reserved.
|
||||
"
|
||||
" Redistribution and use of this software in source and binary forms, with
|
||||
" or without modification, are permitted provided that the following
|
||||
" conditions are met:
|
||||
"
|
||||
" * Redistributions of source code must retain the above
|
||||
" copyright notice, this list of conditions and the
|
||||
" following disclaimer.
|
||||
"
|
||||
" * Redistributions in binary form must reproduce the above
|
||||
" copyright notice, this list of conditions and the
|
||||
" following disclaimer in the documentation and/or other
|
||||
" materials provided with the distribution.
|
||||
"
|
||||
" * Neither the name of Eric Van Dewoestine nor the names of its
|
||||
" contributors may be used to endorse or promote products derived from
|
||||
" this software without specific prior written permission of
|
||||
" Eric Van Dewoestine.
|
||||
"
|
||||
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
" }}}
|
||||
|
||||
" Format(types, tags) {{{
|
||||
function! taglisttoo#lang#java#Format(types, tags)
|
||||
let formatter = taglisttoo#util#Formatter(a:tags)
|
||||
call formatter.filename()
|
||||
|
||||
let package = filter(copy(a:tags), 'v:val.type == "p"')
|
||||
call formatter.format(a:types['p'], package, '')
|
||||
|
||||
let classes = filter(copy(a:tags), 'v:val.type == "c"')
|
||||
|
||||
" sort classes alphabetically except for the primary containing class.
|
||||
if len(classes) > 1 && g:Tlist_Sort_Type == 'name'
|
||||
let classes = [classes[0]] + sort(classes[1:], 'taglisttoo#util#SortTags')
|
||||
endif
|
||||
|
||||
for class in classes
|
||||
call formatter.blank()
|
||||
|
||||
let visibility = taglisttoo#util#GetVisibility(class)
|
||||
call formatter.heading(a:types['c'], class, '')
|
||||
|
||||
let fields = filter(copy(a:tags),
|
||||
\ 'v:val.type == "f" && v:val.parent =~ "class:.*\\<" . class.name . "$"')
|
||||
call formatter.format(a:types['f'], fields, "\t")
|
||||
|
||||
let methods = filter(copy(a:tags),
|
||||
\ 'v:val.type == "m" && v:val.parent =~ "class:.*\\<" . class.name . "$"')
|
||||
call formatter.format(a:types['m'], methods, "\t")
|
||||
endfor
|
||||
|
||||
let interfaces = filter(copy(a:tags), 'v:val.type == "i"')
|
||||
if g:Tlist_Sort_Type == 'name'
|
||||
call sort(interfaces, 'taglisttoo#util#SortTags')
|
||||
endif
|
||||
for interface in interfaces
|
||||
call formatter.blank()
|
||||
|
||||
let visibility = taglisttoo#util#GetVisibility(interface)
|
||||
call formatter.heading(a:types['i'], interface, '')
|
||||
|
||||
let fields = filter(copy(a:tags),
|
||||
\ 'v:val.type == "f" && v:val.parent =~ "interface:.*\\<" . interface.name . "$"')
|
||||
call formatter.format(a:types['f'], fields, "\t")
|
||||
|
||||
let methods = filter(copy(a:tags),
|
||||
\ 'v:val.type == "m" && v:val.parent =~ "interface:.*\\<" . interface.name . "$"')
|
||||
call formatter.format(a:types['m'], methods, "\t")
|
||||
endfor
|
||||
|
||||
return formatter
|
||||
endfunction " }}}
|
||||
|
||||
" vim:ft=vim:fdm=marker
|
||||
@@ -1,142 +0,0 @@
|
||||
" Author: Eric Van Dewoestine
|
||||
"
|
||||
" License: {{{
|
||||
" Copyright (c) 2005 - 2010, Eric Van Dewoestine
|
||||
" All rights reserved.
|
||||
"
|
||||
" Redistribution and use of this software in source and binary forms, with
|
||||
" or without modification, are permitted provided that the following
|
||||
" conditions are met:
|
||||
"
|
||||
" * Redistributions of source code must retain the above
|
||||
" copyright notice, this list of conditions and the
|
||||
" following disclaimer.
|
||||
"
|
||||
" * Redistributions in binary form must reproduce the above
|
||||
" copyright notice, this list of conditions and the
|
||||
" following disclaimer in the documentation and/or other
|
||||
" materials provided with the distribution.
|
||||
"
|
||||
" * Neither the name of Eric Van Dewoestine nor the names of its
|
||||
" contributors may be used to endorse or promote products derived from
|
||||
" this software without specific prior written permission of
|
||||
" Eric Van Dewoestine.
|
||||
"
|
||||
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
" }}}
|
||||
|
||||
" Format(types, tags) {{{
|
||||
function! taglisttoo#lang#php#Format(types, tags)
|
||||
let pos = getpos('.')
|
||||
|
||||
let formatter = taglisttoo#util#Formatter(a:tags)
|
||||
call formatter.filename()
|
||||
|
||||
let top_functions = filter(copy(a:tags), 'v:val.type == "f"')
|
||||
|
||||
let class_contents = []
|
||||
let classes = filter(copy(a:tags), 'v:val.type == "c"')
|
||||
if g:Tlist_Sort_Type == 'name'
|
||||
call sort(classes, 'taglisttoo#util#SortTags')
|
||||
endif
|
||||
for class in classes
|
||||
let object_start = class.line
|
||||
call cursor(object_start, 1)
|
||||
call search('{', 'W')
|
||||
let object_end = searchpair('{', '', '}', 'W')
|
||||
|
||||
let functions = []
|
||||
let indexes = []
|
||||
let index = 0
|
||||
for fct in top_functions
|
||||
if len(fct) > 3
|
||||
let fct_line = fct.line
|
||||
if fct_line > object_start && fct_line < object_end
|
||||
call add(functions, fct)
|
||||
call add(indexes, index)
|
||||
endif
|
||||
endif
|
||||
let index += 1
|
||||
endfor
|
||||
call reverse(indexes)
|
||||
for i in indexes
|
||||
call remove(top_functions, i)
|
||||
endfor
|
||||
|
||||
call add(class_contents, {'class': class, 'functions': functions})
|
||||
endfor
|
||||
|
||||
let interface_contents = []
|
||||
let interfaces = filter(copy(a:tags), 'v:val.type == "i"')
|
||||
if g:Tlist_Sort_Type == 'name'
|
||||
call sort(interfaces, 'taglisttoo#util#SortTags')
|
||||
endif
|
||||
for interface in interfaces
|
||||
let object_start = interface.line
|
||||
call cursor(object_start, 1)
|
||||
call search('{', 'W')
|
||||
let object_end = searchpair('{', '', '}', 'W')
|
||||
|
||||
let functions = []
|
||||
let indexes = []
|
||||
let index = 0
|
||||
for fct in top_functions
|
||||
if len(fct) > 3
|
||||
let fct_line = fct.line
|
||||
if fct_line > object_start && fct_line < object_end
|
||||
call add(functions, fct)
|
||||
call add(indexes, index)
|
||||
endif
|
||||
endif
|
||||
let index += 1
|
||||
endfor
|
||||
call reverse(indexes)
|
||||
for i in indexes
|
||||
call remove(top_functions, i)
|
||||
endfor
|
||||
|
||||
call add(interface_contents, {'interface': interface, 'functions': functions})
|
||||
endfor
|
||||
|
||||
if len(top_functions) > 0
|
||||
call formatter.blank()
|
||||
call formatter.format(a:types['f'], top_functions, '')
|
||||
endif
|
||||
|
||||
for class_content in class_contents
|
||||
call formatter.blank()
|
||||
call formatter.heading(a:types['c'], class_content.class, '')
|
||||
call formatter.format(a:types['f'], class_content.functions, "\t")
|
||||
endfor
|
||||
|
||||
for interface_content in interface_contents
|
||||
call formatter.blank()
|
||||
call formatter.heading(a:types['i'], interface_content.interface, '')
|
||||
call formatter.format(a:types['f'], interface_content.functions, "\t")
|
||||
endfor
|
||||
|
||||
call setpos('.', pos)
|
||||
|
||||
return formatter
|
||||
endfunction " }}}
|
||||
|
||||
" Parse(file, settings) {{{
|
||||
function! taglisttoo#lang#php#Parse(file, settings)
|
||||
return taglisttoo#util#Parse(a:file, [
|
||||
\ ['f', '\bfunction\s+([a-zA-Z0-9_]+)\s*\(', 1],
|
||||
\ ['c', '\bclass\s+([a-zA-Z0-9_]+)', 1],
|
||||
\ ['i', '\binterface\s+([a-zA-Z0-9_]+)', 1],
|
||||
\ ])
|
||||
endfunction " }}}
|
||||
|
||||
" vim:ft=vim:fdm=marker
|
||||
@@ -1,131 +0,0 @@
|
||||
" Author: Eric Van Dewoestine
|
||||
"
|
||||
" License: {{{
|
||||
" Copyright (c) 2005 - 2011, Eric Van Dewoestine
|
||||
" All rights reserved.
|
||||
"
|
||||
" Redistribution and use of this software in source and binary forms, with
|
||||
" or without modification, are permitted provided that the following
|
||||
" conditions are met:
|
||||
"
|
||||
" * Redistributions of source code must retain the above
|
||||
" copyright notice, this list of conditions and the
|
||||
" following disclaimer.
|
||||
"
|
||||
" * Redistributions in binary form must reproduce the above
|
||||
" copyright notice, this list of conditions and the
|
||||
" following disclaimer in the documentation and/or other
|
||||
" materials provided with the distribution.
|
||||
"
|
||||
" * Neither the name of Eric Van Dewoestine nor the names of its
|
||||
" contributors may be used to endorse or promote products derived from
|
||||
" this software without specific prior written permission of
|
||||
" Eric Van Dewoestine.
|
||||
"
|
||||
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
" }}}
|
||||
|
||||
function! taglisttoo#util#Formatter(tags) " {{{
|
||||
let formatter = {'lines': [], 'content': [], 'syntax': [], 'tags': a:tags}
|
||||
|
||||
function! formatter.filename() dict " {{{
|
||||
call add(self.content, expand('%:t'))
|
||||
call add(self.lines, -1)
|
||||
endfunction " }}}
|
||||
|
||||
function! formatter.format(type, values, indent) dict " {{{
|
||||
if len(a:values) > 0
|
||||
if g:Tlist_Sort_Type == 'name'
|
||||
call sort(a:values, 'taglisttoo#util#SortTags')
|
||||
endif
|
||||
|
||||
call self.heading(a:type, {}, a:indent)
|
||||
|
||||
for value in a:values
|
||||
let visibility = taglisttoo#util#GetVisibility(value)
|
||||
call add(self.content, "\t" . a:indent . visibility . value.name)
|
||||
call add(self.lines, index(self.tags, value))
|
||||
endfor
|
||||
endif
|
||||
endfunction " }}}
|
||||
|
||||
function! formatter.heading(type, tag, indent) dict " {{{
|
||||
if len(a:tag)
|
||||
call add(self.lines, index(self.tags, a:tag))
|
||||
call add(self.content, a:indent . a:type . ' ' . a:tag.name)
|
||||
call add(self.syntax,
|
||||
\ 'syn match TagListKeyword "^\s*' . a:type . '\%' . len(self.lines) . 'l"')
|
||||
else
|
||||
call add(self.lines, 'label')
|
||||
call add(self.content, a:indent . a:type)
|
||||
call add(self.syntax, 'syn match TagListKeyword "^.*\%' . len(self.lines) . 'l.*"')
|
||||
endif
|
||||
endfunction " }}}
|
||||
|
||||
function! formatter.blank() dict " {{{
|
||||
call add(self.content, '')
|
||||
call add(self.lines, -1)
|
||||
endfunction " }}}
|
||||
|
||||
return formatter
|
||||
endfunction " }}}
|
||||
|
||||
function! taglisttoo#util#GetVisibility(tag) " {{{
|
||||
let pattern = a:tag.pattern
|
||||
if pattern =~ '\<public\>'
|
||||
if pattern =~ '\<static\>'
|
||||
return '*'
|
||||
endif
|
||||
return '+'
|
||||
elseif pattern =~ '\<protected\>'
|
||||
return '#'
|
||||
elseif pattern =~ '\<private\>'
|
||||
return '-'
|
||||
endif
|
||||
return ''
|
||||
endfunction " }}}
|
||||
|
||||
function! taglisttoo#util#Parse(file, patterns) " {{{
|
||||
python << PYTHONEOF
|
||||
filename = vim.eval('a:file')
|
||||
patterns = vim.eval('a:patterns')
|
||||
result = taglisttoo.parse(filename, patterns)
|
||||
vim.command('let results = %s' % ('%r' % result).replace("\\'", "''"))
|
||||
PYTHONEOF
|
||||
|
||||
let tags = []
|
||||
if len(results)
|
||||
for result in results
|
||||
" filter false positives found in comments or strings
|
||||
let lnum = result.line
|
||||
let line = getline(lnum)
|
||||
let col = len(line) - len(substitute(line, '^\s*', '', '')) + 1
|
||||
if synIDattr(synID(lnum, col, 1), 'name') =~? '\(comment\|string\)' ||
|
||||
\ synIDattr(synIDtrans(synID(lnum, col, 1)), 'name') =~? '\(comment\|string\)'
|
||||
continue
|
||||
endif
|
||||
|
||||
call add(tags, result)
|
||||
endfor
|
||||
endif
|
||||
|
||||
return tags
|
||||
endfunction " }}}
|
||||
|
||||
function! taglisttoo#util#SortTags(tag1, tag2) " {{{
|
||||
let name1 = tolower(a:tag1.name)
|
||||
let name2 = tolower(a:tag2.name)
|
||||
return name1 == name2 ? 0 : name1 > name2 ? 1 : -1
|
||||
endfunction " }}}
|
||||
|
||||
" vim:ft=vim:fdm=marker
|
||||
@@ -11,13 +11,15 @@
|
||||
"
|
||||
" File: jellybeans.vim
|
||||
" Maintainer: NanoTech <http://nanotech.nanotechcorp.net/>
|
||||
" Version: 1.4
|
||||
" Last Change: April 11th, 2011
|
||||
" Contributors: Daniel Herbert <http://pocket-ninja.com>,
|
||||
" Version: 1.5
|
||||
" Last Change: January 15th, 2012
|
||||
" Contributors: Daniel Herbert <http://pocket-ninja.com/>,
|
||||
" Henry So, Jr. <henryso@panix.com>,
|
||||
" David Liang <bmdavll at gmail dot com>
|
||||
" David Liang <bmdavll at gmail dot com>,
|
||||
" Rich Healey (richoH),
|
||||
" Andrew Wong (w0ng)
|
||||
"
|
||||
" Copyright (c) 2009-2011 NanoTech
|
||||
" Copyright (c) 2009-2012 NanoTech
|
||||
"
|
||||
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
" of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -290,37 +292,42 @@ endfun
|
||||
call s:X("Normal","e8e8d3","151515","","White","")
|
||||
set background=dark
|
||||
|
||||
if version >= 700
|
||||
call s:X("CursorLine","","1c1c1c","","","Black")
|
||||
call s:X("CursorColumn","","1c1c1c","","","Black")
|
||||
" gryf: added colorcolumn highlight
|
||||
call s:X("ColorColumn","","1c1c1c","","","")
|
||||
call s:X("MatchParen","ffffff","80a090","bold","","DarkCyan")
|
||||
|
||||
call s:X("TabLine","000000","b0b8c0","italic","","Black")
|
||||
call s:X("TabLineFill","9098a0","","","","Black")
|
||||
call s:X("TabLineSel","000000","f0f0f0","italic,bold","Black","White")
|
||||
|
||||
" Auto-completion
|
||||
call s:X("Pmenu","ffffff","606060","","White","Black")
|
||||
call s:X("PmenuSel","101010","eeeeee","","Black","White")
|
||||
if !exists("g:jellybeans_use_lowcolor_black") || g:jellybeans_use_lowcolor_black
|
||||
let s:termBlack = "Black"
|
||||
else
|
||||
let s:termBlack = "Grey"
|
||||
endif
|
||||
|
||||
call s:X("Visual","","404040","","","Black")
|
||||
if version >= 700
|
||||
call s:X("CursorLine","","1c1c1c","","",s:termBlack)
|
||||
call s:X("CursorColumn","","1c1c1c","","",s:termBlack)
|
||||
call s:X("MatchParen","ffffff","80a090","bold","","DarkCyan")
|
||||
|
||||
call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack)
|
||||
call s:X("TabLineFill","9098a0","","","",s:termBlack)
|
||||
call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White")
|
||||
|
||||
" Auto-completion
|
||||
call s:X("Pmenu","ffffff","606060","","White",s:termBlack)
|
||||
call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White")
|
||||
endif
|
||||
|
||||
call s:X("Visual","","404040","","",s:termBlack)
|
||||
call s:X("Cursor","","b0d0f0","","","")
|
||||
|
||||
call s:X("LineNr","605958","151515","none","Black","")
|
||||
call s:X("LineNr","605958","151515","none",s:termBlack,"")
|
||||
call s:X("Comment","888888","","italic","Grey","")
|
||||
call s:X("Todo","808080","","bold","White","Black")
|
||||
call s:X("Todo","808080","","bold","White",s:termBlack)
|
||||
|
||||
call s:X("StatusLine","000000","dddddd","italic","Black","White")
|
||||
call s:X("StatusLine","000000","dddddd","italic","","White")
|
||||
call s:X("StatusLineNC","ffffff","403c41","italic","White","Black")
|
||||
call s:X("VertSplit","777777","403c41","italic","Black","Black")
|
||||
call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack)
|
||||
call s:X("WildMenu","f0a0c0","302028","","Magenta","")
|
||||
|
||||
call s:X("Folded","a0a8b0","384048","italic","Black","")
|
||||
call s:X("FoldColumn","a0a8b0","384048","","","Black")
|
||||
hi! link SignColumn FoldColumn
|
||||
call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"")
|
||||
call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack)
|
||||
call s:X("SignColumn","777777","333333","","",s:termBlack)
|
||||
call s:X("ColorColumn","","000000","","",s:termBlack)
|
||||
|
||||
call s:X("Title","70b950","","bold","Green","")
|
||||
|
||||
@@ -340,9 +347,9 @@ call s:X("PreProc","8fbfdc","","","LightBlue","")
|
||||
hi! link Operator Normal
|
||||
|
||||
call s:X("Type","ffb964","","","Yellow","")
|
||||
call s:X("NonText","606060","151515","","Black","")
|
||||
call s:X("NonText","606060","151515","",s:termBlack,"")
|
||||
|
||||
call s:X("SpecialKey","444444","1c1c1c","","Black","")
|
||||
call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"")
|
||||
|
||||
call s:X("Search","f0a0c0","302028","underline","Magenta","")
|
||||
|
||||
@@ -367,10 +374,10 @@ hi! link diffAdded String
|
||||
|
||||
" VimDiff
|
||||
|
||||
call s:X("DiffAdd","","032218","","Black","DarkGreen")
|
||||
call s:X("DiffChange","","100920","","Black","DarkMagenta")
|
||||
call s:X("DiffDelete","220000","220000","","DarkRed","DarkRed")
|
||||
call s:X("DiffText","","000940","","","DarkRed")
|
||||
call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen")
|
||||
call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed")
|
||||
call s:X("DiffChange","","2B5B77","","White","DarkBlue")
|
||||
call s:X("DiffText","8fbfdc","000000","reverse","Yellow","")
|
||||
|
||||
" PHP
|
||||
|
||||
@@ -408,6 +415,7 @@ call s:X("rubyRegexpSpecial","a40073","","","Magenta","")
|
||||
call s:X("rubyPredefinedIdentifier","de5577","","","Red","")
|
||||
|
||||
" JavaScript
|
||||
|
||||
hi! link javaScriptValue Constant
|
||||
hi! link javaScriptRegexpString rubyRegexp
|
||||
|
||||
@@ -415,21 +423,40 @@ hi! link javaScriptRegexpString rubyRegexp
|
||||
|
||||
hi! link coffeeRegExp javaScriptRegexpString
|
||||
|
||||
" Lua
|
||||
|
||||
hi! link luaOperator Conditional
|
||||
|
||||
" C
|
||||
|
||||
hi! link cOperator Constant
|
||||
|
||||
" Objective-C/Cocoa
|
||||
|
||||
hi! link objcClass Type
|
||||
hi! link cocoaClass objcClass
|
||||
hi! link objcSubclass objcClass
|
||||
hi! link objcSuperclass objcClass
|
||||
hi! link objcDirective rubyClass
|
||||
hi! link objcStatement Constant
|
||||
hi! link cocoaFunction Function
|
||||
hi! link objcMethodName Identifier
|
||||
hi! link objcMethodArg Normal
|
||||
hi! link objcMessageName Identifier
|
||||
|
||||
" Debugger.vim
|
||||
|
||||
call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue")
|
||||
call s:X("DbgBreakPt","","4F0037","","","DarkMagenta")
|
||||
|
||||
" vim-indent-guides
|
||||
|
||||
if !exists("g:indent_guides_auto_colors")
|
||||
let g:indent_guides_auto_colors = 0
|
||||
endif
|
||||
call s:X("IndentGuidesOdd","","202020","","","")
|
||||
call s:X("IndentGuidesEven","","1c1c1c","","","")
|
||||
|
||||
" Plugins, etc.
|
||||
|
||||
hi! link TagListFileName Directory
|
||||
@@ -437,14 +464,18 @@ call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green")
|
||||
|
||||
" Manual overrides for 256-color terminals. Dark colors auto-map badly.
|
||||
if !s:low_color
|
||||
hi StatusLineNC ctermbg=234
|
||||
hi StatusLineNC ctermbg=235
|
||||
hi Folded ctermbg=236
|
||||
hi FoldColumn ctermbg=236
|
||||
hi FoldColumn ctermbg=234
|
||||
hi SignColumn ctermbg=236
|
||||
hi DiffAdd ctermbg=22
|
||||
hi DiffDelete ctermbg=52
|
||||
hi DiffChange ctermbg=17
|
||||
hi DiffText ctermbg=19
|
||||
hi CursorColumn ctermbg=234
|
||||
hi CursorLine ctermbg=234
|
||||
hi SpecialKey ctermbg=234
|
||||
hi NonText ctermbg=233
|
||||
hi LineNr ctermbg=233
|
||||
hi DiffText ctermfg=81
|
||||
hi Normal ctermbg=233
|
||||
hi DbgBreakPt ctermbg=53
|
||||
endif
|
||||
|
||||
" delete functions {{{
|
||||
43
bundle/color_tolerable/colors/tolerable.vim
Normal file
43
bundle/color_tolerable/colors/tolerable.vim
Normal file
@@ -0,0 +1,43 @@
|
||||
" Vim color file
|
||||
" Maintainer: Ian Langworth
|
||||
" Last Change: 2004 Dec 24
|
||||
" Email: <langworth.com>
|
||||
|
||||
" Color settings inspired by BBEdit for Mac OS, plus I liked
|
||||
" the low-contrast comments from the 'oceandeep' colorscheme
|
||||
|
||||
set background=light
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name="tolerable"
|
||||
|
||||
hi Cursor guifg=white guibg=darkgreen
|
||||
|
||||
hi Normal gui=none guifg=black guibg=white
|
||||
hi NonText gui=none guifg=orange guibg=white
|
||||
|
||||
hi Statement gui=none guifg=blue
|
||||
hi Special gui=none guifg=red
|
||||
hi Constant gui=none guifg=darkred
|
||||
hi Comment gui=none guifg=#555555
|
||||
hi Preproc gui=none guifg=darkcyan
|
||||
hi Type gui=none guifg=darkmagenta
|
||||
hi Identifier gui=none guifg=darkgreen
|
||||
hi Title gui=none guifg=black
|
||||
|
||||
hi StatusLine gui=none guibg=#333333 guifg=white
|
||||
hi StatusLineNC gui=none guibg=#333333 guifg=white
|
||||
hi VertSplit gui=none guibg=#333333 guifg=white
|
||||
|
||||
hi Visual gui=none guibg=green guifg=black
|
||||
hi Search gui=none guibg=yellow
|
||||
hi Directory gui=none guifg=darkblue
|
||||
hi WarningMsg gui=none guifg=red
|
||||
hi Error gui=none guifg=white guibg=red
|
||||
hi Todo gui=none guifg=black guibg=yellow
|
||||
|
||||
hi MoreMsg gui=none
|
||||
hi ModeMsg gui=none
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Vim compiler file
|
||||
" Compiler: pdf creator out of LaTeX files using rubber
|
||||
" Compiler: Javascript Lint
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
220
bundle/ft_vimblogger/README.rst
Normal file
220
bundle/ft_vimblogger/README.rst
Normal file
@@ -0,0 +1,220 @@
|
||||
:Author: Roman Dobosz, gryf73 at gmail com
|
||||
|
||||
=============
|
||||
vimblogger_ft
|
||||
=============
|
||||
|
||||
vimblogger_ft is a simple reStructuredText_ to Blogger interface through VIm_.
|
||||
|
||||
As the name suggest it is a filetype plugin, which helps to create blog
|
||||
articles in rsST format and send them to blog site. It also provides commands
|
||||
for preview in browser and delete articles.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Module for communication was written in Python. So, VIm has to be
|
||||
compiled with ``+python``.
|
||||
|
||||
Other requirements:
|
||||
|
||||
- Python (tested with version 2.6, should work also in others)
|
||||
|
||||
- gdata_
|
||||
- docutils_
|
||||
- Pygments_ (optional)
|
||||
|
||||
- Blogger account
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
Download_, edit the vba with VIm and type::
|
||||
|
||||
:so %
|
||||
|
||||
Or, clone this repository and put files in your ``~/.vim`` directory.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
This plugin is targeting for people, who has blogger account, want to
|
||||
use VIm for creating blog articles and don't really likes to manually do
|
||||
this in html.
|
||||
|
||||
Before starting writing a post, at least ``g:blogger_name`` and
|
||||
``g:blogger_login`` has to be set up in ``.vimrc``. Next, an article has to
|
||||
be written using standard reST markup, ``:Title:`` added (not required,
|
||||
but it's nice to have some title for a blog entry). Now,
|
||||
``:PreviewBlogArticle`` can be used for saving generated HTML page into
|
||||
the file of the same name as reST file. Please note, that it'll silently
|
||||
overwrite existing file, because it is treated as a temporary file.
|
||||
|
||||
When article is done, ``:SendBlogArticle`` will send it to the server.
|
||||
|
||||
Output provided by ``:PreviewBlogArticle`` without any
|
||||
css stylesheet will look pretty raw, so it is generally good idea to
|
||||
grab stylesheets from blog itself, and tweak it a little, and add to
|
||||
list in ``g:blogger_stylesheets``. They will be automatically linked to
|
||||
generated preview file.
|
||||
|
||||
Unfortunately, this script has several limitations, like it is
|
||||
impossible to use multiple blogs or edit existing articles without reST
|
||||
source files. It has to be somehow converted to reStructuredText, id of
|
||||
an article added to ``:Id:`` docinfo item and then updated. Id of an
|
||||
article is available through blogger account - every action for each
|
||||
post listed on Posting->Edit Posts has URL with query string item
|
||||
postID, for example::
|
||||
|
||||
http://www.blogger.com/post-edit.g?blogID=9876&postID=12345
|
||||
|
||||
See plugin documentation for configuration.
|
||||
|
||||
Commands
|
||||
--------
|
||||
|
||||
#. ``:PreviewBlogArticle`` - Generate article in HTML format, save it to the
|
||||
file with te same name as a reST source with .html extension in the same
|
||||
directory, and optionally opens it in browser. No connection to the blogger
|
||||
is performed.
|
||||
#. ``:SendBlogArticle`` -
|
||||
Generate partial HTML document, which holds article, from current
|
||||
reST buffer and send it to the blog.
|
||||
|
||||
See reST document structure below for further description.
|
||||
#. ``:DeleteBlogArticle`` -
|
||||
Display list of articles, and lets user choose one (or none) of them
|
||||
to perform deletions.
|
||||
|
||||
reST document structure
|
||||
-----------------------
|
||||
|
||||
It is assumed, that following template will be used::
|
||||
|
||||
:Id:
|
||||
:Title: Title for the blog article
|
||||
:Date:
|
||||
:Modified:
|
||||
:Tags: some, tags
|
||||
|
||||
Penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla
|
||||
facilisis massa ut massa. Sed nisi purus, malesuada eu, porta vulputate,
|
||||
suscipit auctor, nunc. Vestibulum convallis, augue eu luctus malesuada,
|
||||
mi ante mattis odio, ac venenatis neque sem vitae nisi.
|
||||
|
||||
.. more
|
||||
|
||||
heading
|
||||
-------
|
||||
|
||||
**Congue** mi, quis posuere augue nulla a augue. Pellentesque sed est.
|
||||
Mauris cursus urna id lectus. Integer dignissim feugiat eros. Sed tempor
|
||||
volutpat dolor. Vestibulum vel lectus nec mauris semper adipiscing.
|
||||
|
||||
Aliquam tincidunt enim sit amet tellus. Sed mauris nulla, semper
|
||||
tincidunt, luctus a, sodales eget, leo. Sed ligula augue, cursus et.
|
||||
|
||||
reST document (optionally) starts with *docinfo* section (first several
|
||||
lines, that are starting from ":" character) separaded from other
|
||||
content with one empty line.
|
||||
|
||||
Docinfo items holds article attributes, and are updated automatically
|
||||
every each of upload to blogger, which is triggered by
|
||||
":SendBlogArticle" command.
|
||||
|
||||
- **:Id:** - Holds article id on blogger side. If not defined, new article
|
||||
will be created (even if there is already existing one with the very same
|
||||
content). If wrong Id is entered (or an Id of deleted article),
|
||||
exception will be raised, and no action on blogger side will be
|
||||
performed.
|
||||
- **:Title:** - Holds article title. Can be changed when ``:Id:`` is obtained.
|
||||
- **:Date:** - This is published date in RFC 3339
|
||||
http://www.ietf.org/rfc/rfc3339.txt format. If empty on first
|
||||
upload, it will be set to current date. Can be set/changed to
|
||||
desired date.
|
||||
- **:Modified:** - This is read-only item, which store modification date
|
||||
which happens on blogger side.
|
||||
- **:Tags:** - Comma separated list of tags (Labels). Can be empty.
|
||||
|
||||
All other items are ignored.
|
||||
|
||||
After docinfo block, article body should be placed using markup for
|
||||
reStructuredText.
|
||||
|
||||
Note, that ``.. more`` will became HTML comment ``<!-- more -->`` which will
|
||||
prevent from displaying entire post on the bloggers front page, but will
|
||||
not have any visible effect during preview in browser.
|
||||
|
||||
Pygments code highlighting
|
||||
--------------------------
|
||||
|
||||
Additionally, if Pygments is installed, there is ``sourcecode`` directive,
|
||||
simple syntax highlighter using Pygments module. Very simple usage for Python
|
||||
code could be as follows::
|
||||
|
||||
.. sourcecode:: python
|
||||
|
||||
import vim
|
||||
print vim.current.buffer.name
|
||||
|
||||
Note, that ``sourcecode`` directive requires argument with the name of the
|
||||
lexer to use. If wrong/non existent lexer is provided, it will fall back to
|
||||
*text* lexer. For more information about available lexers, please refer to
|
||||
Pygments documentation.
|
||||
|
||||
Directive ``sourcecode`` supports two options: ``:linenos:`` and
|
||||
``:cssclass:``.
|
||||
|
||||
``:linenos:`` takes zero or one argument - if no arguments is provided, line
|
||||
numbers will be visible starting form 1. Provided integer will be the number
|
||||
of the first line.
|
||||
|
||||
``:cssclass:`` can be use for changing default class name for block of code.
|
||||
Default class can be changed by appropriate option for plugin (see
|
||||
documentation), and defaults to "highlight".
|
||||
|
||||
It is possible to use VIm colorschemes like desert (which is distributed with
|
||||
VIm), Zenburn_, Lucius_, Wombat_, inkpot_ or any other with Pygments.
|
||||
Assuming, that colorscheme *desert* should be used, there are two steps to
|
||||
achive it.
|
||||
|
||||
First, python module containing Pygments *Style* class has to be generated.
|
||||
There is apropriate convertion tool in Pygments distribution -
|
||||
``scripts/vim2pygments.py``. Uage is simple as::
|
||||
|
||||
python Pygments/scripts/vim2pygments.py [path/to/vim/colors]/desert.vim > desert.py
|
||||
|
||||
Which will create new python module ``desert.py`` containing class
|
||||
``DessertStyle``.
|
||||
|
||||
To generate CSS stylesheet, it's enough to::
|
||||
|
||||
python rst2blogger/scripts/style2css.py desert.py -c VimDesert > desert.css
|
||||
|
||||
VimDesert is the name of the class, which passed as an argument to
|
||||
``:cssclass:`` option of directive ``sourceocode``. It will be used as a main
|
||||
CSS class for code top ``<div>`` element. So, above example will looks like
|
||||
this::
|
||||
|
||||
.. sourcecode:: python
|
||||
:cssclass: VimDesert
|
||||
|
||||
import vim
|
||||
print vim.current.buffer.name
|
||||
|
||||
Note: All headings for generated HTML by ``:SendBlogArticle`` will be
|
||||
shifted by 3, so the first heading will become <h3>, second <h4> and so
|
||||
on, to fit into blogger template (well, most of them). Remember, that
|
||||
HTML allow up to 6 level of headings, while reST doesn't have this
|
||||
limitation.
|
||||
|
||||
.. _VIm: http://www.vim.org
|
||||
.. _gdata: http://code.google.com/p/gdata-python-client
|
||||
.. _docutils: http://docutils.sourceforge.net
|
||||
.. _Pygments: http://pygments.org
|
||||
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
|
||||
.. _Download: http://www.vim.org/scripts/script.php?script_id=3367
|
||||
.. _Zenburn: http://www.vim.org/scripts/script.php?script_id=415
|
||||
.. _inkpot: http://www.vim.org/scripts/script.php?script_id=1143
|
||||
.. _Lucius: http://www.vim.org/scripts/script.php?script_id=2536
|
||||
.. _Wombat: http://www.vim.org/scripts/script.php?script_id=1778
|
||||
5
bundle/git_taglisttoo/.gitignore
vendored
Normal file
5
bundle/git_taglisttoo/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
*.pyc
|
||||
*.swp
|
||||
*.vba
|
||||
tags
|
||||
/build
|
||||
11
bundle/git_taglisttoo/Makefile
Normal file
11
bundle/git_taglisttoo/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
SHELL=/bin/bash
|
||||
|
||||
all: dist
|
||||
|
||||
dist:
|
||||
@rm taglisttoo.vba 2> /dev/null || true
|
||||
@vim -c 'r! git ls-files autoload doc plugin' \
|
||||
-c '$$,$$d _' -c '%MkVimball taglisttoo.vba .' -c 'q!'
|
||||
|
||||
clean:
|
||||
@rm -R build 2> /dev/null || true
|
||||
50
bundle/git_taglisttoo/README.rst
Normal file
50
bundle/git_taglisttoo/README.rst
Normal file
@@ -0,0 +1,50 @@
|
||||
.. Copyright (c) 2005 - 2010, Eric Van Dewoestine
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with
|
||||
or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of Eric Van Dewoestine nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission of
|
||||
Eric Van Dewoestine.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
TaglistToo is a vim plugin which provides an outline, or taglist, of a source
|
||||
file in a separate window allowing you to quickly get an overview of the file
|
||||
you are working on and to quickly jump to class definitions, methods,
|
||||
functions, etc.
|
||||
|
||||
TaglistToo is very similar to the very popular taglist.vim_ written by Yegappan
|
||||
Lakshmanan, but with a focus on being extensible and customizable. TaglistToo
|
||||
provides hooks allowing you to format the taglist content per file type and to
|
||||
also write code to parse file types not supported well or at all by ctags.
|
||||
|
||||
Please note that TaglistToo requires that vim be compiled with python support
|
||||
and that you have `exuberant ctags`_ installed.
|
||||
|
||||
Please see the vim help file for full documentation.
|
||||
|
||||
.. _exuberant ctags: http://ctags.sourceforge.net/
|
||||
.. _taglist.vim: http://www.vim.org/scripts/script.php?script_id=273
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright (c) 2005 - 2011, Eric Van Dewoestine
|
||||
Copyright (c) 2005 - 2012, Eric Van Dewoestine
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with
|
||||
@@ -40,6 +40,7 @@ import vim
|
||||
|
||||
def ctags(lang, types, filename):
|
||||
ctags = vim.eval('g:Tlist_Ctags_Cmd')
|
||||
debug = vim.eval('g:Tlist_Debug') != '0'
|
||||
|
||||
startupinfo = None
|
||||
if os.name == 'nt':
|
||||
@@ -52,22 +53,27 @@ def ctags(lang, types, filename):
|
||||
stdoutfile = tempfile.TemporaryFile()
|
||||
stderrfile = tempfile.TemporaryFile()
|
||||
try:
|
||||
args = [
|
||||
ctags,
|
||||
'-f', '-',
|
||||
'--format=2',
|
||||
'--excmd=pattern',
|
||||
'--extra=',
|
||||
'--fields=kns',
|
||||
'--fields=-afiKlmSzt',
|
||||
'--sort=no',
|
||||
'--language-force=%s' % lang,
|
||||
'--%s-types=%s' % (lang, types),
|
||||
filename,
|
||||
]
|
||||
if debug:
|
||||
print ' '.join(args)
|
||||
process = subprocess.Popen(
|
||||
[
|
||||
ctags,
|
||||
'-f', '-',
|
||||
'--format=2',
|
||||
'--excmd=pattern',
|
||||
'--fields=nks',
|
||||
'--sort=no',
|
||||
'--language-force=%s' % lang,
|
||||
'--%s-types=%s' % (lang, types),
|
||||
filename,
|
||||
],
|
||||
stdout=stdoutfile,
|
||||
stderr=stderrfile,
|
||||
stdin=subprocess.PIPE,
|
||||
startupinfo=startupinfo,
|
||||
args,
|
||||
stdout=stdoutfile,
|
||||
stderr=stderrfile,
|
||||
stdin=subprocess.PIPE,
|
||||
startupinfo=startupinfo,
|
||||
)
|
||||
|
||||
retcode = process.wait()
|
||||
@@ -84,6 +90,7 @@ def ctags(lang, types, filename):
|
||||
|
||||
def jsctags(filename):
|
||||
jsctags = vim.eval('g:Tlist_JSctags_Cmd')
|
||||
debug = vim.eval('g:Tlist_Debug') != '0'
|
||||
|
||||
startupinfo = None
|
||||
if os.name == 'nt':
|
||||
@@ -95,15 +102,14 @@ def jsctags(filename):
|
||||
|
||||
temp = tempfile.mkstemp()[1]
|
||||
try:
|
||||
args = [jsctags, '-o', temp, filename]
|
||||
if debug:
|
||||
print ' '.join(args)
|
||||
process = subprocess.Popen(
|
||||
[
|
||||
jsctags,
|
||||
'-o', temp,
|
||||
filename,
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
startupinfo=startupinfo,
|
||||
args,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
startupinfo=startupinfo,
|
||||
)
|
||||
|
||||
retcode = process.wait()
|
||||
@@ -113,7 +119,8 @@ def jsctags(filename):
|
||||
finally:
|
||||
os.unlink(temp)
|
||||
|
||||
def parse(filename, patterns):
|
||||
def parse(filename, settings, patterns):
|
||||
types = settings['tags']
|
||||
f = open(filename, 'r')
|
||||
contents = f.read()
|
||||
f.close()
|
||||
@@ -173,6 +180,7 @@ def parse(filename, patterns):
|
||||
|
||||
results.append({
|
||||
'type': ptype,
|
||||
'type_name': types.get(ptype, ptype),
|
||||
'name': name,
|
||||
'pattern': '^%s$' % pattern,
|
||||
'line': line,
|
||||
@@ -1,7 +1,7 @@
|
||||
" Author: Eric Van Dewoestine
|
||||
"
|
||||
" License: {{{
|
||||
" Copyright (c) 2005 - 2010, Eric Van Dewoestine
|
||||
" Copyright (c) 2005 - 2011, Eric Van Dewoestine
|
||||
" All rights reserved.
|
||||
"
|
||||
" Redistribution and use of this software in source and binary forms, with
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
" Parse(file, settings) {{{
|
||||
function! taglisttoo#lang#ant#Parse(file, settings)
|
||||
return taglisttoo#util#Parse(a:file, [
|
||||
return taglisttoo#util#Parse(a:file, a:settings, [
|
||||
\ ['p', "<project\\s+(?:[^>]*)name\\s*=\\s*['\"](.*?)['\"]", 1],
|
||||
\ ['i', "<import\\s+(?:[^>]*)file\\s*=\\s*['\"](.*?)['\"]", 1],
|
||||
\ ['t', "<target\\s+(?:[^>]*)name\\s*=\\s*['\"](.*?)['\"]", 1],
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user