2005-06-29 22:40:58 +00:00
|
|
|
" Vim filetype plugin file
|
2017-03-05 17:04:09 +01:00
|
|
|
" Language: Vim help file
|
|
|
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
2025-04-08 20:40:12 +02:00
|
|
|
" Last Change: 2025 Apr 08
|
|
|
|
" 2025 Apr 08 by Vim project (set 'omnifunc' and 'iskeyword', #17073)
|
2005-06-29 22:40:58 +00:00
|
|
|
|
|
|
|
if exists("b:did_ftplugin")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let b:did_ftplugin = 1
|
|
|
|
|
2008-08-06 17:06:04 +00:00
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
2025-04-08 20:40:12 +02:00
|
|
|
let b:undo_ftplugin = "setl isk< fo< tw< cole< cocu< keywordprg< omnifunc<"
|
2005-06-29 22:40:58 +00:00
|
|
|
|
2025-04-08 20:40:12 +02:00
|
|
|
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=s:HelpComplete
|
|
|
|
let &l:iskeyword='!-~,^*,^|,^",192-255'
|
2011-07-18 19:40:27 +02:00
|
|
|
if has("conceal")
|
|
|
|
setlocal cole=2 cocu=nc
|
|
|
|
endif
|
2008-08-06 17:06:04 +00:00
|
|
|
|
2025-04-08 20:40:12 +02:00
|
|
|
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
|
|
|
|
|
2008-08-06 17:06:04 +00:00
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|