altfile is a Vim plugin that provides easy switching between related files.
Suppose we have a project which resides in a "proj" directory. Content of that directory might look like this:
Create "proj/.altfile" and put these lines inside:
Now load "proj/classes/Class1.php" and hit the hot key. Menu will
class [template] test
Now you can use it as any other wild menu: cursor keys, , .
By default previously active item is highilighted. So, to quickly switch between two files all you have to do is .
Now load "proj/tpl/Class4.html" - it does not exist, and you'll get empty window. Hit , select "class" and hit - VIM will create new buffer for (still non-existing) "proj/classes/Class4.php". Ta-dah! Actually, this is my main reason for creating this plugin.
Note that it DOES NOT matter what is your current directory: you can cd to whatever place you want. But it DOES matter where ".altfile" is, becase patterns inside it are relative to its placement.
To show visual file selector hit . Use movement/cursor keys to highlight a file; loads file; switches between labels.
What's New in This Release:
· No more ":drop" (i.e. no more GUI dependency).
· File load/activation code is smarter now. Uncommented forgotten try...catch block.
· Removed all inline docs, added link to the project site.