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: let g:netrw_keepdir = 0 #27

Closed
idbrii opened this issue Jan 29, 2013 · 3 comments
Closed

Proposal: let g:netrw_keepdir = 0 #27

idbrii opened this issue Jan 29, 2013 · 3 comments

Comments

@idbrii
Copy link

idbrii commented Jan 29, 2013

Navigating in netrw to change the cwd makes so much sense to me that it seems like it should be the default. Although, I'm not sure how much you want to change the behaviour of other plugins.

@teranex
Copy link

teranex commented Jan 29, 2013

I disagree with this. I use the Rooter plugin and an autocommand to automatically cd to the root of the project whenever I open a file which is inside a repository (='project'). This makes it easy to use ctrlp for the entire project, use Ack to search the entire project etc. So while I'm working my CD never changes and always points to the root of my project.

@idbrii
Copy link
Author

idbrii commented Jan 29, 2013

Looking around my vim settings, I realize that probably makes the most sense if you use autochdir or something similar. I use this:

au BufReadPost * if &ft != 'help' | silent! cd %:p:h | endif

So when I edit files or refresh my buffer (I have nnoremap <S-space> :e<CR>), then I'm in that file's directory. Opening directories in netrw probably makes me think of opening files (and chdiring to them).

@teranex: My projects have hierarchies so deep that I can't imagine using something like Rooter. I guess that would be useful for Ack (although how do you search within the current subtree?). I use ctrlp's root markers and a search index (codesearch + notgrep). I can see how this default breaks anyone who doesn't auto change their cwd.

@tpope
Copy link
Owner

tpope commented Jan 29, 2013

Yeah, this is pretty clearly not a good fit.

@tpope tpope closed this as completed Jan 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants