I'm trying NERDtree which is pretty cool, but what I'd like to do is execute special commands, or scripts, on the selected file.
For example, I'd like to highlight an image file in the tree, hit some key and have the appropriate XHTML tag inserted in the original file (I have a small script to do the formatting, I just need to run it on the file). Or insert a 'require modulename' when hitting another key while modulename is selected. Or, well I guess you got the point.
Can it be done in NERDtree, or is there any other plugin that allows this?
Thanks
EDIT
I thought of this solution: I run the command on the file under the cursor in the browser window, capture its output in a register, switch back to the previous window and paste the content of the register.
The problem with this approach is that the file in the browser window has no reference to its full path, so it's just a filename and thus basically useless unless you just work with stuff in the cwd.