ctrlp.vim/doc/ctrlp.txt

1257 lines
46 KiB
Plaintext
Raw Normal View History

2012-07-07 22:58:31 -04:00
*ctrlp.txt* Fuzzy file, buffer, mru, tag, ... finder. v1.78
2011-08-21 22:14:00 -04:00
*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
===============================================================================
# #
# :::::::: ::::::::::: ::::::::: ::: ::::::::: #
# :+: :+: :+: :+: :+: :+: :+: :+: #
# +:+ +:+ +:+ +:+ +:+ +:+ +:+ #
# +#+ +#+ +#++:++#: +#+ +#++:++#+ #
# +#+ +#+ +#+ +#+ +#+ +#+ #
# #+# #+# #+# #+# #+# #+# #+# #
# ######## ### ### ### ########## ### #
# #
===============================================================================
CONTENTS *ctrlp-contents*
2011-11-02 19:09:12 -04:00
1. Intro........................................|ctrlp-intro|
2. Options......................................|ctrlp-options|
3. Commands.....................................|ctrlp-commands|
4. Mappings.....................................|ctrlp-mappings|
5. Input Formats................................|ctrlp-input-formats|
6. Extensions...................................|ctrlp-extensions|
2011-11-02 19:09:12 -04:00
2011-08-21 22:14:00 -04:00
===============================================================================
2012-03-01 06:48:03 -05:00
INTRO *ctrlp-intro*
2011-08-21 22:14:00 -04:00
2012-06-14 00:36:21 -04:00
Full path fuzzy file, buffer, mru, tag, ... finder with an intuitive interface.
Written in pure Vimscript for MacVim, gVim and Vim version 7.0+. Has full
support for Vim's |regexp| as search pattern, built-in MRU files monitoring,
project's root finder, and more.
2011-08-21 22:14:00 -04:00
To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|.
2011-08-21 22:14:00 -04:00
===============================================================================
2012-03-01 06:48:03 -05:00
OPTIONS *ctrlp-options*
2011-08-21 22:14:00 -04:00
2012-04-08 14:08:00 -04:00
Overview:~
|loaded_ctrlp| Disable the plugin.
|ctrlp_map| Default mapping.
|ctrlp_cmd| Default command used for the default mapping.
|ctrlp_by_filename| Default to filename mode or not.
|ctrlp_regexp| Default to regexp mode or not.
|ctrlp_match_window_bottom| Where to show the match window.
|ctrlp_match_window_reversed| Sort order in the match window.
|ctrlp_max_height| Max height of the match window.
|ctrlp_switch_buffer| Jump to an open buffer if already opened.
|ctrlp_reuse_window| Reuse special windows (help, quickfix, etc).
|ctrlp_tabpage_position| Where to put the new tab page.
|ctrlp_working_path_mode| How to set CtrlP's local working directory.
2012-04-08 14:08:00 -04:00
|ctrlp_root_markers| Additional, high priority root markers.
|ctrlp_use_caching| Use per-session caching or not.
|ctrlp_clear_cache_on_exit| Keep cache after exiting Vim or not.
|ctrlp_cache_dir| Location of the cache directory.
|ctrlp_dotfiles| Ignore dotfiles and dotdirs or not.
|ctrlp_custom_ignore| Hide stuff when using |globpath()|.
|ctrlp_max_files| Number of files to scan initially.
|ctrlp_max_depth| Directory depth to recurse into when scanning.
|ctrlp_user_command| Use an external scanner.
|ctrlp_max_history| Number of entries saved in the prompt history.
|ctrlp_open_new_file| How to open a file created by <c-y>.
|ctrlp_open_multiple_files| How to open files selected by <c-z>.
|ctrlp_arg_map| Intercept <c-y> and <c-o> or not.
|ctrlp_follow_symlinks| Follow symbolic links or not.
|ctrlp_lazy_update| Only update when typing has stopped.
|ctrlp_default_input| Seed the prompt with an initial string.
|ctrlp_use_migemo| Use Migemo patterns for Japanese filenames.
|ctrlp_prompt_mappings| Change the mappings in the prompt.
2012-04-08 14:08:00 -04:00
MRU mode:
|ctrlp_mruf_max| Max MRU entries to remember.
|ctrlp_mruf_exclude| Files that shouldn't be remembered.
2012-04-08 14:08:00 -04:00
|ctrlp_mruf_include| Files to be remembered.
|ctrlp_mruf_relative| Show only MRU files in the working directory.
|ctrlp_mruf_default_order| Disable sorting.
2012-04-08 14:08:00 -04:00
|ctrlp_mruf_case_sensitive| MRU files are case sensitive or not.
2012-04-08 14:08:00 -04:00
Advanced options:
|ctrlp_open_func| Use custom file opening functions.
|ctrlp_status_func| Change CtrlP's two statuslines.
2012-04-08 14:08:00 -04:00
|ctrlp_buffer_func| Call custom functions in the CtrlP buffer.
|ctrlp_match_func| Replace the built-in matching algorithm.
-------------------------------------------------------------------------------
Detailed descriptions and default values:~
2011-08-21 22:14:00 -04:00
*'g:ctrlp_map'*
2012-03-30 11:22:14 -04:00
Use this option to change the mapping to invoke CtrlP in |Normal| mode: >
2011-08-21 22:14:00 -04:00
let g:ctrlp_map = '<c-p>'
<
*'g:ctrlp_cmd'*
Set the default opening command to use when pressing the above mapping: >
let g:ctrlp_cmd = 'CtrlP'
<
2011-08-21 22:14:00 -04:00
*'g:loaded_ctrlp'*
Use this to disable the plugin completely: >
2011-08-21 22:14:00 -04:00
let g:loaded_ctrlp = 1
<
2011-09-11 12:53:32 -04:00
*'g:ctrlp_by_filename'*
2012-03-31 02:10:12 -04:00
Set this to 1 to set searching by filename (as opposed to full path) as the
default: >
2011-09-11 12:53:32 -04:00
let g:ctrlp_by_filename = 0
<
2012-03-01 06:33:35 -05:00
Can be toggled on/off by pressing <c-d> inside the prompt.
2011-09-11 12:53:32 -04:00
2012-03-01 06:33:35 -05:00
*'g:ctrlp_regexp'*
Set this to 1 to set regexp search as the default: >
2012-03-01 06:33:35 -05:00
let g:ctrlp_regexp = 0
2011-09-11 12:53:32 -04:00
<
2012-03-01 06:33:35 -05:00
Can be toggled on/off by pressing <c-r> inside the prompt.
2011-09-11 12:53:32 -04:00
*'g:ctrlp_match_window_bottom'*
Set this to 0 to show the match window at the top of the screen: >
let g:ctrlp_match_window_bottom = 1
<
2011-08-21 22:14:00 -04:00
*'g:ctrlp_match_window_reversed'*
2012-03-01 06:33:35 -05:00
Change the listing order of the files in the match window. The default setting
(1) is from bottom to top: >
2011-08-21 22:14:00 -04:00
let g:ctrlp_match_window_reversed = 1
<
*'g:ctrlp_max_height'*
Set the maximum height of the match window: >
let g:ctrlp_max_height = 10
<
2012-03-01 06:33:35 -05:00
*'g:ctrlp_switch_buffer'*
When opening a file with <cr> or <c-t>, if the file's already opened somewhere
2012-03-30 11:22:14 -04:00
CtrlP will try to jump to it instead of opening a new instance: >
2012-03-01 06:33:35 -05:00
let g:ctrlp_switch_buffer = 2
<
1 - only jump to the buffer if it's opened in the current tab.
2 - jump tab as well if the buffer's opened in another tab.
0 - disable this feature.
2012-03-03 10:31:50 -05:00
*'g:ctrlp_reuse_window'*
2012-03-30 11:22:14 -04:00
When opening a file with <cr>, CtrlP avoids opening it in windows created by
2012-03-03 10:31:50 -05:00
plugins, help and quickfix. Use this to setup some exceptions: >
let g:ctrlp_reuse_window = 'netrw'
<
Acceptable values are partial name, filetype or buftype of the special buffers.
Use regexp to specify the pattern.
2012-03-03 10:31:50 -05:00
Example: >
let g:ctrlp_reuse_window = 'netrw\|help\|quickfix'
<
*'g:ctrlp_tabpage_position'*
Where to put the new tab page when opening one: >
let g:ctrlp_tabpage_position = 'ac'
<
2012-07-06 22:21:24 -04:00
a - after.
b - before.
c - the current tab page.
l - the last tab page.
f - the first tab page.
2011-08-21 22:14:00 -04:00
*'g:ctrlp_working_path_mode'*
2012-03-30 11:22:14 -04:00
When starting up, CtrlP sets its local working directory according to this
variable: >
let g:ctrlp_working_path_mode = 'rc'
<
c - the directory of the current file.
r - the nearest ancestor that contains one of these directories or files:
2012-06-14 00:36:21 -04:00
.git .hg .svn .bzr _darcs
{empty-string} - don't manage working directory.
Note #1: you can use b:ctrlp_working_path_mode (a |b:var|) to set this option
on a per buffer basis.
Note #2: with both 'r' and 'c' in the option, when a root isn't found, use the
directory of the current file.
2011-08-21 22:14:00 -04:00
2011-09-06 09:03:31 -04:00
*'g:ctrlp_root_markers'*
2012-06-14 00:36:21 -04:00
Use this to set your own root markers in addition to the default ones (.git,
.hg, .svn, .bzr, and _darcs). Your markers will take precedence: >
2011-09-06 09:03:31 -04:00
let g:ctrlp_root_markers = ['']
<
2011-09-10 08:51:49 -04:00
*'g:ctrlp_use_caching'*
Enable/Disable per-session caching: >
2011-09-10 08:51:49 -04:00
let g:ctrlp_use_caching = 1
<
0 - Disable caching.
1 - Enable caching.
n - When bigger than 1, disable caching and use the number as the limit to
enable caching again.
2012-03-30 11:22:14 -04:00
Note: you can quickly purge the cache by pressing <F5> while inside CtrlP.
2011-09-10 14:54:07 -04:00
*'g:ctrlp_clear_cache_on_exit'*
Set this to 0 to enable cross-session caching by not deleting the cache files
upon exiting Vim: >
2011-09-10 14:54:07 -04:00
let g:ctrlp_clear_cache_on_exit = 1
<
2011-09-10 08:51:49 -04:00
2011-08-21 22:14:00 -04:00
*'g:ctrlp_cache_dir'*
Set the directory to store the cache files: >
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp'
2011-08-21 22:14:00 -04:00
<
2011-09-09 20:32:08 -04:00
*'g:ctrlp_dotfiles'*
Set this to 0 if you don't want CtrlP to scan for dotfiles and dotdirs: >
2011-09-09 20:32:08 -04:00
let g:ctrlp_dotfiles = 1
<
*'ctrlp-wildignore'*
You can use Vim's |'wildignore'| to exclude files and directories from the
results.
Examples: >
" Excluding version control directories
2011-09-13 13:17:20 -04:00
set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX
set wildignore+=.git\*,.hg\*,.svn\* " Windows
2011-09-11 18:49:42 -04:00
<
Note #1: the `*/` in front of each directory glob is required.
2011-09-09 20:32:08 -04:00
Note #2: |wildignore| influences the result of |expand()|, |globpath()| and
2012-03-03 10:31:50 -05:00
|glob()| which many plugins use to find stuff on the system (e.g. VCS related
plugins look for .git/, .hg/,... some other plugins look for external *.exe
tools on Windows). So be a little mindful of what you put in your |wildignore|.
2011-10-19 16:58:28 -04:00
*'g:ctrlp_custom_ignore'*
In addition to |'wildignore'|, use this for files and directories you want only
CtrlP to not show. Use regexp to specify the patterns: >
let g:ctrlp_custom_ignore = ''
<
Examples: >
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$',
\ 'file': '\.exe$\|\.so$\|\.dll$',
\ 'link': 'SOME_BAD_SYMBOLIC_LINKS',
\ }
<
Note: ignoring only applies when |globpath()| is used to scan for files.
*'g:ctrlp_max_files'*
The maximum number of files to scan, set to 0 for no limit: >
2012-01-30 11:03:30 -05:00
let g:ctrlp_max_files = 10000
<
*'g:ctrlp_max_depth'*
The maximum depth of a directory tree to recurse into: >
let g:ctrlp_max_depth = 40
<
2011-11-02 19:09:12 -04:00
Note: the larger these values, the more memory Vim uses.
2011-09-11 12:53:32 -04:00
*'g:ctrlp_user_command'*
Specify an external tool to use for listing files instead of using Vim's
|globpath()|. Use %s in place of the target directory: >
2011-09-11 12:53:32 -04:00
let g:ctrlp_user_command = ''
<
Examples: >
2011-09-11 17:26:18 -04:00
let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
<
You can also use 'grep', 'findstr' or something else to filter the results.
Examples: >
let g:ctrlp_user_command = 'find %s -type f | grep (?!tmp/.*)'
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d | findstr .*\.py$'
2011-09-11 12:53:32 -04:00
<
Use a version control listing command when inside a repository, this is faster
when scanning large projects: >
let g:ctrlp_user_command = [root_marker, listing_command, fallback_command]
let g:ctrlp_user_command = {
\ 'types': {
\ 1: [root_marker_1, listing_command_1],
\ n: [root_marker_n, listing_command_n],
\ },
\ 'fallback': fallback_command
\ }
<
Examples: >
2012-06-19 12:45:00 -04:00
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 = {
\ 'types': {
2012-06-19 12:45:00 -04:00
\ 1: ['.git', 'cd %s && git ls-files'],
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
\ },
\ 'fallback': 'find %s -type f'
\ }
<
If the fallback_command is empty or not defined, |globpath()| will then be used
when searching outside a repo.
2011-09-11 12:53:32 -04:00
*'g:ctrlp_max_history'*
2012-03-30 11:22:14 -04:00
The maximum number of input strings you want CtrlP to remember. The default
value mirrors Vim's global |'history'| option: >
let g:ctrlp_max_history = &history
<
Set to 0 to disable prompt's history. Browse the history with <c-n> and <c-p>.
*'g:ctrlp_open_new_file'*
Use this option to specify how the newly created file is to be opened when
pressing <c-y>:
t - in a new tab
h - in a new horizontal split
v - in a new vertical split
r - in the current window
>
let g:ctrlp_open_new_file = 'v'
<
2012-03-01 06:48:03 -05:00
*'g:ctrlp_open_multiple_files'*
If non-zero, this will enable opening multiple files with <c-z> and <c-o>: >
2012-03-01 06:48:03 -05:00
let g:ctrlp_open_multiple_files = 'v'
<
Example: >
let g:ctrlp_open_multiple_files = '2vjr'
<
For the number:
- If given, it'll be used as the maximum number of windows or tabs to create
2012-03-01 06:48:03 -05:00
when opening the files (the rest will be opened as hidden buffers).
- If not given, <c-o> will open all files, each in a new window or new tab.
For the letters:
2012-03-01 06:48:03 -05:00
t - each file in a new tab.
h - each file in a new horizontal split.
v - each file in a new vertical split.
2012-05-14 08:19:08 -04:00
i - all files as hidden buffers.
j - after opening, jump to the first opened tab or window.
2012-06-26 05:08:32 -04:00
r - open the first file in the current window, then the remaining files in
new splits or new tabs depending on which of h, v and t is also present.
*'g:ctrlp_arg_map'*
When this is set to 1, the <c-o> and <c-y> mappings will accept one extra key
as an argument to override their default behavior: >
let g:ctrlp_arg_map = 0
<
Pressing <c-o> or <c-y> will then prompt for a keypress. The key can be:
t - open in tab(s)
h - open in horizontal split(s)
v - open in vertical split(s)
2012-05-31 05:54:54 -04:00
i - open as hidden buffers (for <c-o> only)
c - clear the marked files (for <c-o> only)
r - open in the current window (for <c-y> only)
<esc>, <c-c>, <c-u> - cancel and go back to the prompt.
2012-04-21 15:10:48 -04:00
<cr> - use the default behavior specified with |g:ctrlp_open_new_file| and
|g:ctrlp_open_multiple_files|.
*'g:ctrlp_follow_symlinks'*
If non-zero, CtrlP will follow symbolic links when listing files: >
let g:ctrlp_follow_symlinks = 0
<
0 - don't follow symbolic links.
1 - follow but ignore looped internal symlinks to avoid duplicates.
2 - follow all symlinks indiscriminately.
*'g:ctrlp_lazy_update'*
Set this to 1 to enable the lazy-update feature: only update the match window
after typing's been stopped for a certain amount of time: >
let g:ctrlp_lazy_update = 0
<
If is 1, update after 250ms. If bigger than 1, the number will be used as the
delay time in milliseconds.
*'g:ctrlp_default_input'*
Set this to 1 to enable seeding the prompt with the current file's relative
path: >
let g:ctrlp_default_input = 0
<
Instead of 1 or 0, if the value of the option is a string, it'll be used as-is
as the default input: >
let g:ctrlp_default_input = 'anystring'
<
2011-11-29 23:11:14 -05:00
*'g:ctrlp_use_migemo'*
Set this to 1 to use Migemo Pattern for Japanese filenames. Migemo Search only
works in regexp mode. To split the pattern, separate words with space: >
2011-11-29 23:11:14 -05:00
let g:ctrlp_use_migemo = 0
<
2012-04-08 14:08:00 -04:00
*'g:ctrlp_prompt_mappings'*
Use this to customize the mappings inside CtrlP's prompt to your liking. You
only need to keep the lines that you've changed the values (inside []): >
2012-04-08 14:08:00 -04:00
let g:ctrlp_prompt_mappings = {
\ 'PrtBS()': ['<bs>', '<c-]>'],
\ 'PrtDelete()': ['<del>'],
\ 'PrtDeleteWord()': ['<c-w>'],
\ 'PrtClear()': ['<c-u>'],
\ 'PrtSelectMove("j")': ['<c-j>', '<down>'],
\ 'PrtSelectMove("k")': ['<c-k>', '<up>'],
\ 'PrtSelectMove("t")': ['<Home>', '<kHome>'],
\ 'PrtSelectMove("b")': ['<End>', '<kEnd>'],
\ 'PrtSelectMove("u")': ['<PageUp>', '<kPageUp>'],
\ 'PrtSelectMove("d")': ['<PageDown>', '<kPageDown>'],
\ 'PrtHistory(-1)': ['<c-n>'],
\ 'PrtHistory(1)': ['<c-p>'],
\ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
\ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
\ 'AcceptSelection("t")': ['<c-t>'],
2012-04-08 14:08:00 -04:00
\ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
\ 'ToggleFocus()': ['<s-tab>'],
\ 'ToggleRegex()': ['<c-r>'],
\ 'ToggleByFname()': ['<c-d>'],
\ 'ToggleType(1)': ['<c-f>', '<c-up>'],
\ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
\ 'PrtExpandDir()': ['<tab>'],
\ 'PrtInsert("c")': ['<MiddleMouse>', '<insert>'],
\ 'PrtInsert()': ['<c-\>'],
2012-04-08 14:08:00 -04:00
\ 'PrtCurStart()': ['<c-a>'],
\ 'PrtCurEnd()': ['<c-e>'],
\ 'PrtCurLeft()': ['<c-h>', '<left>', '<c-^>'],
\ 'PrtCurRight()': ['<c-l>', '<right>'],
\ 'PrtClearCache()': ['<F5>'],
2012-04-12 22:58:37 -04:00
\ 'PrtDeleteEnt()': ['<F7>'],
2012-04-08 14:08:00 -04:00
\ 'CreateNewFile()': ['<c-y>'],
\ 'MarkToOpen()': ['<c-z>'],
\ 'OpenMulti()': ['<c-o>'],
\ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
\ }
<
Note: In some terminals, it's not possible to remap <c-h> without also changing
2012-04-08 14:08:00 -04:00
<bs> (|keycodes|). So if pressing <bs> moves the cursor to the left instead of
deleting a char for you, add this to your |.vimrc| to disable the plugin's
2012-04-08 14:08:00 -04:00
default <c-h> mapping: >
let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['<left>', '<c-^>'] }
<
----------------------------------------
MRU mode options:~
*'g:ctrlp_mruf_max'*
Specify the number of recently opened files you want CtrlP to remember: >
let g:ctrlp_mruf_max = 250
<
*'g:ctrlp_mruf_exclude'*
Files you don't want CtrlP to remember. Use regexp to specify the patterns: >
2012-04-08 14:08:00 -04:00
let g:ctrlp_mruf_exclude = ''
<
Examples: >
let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux
let g:ctrlp_mruf_exclude = '^C:\\dev\\tmp\\.*' " Windows
<
*'g:ctrlp_mruf_include'*
And if you want CtrlP to only remember some files, specify them here: >
let g:ctrlp_mruf_include = ''
<
Example: >
let g:ctrlp_mruf_include = '\.py$\|\.rb$'
<
*'g:ctrlp_mruf_relative'*
Set this to 1 to show only MRU files in the current working directory: >
let g:ctrlp_mruf_relative = 0
<
*'g:ctrlp_mruf_default_order'*
Set this to 1 to disable sorting when searching in MRU mode: >
let g:ctrlp_mruf_default_order = 0
<
2012-04-08 14:08:00 -04:00
*'g:ctrlp_mruf_case_sensitive'*
Match this with your file system case-sensitivity setting to avoid duplicate
MRU entries: >
let g:ctrlp_mruf_case_sensitive = 1
<
----------------------------------------
Advanced options:~
2012-04-07 07:42:31 -04:00
*'g:ctrlp_open_func'*
Define a custom function to open the selected file: >
let g:ctrlp_open_func = {}
<
Example: >
let g:ctrlp_open_func = {
\ 'files' : 'Function_Name_1',
\ 'buffers' : 'Function_Name_2',
\ 'mru files' : 'Function_Name_3',
\ }
<
Structure of the functions: >
function! Function_Name(action, line)
" Arguments:
" |
" +- a:action : The opening action:
" | + 'e' : user pressed <cr> (default)
" | + 'h' : user pressed <c-x> (default)
" | + 'v' : user pressed <c-v> (default)
" | + 't' : user pressed <c-t> (default)
" | + 'x' : user used the <c-o> console dialog (default) and
" | chose "e[x]ternal".
" |
" +- a:line : The selected line.
endfunction
<
Note: does not apply when opening multiple files with <c-z> and <c-o>.
Example: open HTML files in the default web browser when <c-t> is pressed and
in Vim otherwise >
function! HTMLOpenFunc(action, line)
if a:action =~ '^[tx]$' && fnamemodify(a:line, ':e') =~? '^html\?$'
" Get the filename
let filename = fnameescape(fnamemodify(a:line, ':p'))
" Close CtrlP
call ctrlp#exit()
" Open the file
silent! execute '!xdg-open' filename
elseif a:action == 'x' && fnamemodify(a:line, ':e') !~? '^html\?$'
" Not a HTML file, simulate pressing <c-o> again and wait for new input
call feedkeys("\<c-o>")
else
" Use CtrlP's default file opening function
call call('ctrlp#acceptfile', [a:action, a:line])
endif
endfunction
let g:ctrlp_open_func = { 'files': 'HTMLOpenFunc' }
<
*'g:ctrlp_status_func'*
2012-03-30 11:22:14 -04:00
Use this to customize the statuslines for the CtrlP window: >
let g:ctrlp_status_func = {}
<
Example: >
let g:ctrlp_status_func = {
\ 'main': 'Function_Name_1',
\ 'prog': 'Function_Name_2',
\ }
<
2012-03-11 21:58:01 -04:00
Structure of the functions: >
2012-03-28 21:53:30 -04:00
" Main statusline
2012-03-11 21:58:01 -04:00
function! Function_Name_1(focus, byfname, regex, prev, item, next, marked)
2012-03-15 16:13:12 -04:00
" Arguments:
2012-03-11 21:58:01 -04:00
" |
2012-03-15 16:13:12 -04:00
" +- a:focus : The focus of the prompt: "prt" or "win".
" |
" +- a:byfname : In filename mode or in full path mode: "file" or "path".
" |
" +- a:regex : In regex mode: 1 or 0.
" |
" +- a:prev : The previous search mode.
" |
" +- a:item : The current search mode.
" |
" +- a:next : The next search mode.
" |
" +- a:marked : The number of marked files, or a comma separated list of
2012-05-20 00:55:53 -04:00
" the marked filenames.
2012-03-11 21:58:01 -04:00
return full_statusline
endfunction
2012-03-28 21:53:30 -04:00
" Progress statusline
2012-03-11 21:58:01 -04:00
function! Function_Name_2(str)
2012-03-15 16:13:12 -04:00
" a:str : Either the number of files scanned so far, or a string indicating
" the current directory is being scanned with a user_command.
2012-03-11 21:58:01 -04:00
return full_statusline
endfunction
<
See https://gist.github.com/1610859 for a working example.
2012-04-07 07:42:31 -04:00
*'g:ctrlp_buffer_func'*
Specify the functions that will be called after entering and before exiting the
CtrlP buffer: >
let g:ctrlp_buffer_func = {}
<
Example: >
let g:ctrlp_buffer_func = {
\ 'enter': 'Function_Name_1',
\ 'exit': 'Function_Name_2',
\ }
<
2012-03-11 21:58:01 -04:00
*'g:ctrlp_match_func'*
2012-03-30 11:22:14 -04:00
Set an external fuzzy matching function for CtrlP to use: >
2012-03-11 21:58:01 -04:00
let g:ctrlp_match_func = {}
<
Example: >
let g:ctrlp_match_func = { 'match': 'Function_Name' }
<
Structure of the function: >
function! Function_Name(items, str, limit, mmode, ispath, crfile, regex)
2012-03-15 16:13:12 -04:00
" Arguments:
" |
" +- a:items : The full list of items to search in.
" |
" +- a:str : The string entered by the user.
" |
" +- a:limit : The max height of the match window. Can be used to limit
" | the number of items to return.
" |
" +- a:mmode : The match mode. Can be one of these strings:
" | + "full-line": match the entire line.
" | + "filename-only": match only the filename.
" | + "first-non-tab": match until the first tab char.
" | + "until-last-tab": match until the last tab char.
" |
2012-05-20 00:55:53 -04:00
" +- a:ispath : Is 1 when searching in file, buffer, mru, mixed, dir, and
" | rtscript modes. Is 0 otherwise.
2012-03-15 16:13:12 -04:00
" |
" +- a:crfile : The file in the current window. Should be excluded from the
" | results when a:ispath == 1.
2012-03-11 21:58:01 -04:00
" |
2012-03-15 16:13:12 -04:00
" +- a:regex : In regex mode: 1 or 0.
2012-03-11 21:58:01 -04:00
return list_of_matched_items
endfunction
<
2011-08-21 22:14:00 -04:00
===============================================================================
2012-03-01 06:48:03 -05:00
COMMANDS *ctrlp-commands*
2011-08-21 22:14:00 -04:00
*:CtrlP*
2011-09-11 17:26:18 -04:00
:CtrlP [starting-directory]
2012-03-30 11:22:14 -04:00
Open CtrlP in find file mode.
2011-09-11 12:53:32 -04:00
If no argument is given, the value of |g:ctrlp_working_path_mode| will be
2011-09-12 21:27:27 -04:00
used to determine the starting directory.
2012-05-20 00:55:53 -04:00
2011-11-02 19:09:12 -04:00
You can use <tab> to auto-complete the [starting-directory] when typing it.
2011-09-05 07:05:04 -04:00
*:CtrlPBuffer*
:CtrlPBuffer
2012-03-30 11:22:14 -04:00
Open CtrlP in find buffer mode.
*:CtrlPMRU*
:CtrlPMRU
2012-03-30 11:22:14 -04:00
Open CtrlP in find Most-Recently-Used file mode.
2011-08-21 22:14:00 -04:00
*:CtrlPLastMode*
:CtrlPLastMode
Open CtrlP in the last mode used.
2012-04-16 18:10:29 -04:00
*:CtrlPRoot*
:CtrlPRoot
This acts like |:CtrlP| with |g:ctrlp_working_path_mode| = 'rc' and ignores
the variable's current value.
2012-04-16 18:10:29 -04:00
*:CtrlPClearCache*
:CtrlPClearCache
Flush the cache for the current working directory. The same as pressing <F5>
2012-03-30 11:22:14 -04:00
inside CtrlP.
2012-04-16 18:10:29 -04:00
To enable or disable caching, use the |g:ctrlp_use_caching| option.
2011-08-21 22:14:00 -04:00
*:CtrlPClearAllCaches*
:CtrlPClearAllCaches
2012-05-20 00:55:53 -04:00
Delete all the cache files saved in |g:ctrlp_cache_dir| location.
2011-08-21 22:14:00 -04:00
2012-04-08 14:08:00 -04:00
-------------------------------------------------------------------------------
For commands provided by bundled extensions, see |ctrlp-extensions|.
2011-08-21 22:14:00 -04:00
===============================================================================
2012-03-01 06:48:03 -05:00
MAPPINGS *ctrlp-mappings*
2011-08-21 22:14:00 -04:00
*'ctrlp-<c-p>'*
<c-p>
2012-03-30 11:22:14 -04:00
Default |Normal| mode mapping to open the CtrlP prompt in find file mode.
2011-08-21 22:14:00 -04:00
2012-05-05 08:30:08 -04:00
----------------------------------------
Once inside the prompt:~
2011-08-21 22:14:00 -04:00
2012-03-31 02:10:12 -04:00
<c-d>
Toggle between full-path search and filename only search.
Note: in filename mode, the prompt's base is '>d>' instead of '>>>'
2012-03-31 02:10:12 -04:00
2011-08-21 22:14:00 -04:00
<c-r> *'ctrlp-fullregexp'*
Toggle between the string mode and full regexp mode.
Note: in full regexp mode, the prompt's base is 'r>>' instead of '>>>'
2011-08-21 22:14:00 -04:00
2012-05-08 04:13:24 -04:00
See also: |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
2011-08-21 22:14:00 -04:00
<c-f>, 'forward'
<c-up>
Scroll to the 'next' search mode in the sequence.
<c-b>, 'backward'
<c-down>
Scroll to the 'previous' search mode in the sequence.
2011-09-05 07:05:04 -04:00
2012-05-05 08:30:08 -04:00
<tab> *'ctrlp-autocompletion'*
Auto-complete directory names under the current working directory inside
the prompt.
<s-tab>
2011-09-05 10:59:18 -04:00
Toggle the focus between the match window and the prompt.
2012-05-05 08:30:08 -04:00
<esc>,
<c-c>
Exit CtrlP.
2012-05-20 00:55:53 -04:00
Moving:~
2012-05-05 08:30:08 -04:00
2011-08-21 22:14:00 -04:00
<c-j>,
<down>
Move selection down.
2011-08-21 22:14:00 -04:00
<c-k>,
<up>
Move selection up.
2011-08-21 22:14:00 -04:00
<c-a>
Move the cursor to the 'start' of the prompt.
2011-08-21 22:14:00 -04:00
<c-e>
Move the cursor to the 'end' of the prompt.
2011-08-21 22:14:00 -04:00
<c-h>,
<left>,
<c-^>
Move the cursor one character to the 'left'.
2011-08-21 22:14:00 -04:00
<c-l>,
<right>
Move the cursor one character to the 'right'.
2011-08-21 22:14:00 -04:00
2012-05-05 08:30:08 -04:00
Editing:~
<c-]>,
<bs>
Delete the preceding character.
<del>
Delete the current character.
2011-08-21 22:14:00 -04:00
<c-w>
Delete a preceding inner word.
2011-08-21 22:14:00 -04:00
<c-u>
Clear the input field.
2011-08-21 22:14:00 -04:00
2012-05-20 00:55:53 -04:00
Browsing input history:~
2012-05-05 08:30:08 -04:00
<c-n>
2012-05-08 04:13:24 -04:00
Next string in the prompt's history.
2012-05-05 08:30:08 -04:00
<c-p>
2012-05-08 04:13:24 -04:00
Previous string in the prompt's history.
2012-05-05 08:30:08 -04:00
2012-05-20 00:55:53 -04:00
Opening/Creating a file:~
2012-05-05 08:30:08 -04:00
2011-08-21 22:14:00 -04:00
<cr>
2012-05-20 00:55:53 -04:00
Open the selected file in the 'current' window if possible.
2011-08-21 22:14:00 -04:00
<c-t>
Open the selected file in a new 'tab'.
2011-08-21 22:14:00 -04:00
<c-v>
2012-05-20 00:55:53 -04:00
Open the selected file in a 'vertical' split.
2011-08-21 22:14:00 -04:00
2012-03-31 02:10:12 -04:00
<c-x>,
2011-08-21 22:14:00 -04:00
<c-cr>,
2012-03-31 02:10:12 -04:00
<c-s>
2012-05-20 00:55:53 -04:00
Open the selected file in a 'horizontal' split.
2011-08-21 22:14:00 -04:00
<c-y>
Create a new file and its parent directories.
2012-05-20 00:55:53 -04:00
Opening multiple files:~
<c-z>
- Mark/unmark a file to be opened with <c-o>.
2012-05-05 08:30:08 -04:00
- Mark/unmark a file to create a new file in its directory using <c-y>.
<c-o>
Open files marked by <c-z>.
2012-05-05 08:30:08 -04:00
Function keys:~
2011-09-08 11:50:57 -04:00
<F5>
- Refresh the match window and purge the cache for the current directory.
2012-05-05 08:30:08 -04:00
- Remove deleted files from the MRU list.
2011-09-08 11:50:57 -04:00
<F7>
2012-03-31 02:10:12 -04:00
- Wipe the MRU list.
2012-05-05 08:30:08 -04:00
- Delete MRU entries marked by <c-z>.
2012-05-05 08:30:08 -04:00
Pasting:~
<Insert>, *'ctrlp-pasting'*
2012-05-01 16:12:14 -04:00
<MiddleMouse>
2012-05-05 08:30:08 -04:00
Paste the clipboard content into the prompt.
2012-05-01 16:12:14 -04:00
<c-\>
Open a console dialog to paste <cword>, <cfile>, the content of the search
2012-05-10 09:55:06 -04:00
register, the last visual selection, the clipboard or any register into the
prompt.
2011-08-21 22:14:00 -04:00
Choose your own mappings with |g:ctrlp_prompt_mappings|.
2011-08-21 22:14:00 -04:00
2012-05-05 08:30:08 -04:00
----------------------------------------
When inside the match window (press <s-tab> to switch):~
2011-09-11 12:53:32 -04:00
a-z
0-9
~^-=;`',.+!@#$%&_(){}[]
Cycle through the lines which have the matching first character.
2011-09-11 12:53:32 -04:00
2011-08-21 22:14:00 -04:00
===============================================================================
2012-03-01 06:48:03 -05:00
INPUT FORMATS *ctrlp-input-formats*
2011-08-21 22:14:00 -04:00
Formats for inputting in the prompt:~
2011-08-21 22:14:00 -04:00
2011-11-02 19:09:12 -04:00
a) Simple string.
2012-03-31 02:10:12 -04:00
E.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c'
2011-08-21 22:14:00 -04:00
b) When in regexp mode, the input string's treated as a Vim's regexp |pattern|
without any modification.
2012-03-31 02:10:12 -04:00
E.g. 'abc\d*efg' will be read as 'abc\d*efg'.
2011-08-21 22:14:00 -04:00
See |ctrlp-fullregexp| (keymap) and |g:ctrlp_regexp_search| (option) for
how to enable regexp mode.
2011-08-21 22:14:00 -04:00
c) End the string with a colon ':' followed by a Vim command to execute that
command after opening the file. If you need to use ':' literally, escape it
with a backslash: '\:'. When opening multiple files, the command will be
executed on each opening file.
2012-03-31 02:10:12 -04:00
2012-05-12 07:38:58 -04:00
E.g. Use ':45' to jump to line 45.
2012-03-31 02:10:12 -04:00
2012-05-12 07:38:58 -04:00
Use ':/any\:string' to jump to the first instance of 'any:string'.
2012-03-31 02:10:12 -04:00
2012-05-12 07:38:58 -04:00
Use ':+setf\ myfiletype|50' to set the filetype to 'myfiletype', then
jump to line 50.
2012-03-31 02:10:12 -04:00
2012-05-12 07:38:58 -04:00
Use ':diffthis' when opening multiple files to run |:diffthis| on the
first 4 files.
2012-05-08 04:13:24 -04:00
See also: Vim's |++opt| and |+cmd|.
2011-09-05 10:59:18 -04:00
2012-06-14 00:36:21 -04:00
d) Submit two dots '..' to go upward the directory tree by 1 level. To go up
multiple levels, use one extra dot for each extra level:
2012-05-09 22:11:09 -04:00
>
Raw input Interpreted as
.. ../
... ../../
.... ../../../
<
Note: if the parent directories are large and uncached, this can be slow.
2012-05-09 21:04:05 -04:00
You can also use '@cd path/' to change CtrlP's local working directory.
Use '@cd %:h' to change to the directory of the current file.
e) Similarly, submit '/' or '\' to find and go to the project's root.
If the project is large, using a VCS listing command to look for files
might help speeding up the intial scan (see |g:ctrlp_user_command| for more
details).
2012-05-20 00:55:53 -04:00
Note: d) and e) only work in file, directory and mixed modes.
f) Type the name of a non-existent file and press <c-y> to create it. Mark a
file with <c-z> to create the new file in the same directory as the marked
file.
2012-03-31 02:10:12 -04:00
2012-05-08 04:13:24 -04:00
E.g. Using 'newdir/newfile.txt' will create a directory named 'newdir' as
well as a file named 'newfile.txt'.
2012-03-31 02:10:12 -04:00
2012-05-08 04:13:24 -04:00
If an entry 'some/old/dirs/oldfile.txt' is marked with <c-z>, then
'newdir' and 'newfile.txt' will be created under 'some/old/dirs'. The
final path will then be 'some/old/dirs/newdir/newfile.txt'.
2012-03-31 02:10:12 -04:00
2012-05-08 04:13:24 -04:00
Note: use '\' in place of '/' on Windows (if |'shellslash'| is not set).
2012-05-09 21:39:07 -04:00
g) In filename mode (toggle with <c-d>), you can use one primary pattern and
one refining pattern separated by a semicolon. Both patterns work like (a),
or (b) when in regexp mode.
h) Submit ? to open this help file.
2011-10-08 10:42:18 -04:00
===============================================================================
2012-04-08 14:08:00 -04:00
EXTENSIONS *ctrlp-extensions*
Extensions are optional. To enable an extension, add its name to the variable
g:ctrlp_extensions: >
2012-03-15 16:13:12 -04:00
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript',
\ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir']
<
The order of the items will be the order they appear on the statusline and when
using <c-f>, <c-b>.
Available extensions:~
*:CtrlPTag*
* Tag mode:~
- Name: 'tag'
- Command: ':CtrlPTag'
- Search for a tag within a generated central tags file, and jump to the
definition. Use the Vim's option |'tags'| to specify the names and the
2012-03-31 02:10:12 -04:00
locations of the tags file(s).
E.g. set tags+=doc/tags
*:CtrlPBufTag*
*:CtrlPBufTagAll*
* Buffer Tag mode:~
- Name: 'buffertag'
- Commands: ':CtrlPBufTag [buffer]',
':CtrlPBufTagAll'.
2012-03-12 04:34:40 -04:00
- Search for a tag within the current buffer or all listed buffers and jump
to the definition. Requires |exuberant_ctags| or compatible programs.
*:CtrlPQuickfix*
* Quickfix mode:~
- Name: 'quickfix'
- Command: ':CtrlPQuickfix'
- Search for an entry in the current quickfix errors and jump to it.
*:CtrlPDir*
* Directory mode:~
- Name: 'dir'
- Command: ':CtrlPDir [starting-directory]'
- Search for a directory and change the working directory to it.
- Mappings:
2012-03-30 11:22:14 -04:00
+ <cr> change the local working directory for CtrlP and keep it open.
+ <c-t> change the global working directory (exit).
+ <c-v> change the local working directory for the current window (exit).
+ <c-x> change the global working directory to CtrlP's current local
working directory (exit).
*:CtrlPRTS*
* Runtime script mode:~
- Name: 'rtscript'
- Command: ':CtrlPRTS'
- Search for files (vimscripts, docs, snippets...) in runtimepath.
2012-03-12 04:34:40 -04:00
*:CtrlPUndo*
* Undo mode:~
- Name: 'undo'
- Command: ':CtrlPUndo'
2012-03-24 00:58:01 -04:00
- Browse undo history.
2012-03-12 04:34:40 -04:00
*:CtrlPLine*
* Line mode:~
- Name: 'line'
- Command: ':CtrlPLine'
2012-03-13 05:20:56 -04:00
- Search for a line in all listed buffers.
2012-03-12 04:34:40 -04:00
*:CtrlPChange*
*:CtrlPChangeAll*
* Change list mode:~
- Name: 'changes'
- Commands: ':CtrlPChange [buffer]',
2012-03-12 04:34:40 -04:00
':CtrlPChangeAll'.
- Search for and jump to a recent change in the current buffer or in all
listed buffers.
*:CtrlPMixed*
* Mixed mode:~
- Name: 'mixed'
- Command: ':CtrlPMixed'
2012-04-08 11:56:07 -04:00
- Search in files, buffers and MRU files at the same time.
*:CtrlPBookmarkDir*
*:CtrlPBookmarkDirAdd*
* BookmarkDir mode:~
- Name: 'bookmarkdir'
- Commands: ':CtrlPBookmarkDir',
':CtrlPBookmarkDirAdd [directory]'.
- Search for a bookmarked directory and change the working directory to it.
- Mappings:
+ <cr> change the local working directory for CtrlP, keep it open and
switch to find file mode.
+ <c-x> change the global working directory (exit).
+ <c-v> change the local working directory for the current window (exit).
+ <F7>
- Wipe bookmark list.
2012-05-09 21:39:07 -04:00
- Delete entries marked by <c-z>.
2012-04-16 18:10:29 -04:00
----------------------------------------
Buffer Tag mode options:~
*'g:ctrlp_buftag_ctags_bin'*
If ctags isn't in your $PATH, use this to set its location: >
let g:ctrlp_buftag_ctags_bin = ''
<
*'g:ctrlp_buftag_systemenc'*
Match this with your OS's encoding (not Vim's). The default value mirrors Vim's
global |'encoding'| option: >
let g:ctrlp_buftag_systemenc = &encoding
<
*'g:ctrlp_buftag_types'*
Use this to set the arguments for ctags, jsctags... for a given filetype: >
let g:ctrlp_buftag_types = ''
<
Examples: >
let g:ctrlp_buftag_types = {
\ 'erlang' : '--language-force=erlang --erlang-types=drmf',
\ 'javascript' : {
\ 'bin': 'jsctags',
\ 'args': '-f -',
\ },
\ }
<
===============================================================================
CUSTOMIZATION *ctrlp-customization*
Highlighting:~
2012-03-30 11:22:14 -04:00
* For the CtrlP buffer:
2012-02-05 04:13:52 -05:00
CtrlPNoEntries : the message when no match is found (Error)
CtrlPMatch : the matched pattern (Identifier)
CtrlPLinePre : the line prefix '>' in the match window
CtrlPPrtBase : the prompt's base (Comment)
CtrlPPrtText : the prompt's text (|hl-Normal|)
CtrlPPrtCursor : the prompt's cursor when moving over the text (Constant)
* In extensions:
CtrlPTabExtra : the part of each line that's not matched against (Comment)
2012-03-13 05:20:56 -04:00
CtrlPBufName : the buffer name an entry belongs to (|hl-Directory|)
CtrlPTagKind : the kind of the tag in buffer-tag mode (|hl-Title|)
CtrlPqfLineCol : the line and column numbers in quickfix mode (Comment)
2012-03-15 16:13:12 -04:00
CtrlPUndoT : the elapsed time in undo mode (|hl-Directory|)
CtrlPUndoBr : the square brackets [] in undo mode (Comment)
CtrlPUndoNr : the undo number inside [] in undo mode (String)
CtrlPUndoSv : the point where the file was saved (Comment)
CtrlPUndoPo : the current position in the undo tree (|hl-Title|)
CtrlPBookmark : the name of the bookmark (Identifier)
Statuslines:~
* Highlight groups:
2012-02-05 04:13:52 -05:00
CtrlPMode1 : 'prt' or 'win', also for 'regex' (Character)
CtrlPMode2 : 'file' or 'path', also for the local working dir (|hl-LineNr|)
CtrlPStats : the scanning status (Function)
2012-02-05 04:13:52 -05:00
For rebuilding the statuslines, see |g:ctrlp_status_func|.
===============================================================================
2012-03-01 06:48:03 -05:00
MISCELLANEOUS CONFIGS *ctrlp-miscellaneous-configs*
2012-05-14 08:25:47 -04:00
* Using |wildignore| for |g:ctrlp_user_command|:
>
function! s:wig2cmd()
" Change wildignore into space or | separated groups
" e.g. .aux .out .toc .jpg .bmp .gif
" or .aux$\|.out$\|.toc$\|.jpg$\|.bmp$\|.gif$
let pats = ['[*\/]*\([?_.0-9A-Za-z]\+\)\([*\/]*\)\(\\\@<!,\|$\)','\\\@<!,']
let subs = has('win32') || has('win64') ? ['\1\3', ' '] : ['\1\2\3', '\\|']
let expr = substitute(&wig, pats[0], subs[0], 'g')
let expr = substitute(expr, pats[1], subs[1], 'g')
let expr = substitute(expr, '\\,', ',', 'g')
" Set the user_command option
let g:ctrlp_user_command = has('win32') || has('win64')
\ ? 'dir %s /-n /b /s /a-d | findstr /V /l "'.expr.'"'
\ : 'find %s -type f | grep -v "'.expr .'"'
endfunction
call s:wig2cmd()
<
(submitted by Rich Alesi <github.com/ralesi>)
* A standalone function to set the working directory to the project's root, or
to the parent directory of the current file if a root can't be found:
>
function! s:setcwd()
let cph = expand('%:p:h', 1)
2012-05-31 00:15:04 -04:00
if cph =~ '^.\+://' | retu | en
for mkr in ['.git/', '.hg/', '.svn/', '.bzr/', '_darcs/', '.vimprojects']
let wd = call('find'.(mkr =~ '/$' ? 'dir' : 'file'), [mkr, cph.';'])
if wd != '' | let &acd = 0 | brea | en
endfo
exe 'lc!' fnameescape(wd == '' ? cph : substitute(wd, mkr.'$', '.', ''))
endfunction
autocmd BufEnter * call s:setcwd()
<
(requires Vim 7.1.299+)
2012-05-14 08:25:47 -04:00
* Using a |count| to invoke different commands using the same mapping:
>
let g:ctrlp_cmd = 'exe "CtrlP".get(["", "Buffer", "MRU"], v:count)'
<
===============================================================================
CREDITS *ctrlp-credits*
2011-08-21 22:14:00 -04:00
2012-01-30 11:03:30 -05:00
Developed by Kien Nguyen <github.com/kien>.
2011-08-21 22:14:00 -04:00
Project's homepage: http://kien.github.com/ctrlp.vim
2011-09-05 07:21:42 -04:00
Git repository: https://github.com/kien/ctrlp.vim
Mercurial repository: https://bitbucket.org/kien/ctrlp.vim
2011-08-21 22:14:00 -04:00
2012-01-30 11:03:30 -05:00
-------------------------------------------------------------------------------
Thanks to everyone that has submitted ideas, bug reports or helped debugging on
gibhub, bitbucket, and through email.
Special thanks:~
* Woojong Koh <github.com/wjkoh>
* Simon Ruderich
2012-03-03 18:18:04 -05:00
* Yasuhiro Matsumoto <github.com/mattn>
* Ken Earley <github.com/kenearley>
2012-03-03 18:18:04 -05:00
* Kyo Nagashima <github.com/hail2u>
* Zak Johnson <github.com/zakj>
* Diego Viola <github.com/diegoviola>
2012-03-03 18:18:04 -05:00
* Piet Delport <github.com/pjdelport>
* Thibault Duplessis <github.com/ornicar>
2012-03-03 18:18:04 -05:00
* Kent Sibilev <github.com/datanoise>
2012-02-12 06:50:15 -05:00
* Tacahiroy <github.com/tacahiroy>
2012-03-03 18:18:04 -05:00
* Luca Pette <github.com/lucapette>
2012-05-01 16:12:14 -04:00
* Seth Fowler <github.com/sfowler>
* Lowe Thiderman <github.com/thiderman>
===============================================================================
CHANGELOG *ctrlp-changelog*
2011-11-02 19:09:12 -04:00
+ New options: |g:ctrlp_open_func|.
|g:ctrlp_tabpage_position|.
2012-06-14 00:36:21 -04:00
Before 2012/06/15~
+ New value for |g:ctrlp_follow_symlinks|: 2.
+ New value for |g:ctrlp_open_multiple_files|: 'j'.
+ Allow using <c-t>, <c-x>, <c-v> to open files marked by <c-z>.
2012-05-09 22:11:09 -04:00
+ Extend '..' (|ctrlp-input-formats| (d))
2012-05-09 21:04:05 -04:00
+ New input format: '@cd' (|ctrlp-input-formats| (d))
2012-05-05 08:30:08 -04:00
Before 2012/04/30~
+ New option: |g:ctrlp_mruf_default_order|
+ New feature: Bookmarked directories extension.
+ New commands: |:CtrlPBookmarkDir|
|:CtrlPBookmarkDirAdd|
2012-04-08 11:56:07 -04:00
Before 2012/04/15~
2012-04-07 07:42:31 -04:00
+ New option: |g:ctrlp_buffer_func|, callback functions for CtrlP buffer.
2012-04-06 20:58:44 -04:00
+ Remove: g:ctrlp_mruf_last_entered, make it a default for MRU mode.
+ New commands: |:CtrlPLastMode|, open CtrlP in the last mode used.
2012-04-06 20:58:44 -04:00
|:CtrlPMixed|, search in files, buffers and MRU files.
Before 2012/03/31~
2012-03-28 21:53:30 -04:00
2012-04-07 07:42:31 -04:00
+ New options: |g:ctrlp_default_input|, default input when entering CtrlP.
|g:ctrlp_match_func|, allow using a custom fuzzy matcher.
2012-03-01 06:48:03 -05:00
+ Rename:
2012-03-03 13:53:34 -05:00
*ClearCtrlPCache* -> |CtrlPClearCache|
*ClearAllCtrlPCaches* -> |CtrlPClearAllCaches|
*ResetCtrlP* -> |CtrlPReload|
2012-03-03 18:18:04 -05:00
Before 2012/03/02~
+ Rename:
2012-03-01 06:48:03 -05:00
*g:ctrlp_regexp_search* -> |g:ctrlp_regexp|,
*g:ctrlp_dont_split* -> |g:ctrlp_reuse_window|,
*g:ctrlp_jump_to_buffer* -> |g:ctrlp_switch_buffer|.
+ Rename and tweak:
*g:ctrlp_open_multi* -> |g:ctrlp_open_multiple_files|.
+ Deprecate *g:ctrlp_highlight_match*
+ Extend |g:ctrlp_user_command| to support multiple commands.
2012-03-01 06:48:03 -05:00
+ New option: |g:ctrlp_mruf_last_entered| change MRU to Recently-Entered.
Before 2012/01/15~
+ New mapping: Switch <tab> and <s-tab>. <tab> is now used for completion
of directory names under the current working directory.
+ New options: |g:ctrlp_arg_map| for <c-y>, <c-o> to accept an argument.
|g:ctrlp_status_func| custom statusline.
|g:ctrlp_mruf_relative| show only MRU files inside cwd.
2012-03-01 06:48:03 -05:00
+ Extend g:ctrlp_open_multi with new optional values: tr, hr, vr.
+ Extend |g:ctrlp_custom_ignore| to specifically filter dir, file and link.
Before 2012/01/05~
+ New feature: Buffer Tag extension.
+ New commands: |:CtrlPBufTag|, |:CtrlPBufTagAll|.
+ New options: |g:ctrlp_cmd|,
|g:ctrlp_custom_ignore|
Before 2011/11/30~
+ New features: Tag, Quickfix and Directory extensions.
+ New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|.
2011-11-29 23:11:14 -05:00
+ New options: |g:ctrlp_use_migemo|,
|g:ctrlp_lazy_update|,
|g:ctrlp_follow_symlinks|
Before 2011/11/13~
2012-03-01 06:48:03 -05:00
+ New special input: '/' and '\' find root (|ctrlp-input-formats| (e))
+ Remove ctrlp#SetWorkingPath().
2012-03-01 06:48:03 -05:00
+ Remove *g:ctrlp_mru_files* and make MRU mode permanent.
+ Extend g:ctrlp_open_multi, add new ways to open files.
+ New option: g:ctrlp_dont_split,
|g:ctrlp_mruf_case_sensitive|
Before 2011/10/30~
2011-11-02 19:09:12 -04:00
+ New feature: Support for custom extensions.
<F5> also removes non-existent files from MRU list.
2012-03-01 06:48:03 -05:00
+ New option: g:ctrlp_jump_to_buffer
Before 2011/10/12~
2011-10-19 08:00:08 -04:00
+ New features: Open multiple files.
Pass Vim's |++opt| and |+cmd| to the opening file
2012-03-01 06:48:03 -05:00
(|ctrlp-input-formats| (c))
Auto-complete each dir for |:CtrlP| [starting-directory]
+ New mappings: <c-z> mark/unmark a file to be opened with <c-o>.
<c-o> open all marked files.
2012-03-01 06:48:03 -05:00
+ New option: g:ctrlp_open_multi
+ Remove *g:ctrlp_persistent_input* *g:ctrlp_live_update* and <c-^>.
Before 2011/09/29~
+ New mappings: <c-n>, <c-p> next/prev string in the input history.
<c-y> create a new file and its parent dirs.
+ New options: |g:ctrlp_open_new_file|,
|g:ctrlp_max_history|
2011-09-28 09:42:52 -04:00
+ Added a new open-in-horizontal-split mapping: <c-x>
Before 2011/09/19~
2011-09-28 09:42:52 -04:00
2012-03-03 13:53:34 -05:00
+ New command: ResetCtrlP
+ New options: |g:ctrlp_max_files|,
|g:ctrlp_max_depth|,
2012-03-01 06:48:03 -05:00
g:ctrlp_live_update
+ New mapping: <c-^>
Before 2011/09/12~
2011-09-12 21:27:27 -04:00
2011-09-11 12:53:32 -04:00
+ Ability to cycle through matched lines in the match window.
2012-03-01 06:48:03 -05:00
+ Extend the behavior of g:ctrlp_persistent_input
+ Extend the behavior of |:CtrlP|
+ New options: |g:ctrlp_dotfiles|,
|g:ctrlp_clear_cache_on_exit|,
2012-03-01 06:48:03 -05:00
g:ctrlp_highlight_match,
|g:ctrlp_user_command|
2012-03-01 06:48:03 -05:00
+ New special input: '..' (|ctrlp-input-formats| (d))
2011-09-08 11:50:57 -04:00
+ New mapping: <F5>.
+ New commands: |:CtrlPCurWD|,
|:CtrlPCurFile|,
|:CtrlPRoot|
2011-09-08 11:50:57 -04:00
+ New feature: Search in most recently used (MRU) files
+ New mapping: <c-b>.
+ Extended the behavior of <c-f>.
2012-03-01 06:48:03 -05:00
+ New options: g:ctrlp_mru_files,
|g:ctrlp_mruf_max|,
|g:ctrlp_mruf_exclude|,
|g:ctrlp_mruf_include|
2012-02-23 13:19:44 -05:00
+ New command: |:CtrlPMRU|
First public release: 2011/09/06~
2011-08-21 22:14:00 -04:00
===============================================================================
vim:ft=help:et:ts=2:sw=2:sts=2:norl