Update docs

This commit is contained in:
Kien N 2012-05-12 18:38:58 +07:00
parent 2826589dc6
commit 369bd81bbd
2 changed files with 17 additions and 17 deletions

View File

@ -734,16 +734,15 @@ c) End the string with a colon ':' followed by a Vim command to execute that
with a backslash: '\:'. When opening multiple files, the command will be with a backslash: '\:'. When opening multiple files, the command will be
executed on each opening file. executed on each opening file.
E.g. Use ':45' to open the selected file and jump to line 45. E.g. Use ':45' to jump to line 45.
Use ':/any\:string' to open the selected file and jump to the first Use ':/any\:string' to jump to the first instance of 'any:string'.
instance of 'any:string'.
Use ':+setf\ myfiletype|50' to open the selected file and set its Use ':+setf\ myfiletype|50' to set the filetype to 'myfiletype', then
filetype to 'myfiletype', then jump to line 50. jump to line 50.
Use ':diffthis' to open the selected files and run |:diffthis| on the Use ':diffthis' when opening multiple files to run |:diffthis| on the
first 4 files (if they have been marked). first 4 files.
See also: Vim's |++opt| and |+cmd|. See also: Vim's |++opt| and |+cmd|.

View File

@ -22,12 +22,13 @@ Once CtrlP is open:
* Press `<c-d>` to switch to filename only search instead of full path. * Press `<c-d>` to switch to filename only search instead of full path.
* Press `<c-r>` to switch to regexp mode. * Press `<c-r>` to switch to regexp mode.
* Press `<F5>` to purge the cache for the current directory and get new files. * Press `<F5>` to purge the cache for the current directory and get new files.
* End the input string with a colon `:` followed by a command to execute it after * End the input string with a colon `:` followed by a command to execute it
opening the file: after opening the file:
Use `:45` to open selected file and jump to line 45. Use `:45` to jump to line 45.
Use `:difft` to open the marked files and run `:difft` on the first 4 files. Use `:/any\:string` to jump to the first instance of `any:string`.
* Submit two dots `..` as the input string to go backward the directory tree by Use `:difft` when opening multiple files to run `:difft` on the first 4 files.
1 level. * Submit two or more dots `.` as the input string to go backward the directory
tree by one or multiple levels.
* Use `<c-y>` to create a new file and its parent dirs. * Use `<c-y>` to create a new file and its parent dirs.
* Use `<c-z>` to mark/unmark multiple files and `<c-o>` to open them. * Use `<c-z>` to mark/unmark multiple files and `<c-o>` to open them.
@ -38,8 +39,8 @@ Use `:difft` to open the marked files and run `:difft` on the first 4 files.
let g:ctrlp_map = '<c-p>' let g:ctrlp_map = '<c-p>'
``` ```
* When invoked, unless a path is specified, CtrlP will automatically set its * When invoked, unless a starting directory is specified, CtrlP will
local working directory according to this variable: automatically set its local working directory according to this variable:
```vim ```vim
let g:ctrlp_working_path_mode = 2 let g:ctrlp_working_path_mode = 2
@ -50,8 +51,8 @@ local working directory according to this variable:
2 - the nearest ancestor that contains one of these directories or files: 2 - the nearest ancestor that contains one of these directories or files:
`.git/` `.hg/` `.svn/` `.bzr/` `_darcs/` `.git/` `.hg/` `.svn/` `.bzr/` `_darcs/`
* If you want to exclude directories or files from the search, use the Vims * To exclude files or directories from the search, use the Vims option
option `wildignore` and/or the option `g:ctrlp_custom_ignore`. Examples: `wildignore` and/or the option `g:ctrlp_custom_ignore`:
```vim ```vim
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux