altfile 0.2a

altfile is a Vim plugin that provides easy switching between related files.
altfile is a Vim plugin that provides easy switching between related files.

Developer comments

Suppose we have a project which resides in a "proj" directory. Content of that directory might look like this:

proj/classes/Class1.php
proj/classes/Class2.php
proj/classes/Namespace/Class3.php
proj/tpl/Class1.html
proj/tpl/Class2.html
proj/tpl/Namespace/Class3.html
proj/tests/Class1.phpt
proj/tests/Class2.phpt
proj/tests/Namespace/Class3.phpt

Create "proj/.altfile" and put these lines inside:

class: classes/{MATCH}.php
template: tpl/{MATCH}.html
test: tests/{MATCH}.phpt

Now load "proj/classes/Class1.php" and hit the hot key. Menu will
appear:

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.

Requirements:

Vim

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.

last updated on:
May 17th, 2008, 9:29 GMT
price:
FREE!
homepage:
code.google.com
license type:
MIT/X Consortium License 
developed by:
Alex Kunin
category:
ROOT \ Text Editing&Processing \ Others
altfile
Download Button

In a hurry? Add it to your Download Basket!

user rating 14

2.4/5
 

0/5

Rate it!

Add your review!

SUBMIT