Relativize is a Vim script to quickly make a full path name relative to an index.html or tags file.
Project with a tags file example:
Open a long full path name from some error log
vi /some/full/path/to/project/current_project/lib/module/file.ext
...
:Relativize tags
if you type :pwd you should get
/some/full/path/to/project/current_project
assuming a tags file has been created in the current_project file in the past.
So hopefully this means tag jumps will work and relative include paths can be accessed via gf. This could also be useful for other landmark files on the system (eg. index.html, tags, README). In the above example using the actual file.ext as the argument will make the working directory the module directory.
The function will prioritise the deepest tags file.
Requirements:
· Vim
INSTALLATION:
add the relativize.vim into the plugins directory
Product's homepage