forked from rafi/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.vim
47 lines (33 loc) · 908 Bytes
/
help.vim
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
38
39
40
41
42
43
44
45
46
47
" Snippets from vim-help
" Credits: https://github.com/dahu/vim-help
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let s:save_cpo = &cpoptions
set cpoptions&vim
let b:undo_ftplugin = 'setlocal spell<'
setlocal nospell
setlocal nohidden
setlocal iskeyword+=:
setlocal iskeyword+=#
setlocal iskeyword+=-
wincmd L
" Jump to links with enter
nmap <buffer> <CR> <C-]>
" Jump back with backspace
nmap <buffer> <BS> <C-T>
" Skip to next option link
nmap <buffer> o /'[a-z]\{2,\}'<CR>
" Skip to previous option link
nmap <buffer> O ?'[a-z]\{2,\}'<CR>
" Skip to next subject link
nmap <buffer><nowait> s /\|\S\+\|<CR>l
" Skip to previous subject link
nmap <buffer> S h?\|\S\+\|<CR>l
" Skip to next tag (subject anchor)
nmap <buffer> t /\*\S\+\*<CR>l
" Skip to previous tag (subject anchor)
nmap <buffer> T h?\*\S\+\*<CR>l
let &cpoptions = s:save_cpo
" vim: set ts=2 sw=2 tw=80 noet :