mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 08:40: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:
parent
511480cabc
commit
b525e520e5
@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: update tags
|
- name: update tags
|
||||||
run: make update
|
run: make update
|
||||||
- name: get date
|
- name: get date
|
||||||
@ -21,7 +21,7 @@ jobs:
|
|||||||
id: diff
|
id: diff
|
||||||
run: echo "::set-output name=diff::$(git diff --name-only data/)"
|
run: echo "::set-output name=diff::$(git diff --name-only data/)"
|
||||||
- name: push
|
- name: push
|
||||||
uses: actions-x/commit@v2
|
uses: actions-x/commit@v5
|
||||||
with:
|
with:
|
||||||
name: Tag Update Bot
|
name: Tag Update Bot
|
||||||
files: data/tags doc/helpful-version.txt
|
files: data/tags doc/helpful-version.txt
|
||||||
|
@ -8,7 +8,7 @@ introduced or removed features.
|
|||||||
|
|
||||||
## Usage
|
## 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.
|
display version information.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
@ -16,12 +16,6 @@ Examples:
|
|||||||
```vim
|
```vim
|
||||||
" Search for a function
|
" Search for a function
|
||||||
:HelpfulVersion matchaddpos()
|
:HelpfulVersion matchaddpos()
|
||||||
|
|
||||||
" Search for keys
|
|
||||||
:HelpfulVersion <.*>
|
|
||||||
|
|
||||||
" Case-insensitive search
|
|
||||||
:HelpfulVersion f11\c
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -274,14 +274,8 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:_lookup_sort(a, b) abort
|
function! s:_lookup_sort(a, b) abort
|
||||||
if a:a[1] < a:b[1]
|
let al = strlen(a:a)
|
||||||
return -1
|
let bl = strlen(a:b)
|
||||||
elseif a:a[1] > a:b[1]
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
let al = strlen(a:a[0])
|
|
||||||
let bl = strlen(a:b[0])
|
|
||||||
|
|
||||||
if al < bl
|
if al < bl
|
||||||
return -1
|
return -1
|
||||||
@ -289,26 +283,33 @@ function! s:_lookup_sort(a, b) abort
|
|||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if a:a < a:b
|
||||||
|
return -1
|
||||||
|
elseif a:a > a:b
|
||||||
|
return 1
|
||||||
|
endif
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
" Find helptag using a pattern and print the results.
|
" Find helptag using a pattern and print the results.
|
||||||
function! helpful#lookup(pattern) abort
|
function! helpful#lookup(pattern) abort
|
||||||
|
" Remove @{lang} pattern
|
||||||
|
let pattern = substitute(a:pattern, '.\+\zs@\w\+$', '', '')
|
||||||
|
|
||||||
call s:load_data()
|
call s:load_data()
|
||||||
|
|
||||||
let tags = []
|
let tags = []
|
||||||
let width = 0
|
let width = 0
|
||||||
|
|
||||||
for tag in keys(s:data)
|
for tag in keys(s:data)
|
||||||
let m = match(tag, a:pattern)
|
if stridx(tolower(tag), tolower(pattern)) >= 0
|
||||||
if m != -1
|
call add(tags, tag)
|
||||||
call add(tags, [tag, m])
|
|
||||||
let width = max([width, strlen(tag)])
|
let width = max([width, strlen(tag)])
|
||||||
endif
|
endif
|
||||||
endfor
|
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)
|
call s:helptag_version(tag, width)
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -122,6 +122,9 @@ def repo_tags(path):
|
|||||||
tag = tag.split('/')[-1]
|
tag = tag.split('/')[-1]
|
||||||
if tag.startswith('untagged-'):
|
if tag.startswith('untagged-'):
|
||||||
continue
|
continue
|
||||||
|
if tag == 'stable':
|
||||||
|
# NOTE: Ignore stable tag. Because it is not useful.
|
||||||
|
continue
|
||||||
tags.append((tag, ref, tag_date))
|
tags.append((tag, ref, tag_date))
|
||||||
tags.append(('dev', last, None))
|
tags.append(('dev', last, None))
|
||||||
tags.append(('dev', 'HEAD', None))
|
tags.append(('dev', 'HEAD', None))
|
||||||
|
Loading…
Reference in New Issue
Block a user