altfile

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

altfile Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Alex Kunin
  • Publisher web site:
  • http://code.google.com/p/altfile/

altfile Tags


altfile Description

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 commentsSuppose 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.phptCreate "proj/.altfile" and put these lines inside: class: classes/{MATCH}.php template: tpl/{MATCH}.html test: tests/{MATCH}.phptNow load "proj/classes/Class1.php" and hit the hot key. Menu willappear: class testNow 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:· VimWhat'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.


altfile Related Software