diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
| commit | 934382c8a1ce738589dee9ee0f14e1cec812770e (patch) | |
| tree | f13715762efd06518f8aec3a2bf39ac8a615987f /uvim/runtime/ftplugin/help.vim | |
| parent | 0b24459ac12b6cf9fd5a401d647796ca254a8fa8 (diff) | |
| parent | 7088926316d8d4a7572a242d0765e99adfc8b083 (diff) | |
| download | Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.tar.gz Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.zip | |
Add 'uvim/' from commit '7088926316d8d4a7572a242d0765e99adfc8b083'
git-subtree-dir: uvim
git-subtree-mainline: 0b24459ac12b6cf9fd5a401d647796ca254a8fa8
git-subtree-split: 7088926316d8d4a7572a242d0765e99adfc8b083
Diffstat (limited to 'uvim/runtime/ftplugin/help.vim')
| -rw-r--r-- | uvim/runtime/ftplugin/help.vim | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/uvim/runtime/ftplugin/help.vim b/uvim/runtime/ftplugin/help.vim new file mode 100644 index 0000000000..e8651b5d59 --- /dev/null +++ b/uvim/runtime/ftplugin/help.vim @@ -0,0 +1,47 @@ +" Vim filetype plugin file +" Language: Vim help file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Last Change: 2025 Apr 08 +" 2025 Apr 08 by Vim project (set 'omnifunc' and 'iskeyword', #17073) +" 2025 Aug 08 by Vim project (unset comment options, #17889) + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl isk< fo< tw< cole< cocu< keywordprg< omnifunc< comments< cms<" + +setl comments= cms= + +setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=s:HelpComplete +let &l:iskeyword='!-~,^*,^|,^",192-255' +if has("conceal") + setlocal cole=2 cocu=nc +endif + +if !exists('*s:HelpComplete') + func s:HelpComplete(findstart, base) + if a:findstart + let colnr = col('.') - 1 " Get the column number before the cursor + let line = getline('.') + for i in range(colnr - 1, 0, -1) + if line[i] ==# '|' + return i + 1 " Don't include the `|` in base + elseif line[i] ==# "'" + return i " Include the `'` in base + endif + endfor + else + return taglist('^' .. a:base) + \ ->map({_, item -> #{word: item->get('name'), kind: item->get('kind')}}) + \ ->extend(getcompletion(a:base, 'help')) + endif + endfunc +endif + +let &cpo = s:cpo_save +unlet s:cpo_save |
