Update the help text of g:ctrlp_user_command
This commit is contained in:
parent
1c05a664b1
commit
8d50e9fb6e
@ -265,8 +265,10 @@ Examples: >
|
|||||||
<
|
<
|
||||||
You can also use 'grep', 'findstr' or something else to filter the results.
|
You can also use 'grep', 'findstr' or something else to filter the results.
|
||||||
Examples: >
|
Examples: >
|
||||||
let g:ctrlp_user_command = 'find %s -type f | grep (?!tmp/.*)'
|
let g:ctrlp_user_command =
|
||||||
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d | findstr .*\.py$'
|
\ 'find %s -type f | grep -v -P "\.jpg$|/tmp/"' " MacOSX/Linux
|
||||||
|
let g:ctrlp_user_command =
|
||||||
|
\ 'dir %s /-n /b /s /a-d | findstr /v /l ".jpg \\tmp\\"' " Windows
|
||||||
<
|
<
|
||||||
Use a version control listing command when inside a repository, this is faster
|
Use a version control listing command when inside a repository, this is faster
|
||||||
when scanning large projects: >
|
when scanning large projects: >
|
||||||
@ -280,17 +282,29 @@ when scanning large projects: >
|
|||||||
\ 'ignore': 0 or 1
|
\ 'ignore': 0 or 1
|
||||||
\ }
|
\ }
|
||||||
<
|
<
|
||||||
Examples: >
|
Some examples: >
|
||||||
|
" Single VCS, listing command does not list untracked files:
|
||||||
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files']
|
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files']
|
||||||
let g:ctrlp_user_command = ['.hg', 'hg --cwd %s locate -I .']
|
let g:ctrlp_user_command = ['.hg', 'hg --cwd %s locate -I .']
|
||||||
|
|
||||||
|
" Multiple VCS's:
|
||||||
let g:ctrlp_user_command = {
|
let g:ctrlp_user_command = {
|
||||||
\ 'types': {
|
\ 'types': {
|
||||||
\ 1: ['.git', 'cd %s && git ls-files'],
|
\ 1: ['.git', 'cd %s && git ls-files'],
|
||||||
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
|
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
|
||||||
\ },
|
\ },
|
||||||
\ 'fallback': 'find %s -type f',
|
\ 'fallback': 'find %s -type f'
|
||||||
\ 'ignore': 0
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
" Single VCS, listing command lists untracked files (slower):
|
||||||
|
let g:ctrlp_user_command =
|
||||||
|
\ ['.git', 'cd %s && git ls-files . -co --exclude-standard']
|
||||||
|
|
||||||
|
let g:ctrlp_user_command =
|
||||||
|
\ ['.hg', 'hg --cwd %s status -numac -I . $(hg root)'] " MacOSX/Linux
|
||||||
|
|
||||||
|
let g:ctrlp_user_command = ['.hg', 'for /f "tokens=1" %%a in (''hg root'') '
|
||||||
|
\ . 'do hg --cwd %s status -numac -I . %%a'] " Windows
|
||||||
<
|
<
|
||||||
Note #1: if the fallback_command is empty or not defined, |globpath()| will
|
Note #1: if the fallback_command is empty or not defined, |globpath()| will
|
||||||
then be used when searching outside a repo.
|
then be used when searching outside a repo.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user