Hacker News new | ask | show | jobs
by psophis 2616 days ago
What's the difference between this and a properly setup file type plugin? As here [0] with python lets you open imported modules using `gf`.

[0]: https://github.com/vim/vim/blob/a87b72cc316e065d66dcbcf7ec1c...

3 comments

Another thing I just tested using “includeexpr”, “path” and “suffixesadd” is that it is not possible (as far as my knowledge goes) to let vim open files correctly if the import path is a directory. Which my module does very well for javascript-like projects.
I am not sure if I get your point according to your reference, but the expression in your reference is way simpler than mine, although I should have used includeexpr rather than remapping fg itself. I’ll put that on my todo list, since that is the recommended way.
The main difference is that I want “fg” to be better, smarter to detect file paths. As I mentioned already, javacript-like projects use lots of absolute imports these days and these are not resolved by gf.