Skip to content
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

Proposal: improving the default value of path #3209

Closed
arecarn opened this issue Aug 20, 2015 · 8 comments
Closed

Proposal: improving the default value of path #3209

arecarn opened this issue Aug 20, 2015 · 8 comments
Labels
defaults issues or PRs involving changing the defaults needs:decision discussion has run its course, need decision how to proceed needs:discussion issue needs attention from an expert, or PR proposes significant changes to architecture or API

Comments

@arecarn
Copy link

arecarn commented Aug 20, 2015

I propose addition of ** to the default value of path, so commands like gf and :find search downward (relative to present working directory) for the file you are looking for. I personally use this setting in my configuration, and to me it always feels like it should be a default.

To read more about ** you can look at :h file-searching

@justinmk
Copy link
Member

I thought about it , but @tpope is against it, so I wonder how much other opposition there would be. I do think the current default is really unpleasant for the vast majority of users, they probably give up on :find and friends, then seek out plugins like ctrlp, with a bad impression of Vim's built-in capabilities.

@justinmk justinmk added this to the 0.1-first-public-release milestone Aug 20, 2015
@justinmk justinmk added needs:decision discussion has run its course, need decision how to proceed defaults issues or PRs involving changing the defaults discuss labels Aug 20, 2015
@arecarn
Copy link
Author

arecarn commented Aug 20, 2015

I would be interested in hearing some dissenting opinions.

I know from my experience starting out with Vim both the gf and :find just felt broken. I just didn't know about the path variable, and like you alluded I ended up installing ctrlp to find files.

@tpope
Copy link
Contributor

tpope commented Aug 20, 2015

Specifically I am against it because 'path' is designed to as a companion to 'include', 'includeexpr', and 'suffixesadd', enabling dozens of different features ranging from ]d to i_CTRL-X_CTRL-I. gf and :find fit into this as a way to jump to a C include, a Ruby require, a Java import, or any of dozens of equivalents in other languages.

Breaking large swaths of Vim in support of something as asinine as a janky fuzzy finder is nothing short of unconscionable. Make a different feature if you must, but for the love of Bram don't fix what isn't broken.

@tpope
Copy link
Contributor

tpope commented Aug 20, 2015

I would be okay with flattening to a simple .,, on all platforms, as the C based defaults would be better suited to a file type plugin.

@justinmk
Copy link
Member

@tpope Thanks for clarifying. Does it "break" 'include', ]d, etc. by increasing false positives/noise? Or how?

@rseymour
Copy link

This could result in a security exploit with a little imagination, bad luck and root user firing up neovim in an unknown dir. I realize that's a bit of hyperbole but changing something as basic and dependable as path as a default is begging for all sorts of surprise behavior 2 and 3 degrees away from the change.

@tpope
Copy link
Contributor

tpope commented Aug 20, 2015

@justinmk yes, plus potentially make things unusably slow, and perhaps more importantly raises the question of what file type plugins should do. Attempt to accommodate 2 vastly divergent use cases? Clobber with the traditional interpretation? Give up?

@justinmk
Copy link
Member

Thanks. It's not a clear win so this is a no-go. Also for Bram's love.

What could be potentially discussed in another issue is a default mapping to something like :edit **/. Or somehow educate the user about this opt-in approach (add **/ to the command line when you want sloppy-search). Opt-in is another reason the current default is nice: it's easier to opt-in than opt-out. In fact, that's also the reasoning behind the default 'magic' behavior.

nathanmsmith added a commit to nathanmsmith/.config that referenced this issue Jun 15, 2020
Reading on the topic:
- neovim/neovim#3209
- https://twitter.com/tpope/status/612991667751264256

I tried setglobal at first, but was getting issues with it.
nathanmsmith added a commit to nathanmsmith/.config that referenced this issue Aug 14, 2020
Reading on the topic:
- neovim/neovim#3209
- https://twitter.com/tpope/status/612991667751264256

I tried setglobal at first, but was getting issues with it.
@clason clason added needs:discussion issue needs attention from an expert, or PR proposes significant changes to architecture or API and removed discuss labels Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defaults issues or PRs involving changing the defaults needs:decision discussion has run its course, need decision how to proceed needs:discussion issue needs attention from an expert, or PR proposes significant changes to architecture or API
Projects
None yet
Development

No branches or pull requests

5 participants