Relativize : quickly make a full path name relative to an index.html or tags file
| script karma
Downloaded by 546
Comments, bugs, improvements
script versions (upload new version)
| Project with a tags file example:
Open a long full path name from some error log
if you type :pwd you should get
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, .project,build.xml,README...etc).
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.
I have this in my vimrc to give you some ideas
nnoremap ,pp :split<cr>:enew<cr>:r! tail -n 1000 /var/log/php_errorlog<cr>:set buftype=nofile<cr>Gf/
nnoremap gft gf:Relativize tags<cr>
nnoremap gfi gf:Relativize index.php<cr>
- Will probably not work with MS windows paths in current form.
It will probably cause an infinite loop you will need to
Ctrl-C out of.
|add the relativize.vim into the plugins directory|
Click on the package to download.
ip used for rating: 126.96.36.199