-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default missing files to use normal gf (and hence don't force the 'gf' mapping on users. #6
base: master
Are you sure you want to change the base?
Conversation
Hey, Scott! Thanks for caring and taking the time to do something about it! Oh, definitely Node.vim should fall back to the default A minor style comment on that Did you get a chance to think about automated tests for that first commit? I'm not entirely decided on the other commit regarding mappings, but I get where you're coming from. I'd ideally see those built-in mappings augmenting existing functionality (without breaking, of course!) by default with perhaps an opt-out possibility. On that topic, why did you turn those Thanks again! |
Hi! Thanks for the quick and thoughtful response. Re: fallback to 'gf' let me clean up the style nit and think about some tests. Good that you pointed it out. Re: the key binding, this might be as much a personal preference as anything else. The current code works, although since you map 'gf' inside the plugin itself it made it challenging for me to get a clean fallback mapping to work like I wanted. That's largely the impetus behind my change to commands since it exposes them all as :NodeGotoFile etc. and makes them easy for users to map as they see fit. There are a couple options as you point out like trying to set some global configuration flags etc. but I must admit I'm not a vim-script guru by any means so I may have taken the easy path here :). Let me know if you have other ideas. I'm happy to adjust the pull request into something that works for both of us. |
Let's approach those two things separately and get a decent Btw, those au User Node nmap <buffer> go <Plug>NodeGotoFile That would stop all other defaults from being set, too. |
Works for me. If you'd like to abandon this pull request and do a simple update to the gf fallback logic that would meet my needs based on what you've suggested here re: mappings. |
+1 to @idearat's last comment. |
@moll So obviously 2 needed workarounds for this (either one would do, but both are valuable):
|
I was enjoying the basic functionality of this but found it frustrating that my own path and suffixadds values were ignored. That means files within my project's 'src' directory may not be found etc. if I'm using this plugin. This set of changes fixes that so that 'normal gf' is the fallback. To make that work cleanly I changed from mapping keys to exporting commands that the user can map as they see fit (I ended up with o myself).