Pre-made VimHelp Files

hi there

Ready to swap/enhance Vim help explained here!!

AutoHotKey live action!!
Language Size ~ KB Last update Download Notes

~ 674 KB 1533 hrs 19 Apr 2018 autoHotKeyHelp.txt
  • Added a couple of notes in GUI, re Gui,Font,{sNN} {cColor},{facename} so it's a bit clearer where you should put color, i.e not in with the facename
  • Added some missing File functions, still handful to go
PHP ~ 1.46MB 1307 7th May 2017 phpHelp.txt
  • String functions, Control Structures
  • e.g #include, file sytem functions, mysql_XXX functions
  • Still to go mysqli_XXX and PDO
AutoIT3 ~ 708 KB 0934 02th Jun 2017 autoIt3Help.txt
  • Added some missing What is Dim / Const etc..
  • All, GUICreateXXX, except _GUIXXXX still to come, and _GDIPlus
  • Added StringXXX functions and FileXXX, number conversion, all the #XXX directives
  • Added a few personal notes to FileOpen / FileRead, and added a few more utility _FileXXX functions. Added all the _ArrayXXX functions, added RegXXX functions
Objective-C ~ 46K 2357 hrs 30th Jan 2017 Objective C have problem with this one. Finding good books on Apple/iOS's/Mac OS's Objective C not easy to come across. Wading through docs on the web and reading Stephen Kockans's is about the best I can do. Perhaps one day I'll take my notes and compile a Objective C cribsheet
Javascript ~30k 30th May 2016 javascriptHelp.txt very basic got some XMLHttpRequest object calls in it a bit of a fail really. Never really to be honest Javascript is not my thing

About Vim Tags

Basically Tags give you a powerful built-in hypertext mechanism. :help uses Tags produced by :helptags.

That's not to say Tags stop there. You could for example use Tags as a sort of a Comments Plus that gives you access to linked pages of information hypertext-style. The idea that Tags uses of Regular Expressions as a way to address locations within files is used right throughout Vim.

While I was learning like I did a few naive tutorials: Tags Tutorial How tags work

Back to :help. :helptags and it's partner :help, between them they create/use the quick powerful help search machanism within Vim from which you can quickly search/jump to any help topic just from the command line. The little Help files are just txt documents linked with a related Tags file. :helptags produces this Tags file. The Tags are just marked areas of the txt document.

About Vim Help

When you first unwrap your shiny new Vim start typing :help and you get all sorts of wonderful help on Vim and VimScript. Then by typing :help  and then some search term in Vim you then got access to Vim's search engine for all of the help. Try :help  followed by some search term then TAB or {CTRL-d} to see what I mean.

The problem is what if you want to start learning new languages using Vim e.g PHP, AutoHotKey, or AutoIt? This page aims to help you and I think it's working great with 'scripted' languages especially with PHP for now. It's a bit more difficult for me to get the 'same' clarity going on with iOS/Objective C because I found the information I need is scattered around Apple's servers and a fair bit is to be found in books i.e copyright. Scripting languages just I've found seem to be better suited for the VimHelp type approach. E.g the man provides a consistent Help file that is self contained. Usually it is designed to be accessed by keywords anyway, so that the user might have a prearranged set of topics he can go through to learn about a certain thing. In Apple's the world seems to be ruled by egos illuminated here and there by the simplicity of Apple's engineers. It's then left down to the user to try to understand. There isn't as much a clear set path where you can start and finish.

More on Help

Just to reiterate: :helptags indexes the txt document data to produce Tags that :help uses

:help is stored in an .txt file. There's nothing special the file other than it has a line in it that says vim: filetype=help: and it's got a few funny characters dotted around.

To drive :help you need to get your head around Place 1 and 2. These are obtainable easily by just type: :echo $VIMRUNTIME."/doc" and :echo $HOME/.vim/doc Place 1 and Place 2 respectively. (.vim = vimfiles on Windows). You need to be intimate with these. The reason they're so important is because it's where Vim looks for help. The documentation doesn't explain this clearly.

Place 1, Vim's Application directory and Place 2 user Customisations to Vim in the User's Home directory. These are the only places :help and :helptags works with. Actually there is a daft place Place 3 :help but you're better off ignoring it. When you run :helptags everything in this Place 1 is indexed, plus what you put in after :helptags. Tricky bit to understand is this should really be Place 2 because :help will only look in these two places. Tricky because you can :helptags anywhere but :help only recognises anything at all if it's Place 1 or Place 2.

Vim's built in help is in c:\Program Files\Vim\vim73\doc or if Mac /Applications/MacVim/Contents/Resources/vim/runtime/doc. This is what I mean by Place 1. Place 1 always gets considered as the source to :help. Place 2 is like your home directory plus .vim/doc on the Mac or vimfiles/doc for PC. The latter place is the place for "your" help. Just remember for Vim to recognise any changes you make you first need to run :helptags on that directory, e.g. :helptags $HOME/.vim/doc on the Mac.

Let's take a bad example of how to do this which is definitely a slightly bad approach suppose I just wanted to be lazy and download one of the above .txt files to c:\. Then I could do :helptags c:\ sorted. No. Because only Place 1 and Place 2 gets considered for help. What you will find in your c:\ is a tags file but it will be ignored.

Let's take another slightly dubious way, suppose I plain just can't be bothered with Place 1 and Place 2 and just wanted to drop my help into c:\Program Files\Vim\vim73\doc (on Windows) which after all is where all the Vim Help goes. Easy then I just run my trusty :helptags e.g like :helptags $VIM/vim73/doc. True but then I would have all my help mixed in with Vim help.

