Skip to content

Commit

Permalink
Add /usr/share files
Browse files Browse the repository at this point in the history
  • Loading branch information
matthmr committed Sep 14, 2021
1 parent 91bf60f commit 04ec172
Show file tree
Hide file tree
Showing 253 changed files with 97,185 additions and 0 deletions.
367 changes: 367 additions & 0 deletions .vim/README.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions autoload/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The autoload directory is for standard Vim autoload scripts.

These are functions used by plugins and for general use. They will be loaded
automatically when the function is invoked. See ":help autoload".

gzip.vim for editing compressed files
netrw*.vim browsing (remote) directories and editing remote files
tar.vim browsing tar files
zip.vim browsing zip files
paste.vim common code for mswin.vim, menu.vim and macmap.vim
spellfile.vim downloading of a missing spell file

Omni completion files:
ccomplete.vim C
csscomplete.vim HTML / CSS
htmlcomplete.vim HTML
javascriptcomplete.vim Javascript
phpcomplete.vim PHP
pythoncomplete.vim Python
rubycomplete.vim Ruby
syntaxcomplete.vim from syntax highlighting
xmlcomplete.vim XML (uses files in the xml directory)
62 changes: 62 additions & 0 deletions autoload/RstFold.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
" Author: Antony Lee <[email protected]>
" Description: Helper functions for reStructuredText syntax folding
" Last Modified: 2018-12-29

function s:CacheRstFold()
if !g:rst_fold_enabled
return
endif

let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
function closure.Process(match) dict
let curline = getcurpos()[1]
if has_key(self.levels, curline - 1)
" For over+under-lined headers, the regex will match both at the
" overline and at the title itself; in that case, skip the second match.
return
endif
let lines = split(a:match, '\n')
let key = repeat(lines[-1][0], len(lines))
if !has_key(self.header_types, key)
let self.max_level += 1
let self.header_types[key] = self.max_level
endif
let self.levels[curline] = self.header_types[key]
endfunction
let save_cursor = getcurpos()
let save_mark = getpos("'[")
silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
call setpos('.', save_cursor)
call setpos("'[", save_mark)
let b:RstFoldCache = closure.levels
endfunction

function RstFold#GetRstFold()
if !g:rst_fold_enabled
return
endif

if !has_key(b:, 'RstFoldCache')
call s:CacheRstFold()
endif
if has_key(b:RstFoldCache, v:lnum)
return '>' . b:RstFoldCache[v:lnum]
else
return '='
endif
endfunction

function RstFold#GetRstFoldText()
if !g:rst_fold_enabled
return
endif

if !has_key(b:, 'RstFoldCache')
call s:CacheRstFold()
endif
let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1)
let thisline = getline(v:foldstart)
" For over+under-lined headers, skip the overline.
let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
return indent . text
endfunction
Loading

0 comments on commit 04ec172

Please sign in to comment.