Yii API docs in vim help file format


(Pletnev Rusalex) #21

awesome plugin!!!


(Mike) #22

Updated help files to Yii 1.1.7 (see top post). Have fun!


(Muaid M.) #23

thanks Mike for this great vim helper

BUT unfortunately i couldn’t accomplish it

i follow up with your post, and i get tags file inside ~/yiiapi/doc … BUT << i hate this word man !! <_<

when i try to write:

:h CWe <TAB>

nothing to be completed !!

only i get <cweb.vim> and <ft-cweb-synatx>

Note: i get a lot of errors when typing:

:helptags ~/yiiap/doc/

i don’t pay attention to these error like you said.

then i specify the path :

:set runtimepath+=~/yiiapi/doc/

with no succeed

is there any thing i missing here !!


(Mike) #24

Hmm, it should only be about a dozen of errors. I get mine in german, but they basically only say, that there where some duplicate tags. So

  1. What errors do you get?

  2. Do you see a file ~/yiiapi/docs/tags? It should be around 250KB and contain a lot of meta information about the help tags.


(Muaid M.) #25

all errors is a duplication problem and here is the list of the errors (just in case):


E154: Duplicate tag "CActiveRecord::primaryKey" in file /home/muaid/yiiapi/doc//CActiveRecord.txt

E154: Duplicate tag "CDbCommand::from" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::group" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::having" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::join" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::limit" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::offset" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::order" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::select" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::union" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CDbCommand::where" in file /home/muaid/yiiapi/doc//CDbCommand.txt

E154: Duplicate tag "CHttpSession::count" in file /home/muaid/yiiapi/doc//CHttpSession.txt

E154: Duplicate tag "CList::count" in file /home/muaid/yiiapi/doc//CList.txt

E154: Duplicate tag "CMap::count" in file /home/muaid/yiiapi/doc//CMap.txt

E154: Duplicate tag "CQueue::count" in file /home/muaid/yiiapi/doc//CQueue.txt

E154: Duplicate tag "CStack::count" in file /home/muaid/yiiapi/doc//CStack.txt

yes i checked for tags yesterday and the file is exactly 251.7 KB

and here is a quick snippet of the tags file :


CViewRenderer::fileExtension	CViewRenderer.txt	/*CViewRenderer::fileExtension*

CViewRenderer::filePermission	CViewRenderer.txt	/*CViewRenderer::filePermission*

CViewRenderer::generateViewFile	CViewRenderer.txt	/*CViewRenderer::generateViewFile*

CViewRenderer::getViewFile	CViewRenderer.txt	/*CViewRenderer::getViewFile*

CViewRenderer::renderFile	CViewRenderer.txt	/*CViewRenderer::renderFile*

CViewRenderer::useRuntimePath	CViewRenderer.txt	/*CViewRenderer::useRuntimePath*

CWebApplication	CWebApplication.txt	/*CWebApplication*

CWebApplication::afterControllerAction	CWebApplication.txt	/*CWebApplication::afterControllerAction*

CWebApplication::assetManager	CWebApplication.txt	/*CWebApplication::assetManager*

CWebApplication::authManager	CWebApplication.txt	/*CWebApplication::authManager*

CWebApplication::baseUrl	CWebApplication.txt	/*CWebApplication::baseUrl*

i also dbl checked my configuration file for any settings or key mapping may conflict but still no progress.

i am using gvim and also tried vim but with same the result.

thanks for help ::)


(Muaid M.) #26

it works finally !!!

Mike there is tow problem with it not one :P

first one:


set runtimepath+=/path/to/yiiapi/doc

shouldn’t point to doc dir directly:


/path/to/yiiapi  not /path/to/yiiapi/doc

the second is:

we shouldn’t open .vimrc file to add


set runtimepath+=/path/to/yiiapi

since it is already exists in our plugin/yiiapi.vim !! so we have to edit the path in yiiapi.vim only

i am not an expert in Vim so is the above correction is correct !!

and thanks again for this great help :rolleyes:


(Mike) #27

Oops, thanks for pointing that out. I’ve fixe the typo and made it more clear in step 3 now (either use step 3a or 3b).


(Mike) #28

Updated to Version 1.1.8. See top post.


(Mike) #29

Update: I’ve created a github project now, see top post. So if you use a plugin manager like Vundle for VIM, you now can install the plugin with a single line from your .vimrc.


(Mike) #30

Updated to 1.1.9.


(Imehesz) #31

wow, that was quick :)

thank you!

–iM


(Sealtrip) #32

Great job Mike. Thanks


(Mike) #33

Updated to 1.1.10.


(Farhan Ghazali) #34

hihih


(Autobroth) #35

I apologise, but this variant does not approach me. Perhaps there are still variants?


(Imehesz) #36

Are these spam?

–iM


(Mike) #37

The package also contains the command i used to build the manual. If you don’t like the output format, feel free to tweak it.


(Mike) #38

As inherited properties and methods are not included in the help pages you have to jump through the inheritance chain, linked on top of each help file. To make this more convenient i consider listing all of them on top of the file. I’d not add the full description to not bloat the help files. But it could still be useful, as you would see the full list of properties/methods of a class. The list would also be linked to the full documentation of the parent class.

This would make the help files bigger and maybe also a bit “noisy” as a lot of base properties would always be listed. Unfortunately we can’t have the “Hide inherited properties/methods” :)

So what do you think? Would you find this useful? Or do you have a better idea?


(Mike) #39

Update: Created the files for Yii 1.1.11 and 1.1.12. The helpfiles now also include inherited properties and methods. They link to the class where it was defined.


(Mike) #40

Updated files for Yii 1.1.13 available now: https://github.com/mikehaertl/yii-api-vim/tags