-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.vim
More file actions
37 lines (30 loc) · 1.06 KB
/
Copy pathsetup.vim
File metadata and controls
37 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if !has('vim9script') || v:version < 901
" echoerr 'Needs Vim version 9.01 and above'
finish
endif
vim9script
g:loaded_devdocs = true
import autoload '../autoload/devdocs/find.vim'
import autoload '../autoload/devdocs/install.vim'
import autoload '../autoload/devdocs/uninstall.vim'
import autoload '../autoload/devdocs/options.vim'
import autoload '../autoload/devdocs/devdoc.vim'
def Keymaps()
if maparg('q', 'n')->empty()
:nnoremap <buffer> <silent> q :q<CR>
endif
:nnoremap <buffer> <silent> <c-]> <scriptcmd>devdoc.GetPage()<CR>
:nnoremap <buffer> <silent> K <scriptcmd>devdoc.GetPage()<CR>
:nnoremap <buffer> <silent> <c-t> <scriptcmd>devdoc.PopPage()<CR>
enddef
:autocmd filetype devdoc Keymaps()
:command DevdocsInstall install.Install()
:command DevdocsUninstall uninstall.Uninstall()
:command DevdocsFind find.Find()
:command DevdocsTagStack devdoc.DevdocTagStack()
def! g:DevdocsOptionsSet(opt: dict<any>)
options.opt->extend(opt)
enddef
def! g:DevdocsOptionsGet(): dict<any>
return options.opt->deepcopy()
enddef