In an attempt to move a step forward with my vim+screen based IDE i spent some time to learn new vim features (you never know them all, right?). Together with some plugins like project and minibufexplorer i soon got pretty close to what i expect from a modern IDE. What i was still missing, though, was quick access to the class reference.
Having a look a the yiic commands that create yii’s online HTML pages, it was quite easy to fork them into a VimApiCommand that created a useful API manual in vim help file format.
To me this is already useful but still misses some fine tuning when it comes e.g. to formatting of the code examples.
I’ll release the files soon, but would like to know first, how many would use them at all.
So if you’re a vim user - show yourself!!
I’ve attached a screenshot that shows how it looks like in action.
[size="3"]UPDATE:[/size]
[size="3"][color="#FF0000"]This project is hosted on github now[/color][/size]
Mike, I’d love to take a look at the files. if you could make a screencast exposes all the power of Yii+VIM, that’d be just great and highly appreciated by those who is just starting with VIM (at least I’d be very thankful for sure ).
Didn’t try NERDtree yet. It’s only recently that i started looking for a replacement for vimcommander which i had used for years. Would you say it’s better than project? I like project as it has some nice features like filters per directory or running a vim script each time you load a file into the buffer (you can also configure that per directory).
@Nemoden:
If you’re new to vim take your time. Look up the keystrokes for the things you need most often and get used to them first. I’m not sure if i could give you much help. Things depend much on your preferences. And there are already lots of screencasts out there. Learning vim takes time, but it’s worth every second!
Shame on me, but even though i’ve been using vim for 14 years now, for a long time i’ve only used the basic commands to move around, split a window and substitute text per regex and do some more simple text editing . With these features you can already be amazingly fast if you can use all your fingers.
Now i find out, that with some additional new key strokes you can get even faster and do more things inside vim. For example don’t miss all the other window commands (they all start with <ctrl>-w). Now that i got used to opening, moving, maximizing and closing windows it’s even more versatile. Understanding buffers makes another huge difference in your everyday work.
hell yeah! i am an vim-addict for some years now, too. I’m using the minibufexplorer, NerdTREE and ctags/taglist. A vim-optimized help file for Yii’s Classes would be amazing. Can’t wait for your release!, so keep it going
edit: and yes. i also learn new things almost every day!
Please bear with me, this is the first vim help file i ever did. I tried to use the common help file notation (:help notation) but had to "misuse" some markup items. All in all i hope the layout is a good compromise between readability and not wasting too much precious screen space.
I know there is a way to pull up help(?) by standing on a word and pushing some kind of key-combination. So let’s say I move my cursor to CHtml::activeDropDownList - press the buttons and the help would come up.
Geat to hear that it works for you! What about the layout? Any glitches?
Try <shift>+k (See :help K) for help.
I don’t remember why but somewhere i read, you might have to add this:
autocmd BufNewFile,Bufread *.php set keywordprg="help"
But there’s one problem, though: I didn’t really think about this feature, because most of the time i don’t have text like “CGridView::columns” anywhere. That’s why the keywords now use a ‘.’ (dot) as seperator (to save another char). But you made me think. We could have lots of CHtml in the views. So maybe we should change the tag format to “class::property”? What do you think?
What I run into mostly with CHtml is that "oh, I forgot the parameters OR the order of the parameters, something like that" - so I need something quick. I think this would be very helpful…
The layout seemed fine, but I only played with it a little bit!
Don’t hesitate if you have more feedback. I wonder wether it makes sense to create an extension for this. But before that it should be tested in real life for some time.
I was thinking about a Yii extension - but you’re right, maybe better put this on the vim site.
What do you think about inherited properties/methods? I’ve left them out to keep the pages small. So you have to go to the base class (using the inheritance “breadcrumb” on top). Maybe i should still add them as a list of linked tags on top or on bottom?
Yes, please let me know of any problems. I’ve been using it for some time now and it works pretty good.
Still wonder, where’s the best place to release them. If someone’s interested: I can also share the build yiic command that i used to create the files.
Thanks for your feedback - good to know that someone finds it useful, too
For those interested: You can also download the command i’ve written to create the docs. It’s a CConsoleCommand for the yiic build script of Yii. See top post.