On Windows c:\Documents and Settings\{myuser}\vimfiles is the directory where 'your' plugin and doc files can go. I refer to this as Place 2. I think on Windows Vim's rather basic installer doesn't by default create these so if you're like me and forgot to switch it on when install you may need to create it. Check this out:
Vim Installer in Action

On Windows 7 it's \Users\{myuser}. On the Mac it's /Users/{myuser} although the directory is called .vim not vimfiles (/Users/{myuser}/.vim to be precise.)

A revolutionary idea is to create a xxxHelp directory in Place 2 alongside doc because later on you can just 'switch them' on and off by renaming them to and from doc. i.e on my system I have autoHotKeyHelp, and another called vimHelp. A screenshot might make it clearer, this is taken live from my Windows 7 / Vim 8 install. Here the currently active one is called 'doc' which happens to contain the autoHotKeyHelp.txt file at the top of this page. Anytime I want to change one of them I simply rename incoming help 'doc' because this makes it my current "Help". (As per normal Vim directory layout). I rename the old one xxxHelp as you see I've done here. Last step I just do a :helptags $HOME/.vim/doc (..vimfiles/doc for Win). It's as easy as that!

If you wanna know an even quicker way see do it with just Vim command line

on the Mac Place 2 is called .vim and is hidden by default. You need to get there via Terminal or use Finder's 'Goto To Folder' command {CMD-SHIFT-g}~/.vim. Similarly another quirk on Windows \Users\{MYUSER}\vimfiles\ may not actually exist see side note: You may have to create this by hand. (It's \Documents and Settings\{MyUSER}\vimfiles\ on XP).

Example Installing a .txt Help File

Lets pretend we're gonna use the AutoHotKeyHelp.txt above... right-click / Save As... to download the above file to Place 2, i.e something like , or /Users/{myuser}/.vim/doc (Mac change .vim to vimfiles on Windows). This is an easy way to do it. Bear in mind all the help will be mixed together, as explained above. Vim Help plus whatever help files you're adding from above or your own will be tagged along with Vim Help. If you still wanted to go through you could do :helptags $HOME/.vim//doc (change .vim to vimfiles on Windows) That's it! Next time you type :help all the help you added will be used.

I'm hinting there's a more correct way to do it!

Decluttering Help

At the moment if you type help :help var{CTRL-d} it will get you help from two different help systems on anything with var in it.

Create a folder inside $HOME/.vim/ (.vim = vimfiles for Win) for different types of help you want to use. e.g vimHelp, autoHotKeyHelp, autoIt3Help.

The one time Hack you wish to do is to put Vim's help properly the user area. Nothing bad's gonna happen if you do this. It means Vim's help files that come with Vim are no longer going to be in the program folder itself, which if you think about it makes sense. On your Explorer, Finder, go to Place 1/doc. Find it by doing :echo $VIMRUNTIME."/doc". Then cut/paste or drag whichever method you fancy all the files except help.txt into the $HOME/.vim/vimHelp. (Obviously you need to Create a Folder named vimHelp first, these are just places for our reference later so later you can see what they're for i.e it's gonna be obvious that a folder named "vimHelp" just the place we've used to stores the Vim help files)

Now take a break at this point. What you've done is you've "Jailbroken" Vim Help. Well actually it's not as bad as that because you can return things to the way they were by reinstalling worst comes to the worst. However it does mean a number of benefits for you. By having Vim Help in your user/home directory you are now free to manage, chop and change it, customize it the way you want. With it as it comes out of the box you are not allowed to do this. Not easily anyway. see how easy you could change your help (Program Files area on on a hard disk are protected on most systems. This is where Vim puts its help when upon Install.)

You should have one dir in $HOME/.vim/doc (.vim = vimfiles in Win) for every help you would like to use, e.g on my system I have: vimHelp, autoHotKeyHelp, and autoI3Help. Exactly one of these is caled 'doc' at any given time. I simply rename them to/from doc depending on which help I want to use and then run :helptags $HOME/.vim/doc (.vim = vimfiles on Win).

As an example I was using these lines on my system earlier and it worked a treat, all done from the Vim command line.
:!move C:\Users\Lenovo\vimfiles\doc C:\Users\Lenovo\vimfiles\autoHotKeyHelp
:!move C:\Users\Lenovo\vimfiles\vimHelp C:\Users\Lenovo\vimfiles\doc
:helpt C:\Users\Lenovo\vimfiles\doc

In fact I didn't even have to type all this, I just did
:!move e.g $HOME\vimf
then push TAB for the remainder of the directory
ending up with..
:!move C:\Users\Lenovo\vimfiles\
then I myself add doc at the end. (* one thing to note)
Then on the right do
to give
then add autoHotKeyHelp at the end. Amazing how in one powerful command I've renamed all the Vim help to something else. Later on I can return to this. Then in my second command return is exactly what I'm doing. I had a previously renamed VimHelp - (my saved Vim Help). Having the valuable text files in doc is what makes them powerful. Then the 3rd and final command helpt indexes the help
command. Now I'm all set.

* Note: Be careful with the :!move on the to left hand side to remove any trailing slash because if you don't Vim will interpret this as you are trying to talk about a file within that directory not the directory itself. Vim's intelligence will then decide to not help you with the right hand side if you want to use {TAB} to have Vim auto-complete the directory for you. You will look stupid. It's because Vim expects you to finish the path properly on the left first which you don't seem to have done so it will think. So make sure you remove any trailing slash if you mean a directory.

In the above case I was using Vim Help and was trying to use AutoHotKey Help instead. The built-in Vim :shell command makes it easy to do this.

comments, improvements: pablos544---PUTATSIGNHERE---ezrider---DOTCODOTUK