voodu.vim : Framework for implementing Object Oriented Programming with Vim Scripts
| script karma |
Rating 5/2,
Downloaded by 591 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Ian Tegebo |
| |
| script type |
| utility |
| |
| description |
This is an implementation of OOP with a decisively Perl flavor utilizing Vim 7.0's dictionary representation of objects. More extensive documentation will be added at a later date. I'm also aware of vimscript #1034 but it was pre-7.0 and thus doesn't utilize many of the features involved with Voodu. For now, you can do the following:
let s:AD = tv#series#comedy#New('Arrested Development')
let s:TO = tv#series#comedy#New('The Office')
echo s:AD.name()
echo s:AD.type()
echo s:TO.name()." is a ".s:TO.type()
let s:SS = tv#series#comedy#New('The Simpsons')
" An example of Class Method accessing Class Data
echo tv#series#Names()
let s:dailyshow = tv#New('News Parody')
echo s:dailyshow.type()
--------------------------------------- Future Plans ---------------------------------------
I want to demonstrate the usefulness of this utility plugin by implementing generic tab/window/buffer classes that can hide a lot of the work I see plugin authors performing, e.g. wincommander, WinWalker, SideBar.
Additionally, I believe I can add functionality similar to Perl's Class::Accessor or Ruby's attr_reader:, namely automatic provision of simple accessor methods. |
| |
| install details |
$ cd ~/.vim
$ tar xzvf voodu-0.0.1.tar.gz
And then you can test with:
$ vim -c ':so %' tv.vim |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.44
|