How is it possible to do this?
I would like the path to paste it in command mode with CTRL-R.
You can add custom mappings (a mouse click is handled like a keyboard mapping) for the plugin's window via an autocmd.
This example would retrieve the current tag from the TagBar plugin:
Edit: I only now realized that you want the NERDTree plugin, not TagBar, sorry. The approach is similar, however, you need to inject a small function at the end of
Then, the modification (you can put them in the same place) would be:
Edit: After a little more digging, I realized that the plugin's own extension system for custom mappings can be used; there's even a example given at
With this, there's no need to modify the plugin itself; just put the following fragment into