mirror of
https://github.com/dag/vim-fish
synced 2024-09-16 13:44:02 +02:00
use fish's man function for &keywordprg
This makes it possible to use K to view the man page for the fish builtin under the cursor.
This commit is contained in:
parent
cd9c3cb930
commit
97e6b0b060
3 changed files with 9 additions and 3 deletions
|
@ -3,9 +3,9 @@ vim-fish
|
|||
|
||||
This is an addon for Vim providing filetype support for [fish][] scripts. In
|
||||
addition to the normal Vim features such as syntax highlighting, automatic
|
||||
indentation, reformatting and filetype detection, this addon includes support
|
||||
for the third-party addons [UltiSnips][], [Syntastic][], [endwise][] and
|
||||
[commentary][] when any of those are installed.
|
||||
indentation, reformatting, keyword lookup and filetype detection, this addon
|
||||
includes support for the third-party addons [UltiSnips][], [Syntastic][],
|
||||
[endwise][] and [commentary][] when any of those are installed.
|
||||
|
||||
Bonus feature: if you use Vim with `funced` in fish, Vim will enter Insert mode
|
||||
at the end of the last line inside the function, after indenting it once if
|
||||
|
|
1
bin/man.fish
Executable file
1
bin/man.fish
Executable file
|
@ -0,0 +1 @@
|
|||
man $argv
|
|
@ -2,6 +2,11 @@ setlocal commentstring=#%s
|
|||
setlocal iskeyword=@,48-57,-,_,.,/
|
||||
setlocal formatprg=fish_indent
|
||||
|
||||
" Use the 'man' wrapper function in fish to include fish's man pages.
|
||||
" Have to use a script for this; 'fish -c man' would make the the man page an
|
||||
" argument to fish instead of man.
|
||||
execute 'setlocal keywordprg=fish\ '.expand('<sfile>:p:h:h').'/bin/man.fish'
|
||||
|
||||
let b:endwise_addition = 'end'
|
||||
let b:endwise_words = 'begin,function,if,switch,while,for'
|
||||
let b:endwise_syngroups = 'fishKeyword,fishConditional,fishRepeat'
|
||||
|
|
Loading…
Reference in a new issue