I started writing a help file for various vim commands that I know I'll forget.
Over the last 7+ years it's grown to ~1600 lines and is starting to become unwieldy
I've been trying to split it into one file per topic, similar to the vim help files eg user01.txt.
I copied one of the topics, called it sfsearch.txt
and tried to make the main help, sfcontents.txt
file jump to sfsearch.txt
when I used CTRL-]
on sf-search.txt
for eg . I tried |sf-search.txt|
and *sf-search.txt*
and tried to understand the help documentation but have had no luck.
I can use :h sf-search.txt
when in a file but I can't do :h sf-index
and then CTRL-]
on sf-search.txt
within sf-contents.txt
. No error or complaint. Just won't open it. Both files are in the same directory.
Any suggestions?
Update I stopped being a guy who taught himself bash scripting around 20 years ago and I didn't know the terminology then as I was a stored procedure developer / BA then so if I have the terminology wrong apologies. I never understood *nix style help files due to that.
Update 2
After the comments from Romainl
and Martin Tournoij
I checked the function and the Helptags call is there.
I also used :helptags $VIM/vimfiles/doc/
from a new window and it didn't work for either defining *sfsearch.txt*
or |sfsearch.txt|
in sfcontents.txt
function! helpFile()
:silent! !copy "c:\workdocs\vimutils\vimtips\commands_back.txt" "C:\workdocs\vim\vimfiles\doc\sfcontents.txt"
:silent! !copy "C:\workdocs\vimutils\help\usefulcommands.txt" "C:\workdocs\vim\vimfiles\doc\sfuseful.txt"
:silent! !copy "C:\workdocs\vimutils\help\sfsearch_back.txt" "C:\workdocs\vim\vimfiles\doc\sfsearch.txt"
:chdir $VIM/vimfiles/doc
:Helptags $VIM/vimfiles/doc/
"I also tried the following without success
:helptags $VIM/vimfiles/doc/
endFunction
:help
navigation is based on:help tags
so you need to create, and maintain, atags
file for your help files. See:help :helptags
.$VIM/vimfiles/doc/
and:Helptags $VIM/vimfiles/doc/
but neither worked":Helptags" !== ":helptags"
:helptags
as well. I'll update the question