Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions doc/ctrlp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,12 @@ variable: >
let g:ctrlp_working_path_mode = 'ra'
<
c - the directory of the current file.
a - like "c", but only applies when the current working directory outside of
CtrlP isn't a direct ancestor of the directory of the current file.
r - the nearest ancestor that contains one of these directories or files:
a - the directory of the current file, unless it is a subdirectory of the cwd
r - the nearest ancestor of the current file that contains one of these
directories or files:
.git .hg .svn .bzr _darcs
w - begin finding a root from the current working directory outside of CtrlP
instead of from the directory of the current file (default). Only applies
when "r" is also present.
w - modifier to "r": start search from the cwd instead of the current file's
directory
0 or <empty> - disable this feature.

Note #1: if "a" or "c" is included with "r", use the behavior of "a" or "c" (as
Expand Down
9 changes: 5 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 fi
let g:ctrlp_working_path_mode = 'ra'
```

`'c'` - use the parent directory of the current file.
`'a'` - use the parent directory of the current file if it is not a descendant of the current working directory outside of CtrlP.
`'r'` - use the nearest ancestor of the current file that contains one of these markers: `.git` `.hg` `.svn` `.bzr` `_darcs`
`0` or `''` (empty string) - use the current working directory outside of CtrlP.
`'c'` - the directory of the current file.
`'a'` - the directory of the current file, unless it is a subdirectory of the cwd
`'r'` - the nearest ancestor of the current file that contains one of these directories or files: `.git` `.hg` `.svn` `.bzr` `_darcs`
`'w'` - modifier to "r": start search from the cwd instead of the current file's directory
`0` or `''` (empty string) - disable this feature.

If none of the default markers (`.git` `.hg` `.svn` `.bzr` `_darcs`) are present in a project, you can define additional ones with `g:ctrlp_root_markers`:

Expand Down