man.vim: Improve ft=man 'iskeyword' #11457

This addresses a minor quality problem with the recent `'tagfunc'`
changes for `man.vim` (see [link]).

Currently, with the cursor on a parenthese, hitting `K` will jump us to
the man page of the next mentioned entry, instead of the one to which
the parenthese (or section number) belongs.

```
pcrepattern(3), terminfo(5), glob(7), regex(7).
       e.g. ^        e.g. ^
```

Adding the parentheses to `'iskeyword'` means we correctly handle these cases too.

[link]: https://github.com/neovim/neovim/pull/11280#discussion_r348342357
This commit is contained in:
Rob Pilling
2019-11-28 05:01:04 +00:00
committed by Justin M. Keyes
parent 5f9209389b
commit 33beeed4d9

View File

@@ -151,6 +151,8 @@ function! s:put_page(page) abort
setlocal modifiable
setlocal noreadonly
setlocal noswapfile
" git-ls-files(1) is all one keyword/tag-target
setlocal iskeyword+=(,)
silent keepjumps %delete _
silent put =a:page
while getline(1) =~# '^\s*$'