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

Problem with working path node and SVN project #241

Closed
yoopea opened this issue Jul 20, 2012 · 7 comments
Closed

Problem with working path node and SVN project #241

yoopea opened this issue Jul 20, 2012 · 7 comments

Comments

@yoopea
Copy link

yoopea commented Jul 20, 2012

Hello,

I run vim from a svn project (i.e. a directory having a .svn sub-directory) and g:ctrl_working_path_node is set to 2. However, when I run ctrlp, the working dir is my home dir (~) and NOT the project dir.

Note that I don't have this problem when I run vim from a git project.

It looks like ctrlp finds its working path from my ~/.git directory instead of my project directory: ~/workspace/myproject/.svn

What could be wrong ? Thank you.

@kien
Copy link
Owner

kien commented Jul 20, 2012

If I understand your situation correctly, you have a .git directory at your home directory? And the svn project is in a subdirectory also under your home directory? If that's correct, just put .svn in the root_markers option:

let g:ctrlp_root_markers = ['.svn']

As for why, see my answers in issue #181. But now I think I might need to change this a bit. It seems like a lot of people expect it to work without the priority thing.

@yoopea
Copy link
Author

yoopea commented Jul 21, 2012

Thank you for your answer and the related link; it's working now (yes, I have a .git directory at my home directory).

The problem now is that the working dir is constantly changing because my project has .svn directories at each sub-directory of my project. I'l probably have to use the .root tip to manage this situation.

Nevertheless, you have another idea ?

Thank you and cheers for this great plugin !

@kien
Copy link
Owner

kien commented Jul 21, 2012

No, there's no other way with the plugin. But if you can, update your project and SVN install. From SVN 1.7, there's only one .svn directory at the root of the project: http://subversion.apache.org/docs/release-notes/1.7.html#single-db

Anyway, I'll be making some changes to remove markers' priority so that people using multiple VCS'es won't have to put .svn, .bzr, ... in the root_markers option. This option will be reserved for the .root type of markers.

@danielb2
Copy link

danielb2 commented Aug 4, 2012

I've noticed it takes a very long time for me to finish indexing my svn repo, so I tried this with setting root_markers.

Now it takes even longer:

3341 (press ctrl-c to abort) ...

What is this number to the left? I only want it to operate on .php files, of which there are 1927.

@kien kien closed this as completed in 188de26 Aug 6, 2012
@kien
Copy link
Owner

kien commented Aug 6, 2012

@danielb2: The number on the left is the total number of files found until the last directory depth.

How do you tell ctrlp to only search for .php files?

Also, the root_markers option is only for determining the local working directory inside ctrlp, it has no impact on the indexing. Unless of course the new root (with root_markers) is a parent directory of the old root (without root_markers), then the indexing being slower is simply because the parent directory has more files.

P.S. I wasn't ignoring this, btw. For some reason I didn't get any notification for your comment, so I only saw it just now.

@jdan
Copy link

jdan commented Aug 8, 2012

@kien, just curious - why not use the value of :pwd, instead of looking for a .git or .svn folder? I'm currently running into the same issue as @yoopea, where I have .svn folders in every subdirectory, so the fuzzy-finder isn't playing nice.

@kien
Copy link
Owner

kien commented Aug 8, 2012

@prezjordan: It's an optional feature which you can disable. See :help g:ctrlp_working_path_mode.

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

4 participants