1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:30:04 +08:00

chore(bundle): update helpful.vim

commits: Auto-updated tags 2024-06-10 00:15:29+00:00 998082d
This commit is contained in:
Eric Wong 2024-06-10 14:34:48 +08:00
parent 511480cabc
commit b525e520e5
5 changed files with 10920 additions and 551 deletions

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: update tags
run: make update
- name: get date
@ -21,7 +21,7 @@ jobs:
id: diff
run: echo "::set-output name=diff::$(git diff --name-only data/)"
- name: push
uses: actions-x/commit@v2
uses: actions-x/commit@v5
with:
name: Tag Update Bot
files: data/tags doc/helpful-version.txt

View File

@ -8,7 +8,7 @@ introduced or removed features.
## Usage
The command `:HelpfulVersion` takes a Vim pattern to search for helptags and
The command `:HelpfulVersion` takes a subject to search for helptags and
display version information.
Examples:
@ -16,12 +16,6 @@ Examples:
```vim
" Search for a function
:HelpfulVersion matchaddpos()
" Search for keys
:HelpfulVersion <.*>
" Case-insensitive search
:HelpfulVersion f11\c
```

View File

@ -274,14 +274,8 @@ endfunction
function! s:_lookup_sort(a, b) abort
if a:a[1] < a:b[1]
return -1
elseif a:a[1] > a:b[1]
return 1
endif
let al = strlen(a:a[0])
let bl = strlen(a:b[0])
let al = strlen(a:a)
let bl = strlen(a:b)
if al < bl
return -1
@ -289,26 +283,33 @@ function! s:_lookup_sort(a, b) abort
return 1
endif
if a:a < a:b
return -1
elseif a:a > a:b
return 1
endif
return 0
endfunction
" Find helptag using a pattern and print the results.
function! helpful#lookup(pattern) abort
" Remove @{lang} pattern
let pattern = substitute(a:pattern, '.\+\zs@\w\+$', '', '')
call s:load_data()
let tags = []
let width = 0
for tag in keys(s:data)
let m = match(tag, a:pattern)
if m != -1
call add(tags, [tag, m])
if stridx(tolower(tag), tolower(pattern)) >= 0
call add(tags, tag)
let width = max([width, strlen(tag)])
endif
endfor
let s:search_pattern = a:pattern
for [tag, _] in sort(tags, 's:_lookup_sort')
for tag in sort(tags, 's:_lookup_sort')
call s:helptag_version(tag, width)
endfor
endfunction

File diff suppressed because it is too large Load Diff

View File

@ -122,6 +122,9 @@ def repo_tags(path):
tag = tag.split('/')[-1]
if tag.startswith('untagged-'):
continue
if tag == 'stable':
# NOTE: Ignore stable tag. Because it is not useful.
continue
tags.append((tag, ref, tag_date))
tags.append(('dev', last, None))
tags.append(('dev', 'HEAD', None))