1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-18 20:10:27 +01:00

Plugins update

This commit is contained in:
2012-03-12 17:00:46 +01:00
parent c2500d764e
commit 7cbe6dca6d
37 changed files with 977 additions and 589 deletions

View File

@@ -1,4 +1,4 @@
*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.7.1
*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.7.2
*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
===============================================================================
# #
@@ -21,7 +21,7 @@ CONTENTS *ctrlp-contents*
6. Extensions...................................|ctrlp-extensions|
===============================================================================
1. Intro *ctrlp-intro*
INTRO *ctrlp-intro*
Full path fuzzy file, buffer, mru and tag finder with an intuitive interface.
Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for
@@ -31,7 +31,7 @@ finder, and more.
To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|.
===============================================================================
2. Options *ctrlp-options*
OPTIONS *ctrlp-options*
Below are the available options and their default values:~
@@ -51,14 +51,16 @@ Use this to disable the plugin completely: >
<
*'g:ctrlp_by_filename'*
Set this to 1 to set search by filename (not full path) as the default: >
Set this to 1 to set searching by filename (not full path) as the default: >
let g:ctrlp_by_filename = 0
<
Can be toggled on/off by pressing <c-d> inside the prompt.
*'g:ctrlp_regexp_search'*
*'g:ctrlp_regexp'*
Set this to 1 to set |regexp| search as the default: >
let g:ctrlp_regexp_search = 0
let g:ctrlp_regexp = 0
<
Can be toggled on/off by pressing <c-r> inside the prompt.
*'g:ctrlp_match_window_bottom'*
Set this to 0 to show the match window at the top of the screen: >
@@ -66,8 +68,8 @@ Set this to 0 to show the match window at the top of the screen: >
<
*'g:ctrlp_match_window_reversed'*
Change the listing order of the matched files in the match window. The default
setting (1) is from bottom to top: >
Change the listing order of the files in the match window. The default setting
(1) is from bottom to top: >
let g:ctrlp_match_window_reversed = 1
<
@@ -76,28 +78,37 @@ Set the maximum height of the match window: >
let g:ctrlp_max_height = 10
<
*'g:ctrlp_jump_to_buffer'*
When opening a file with <cr> or <c-t>, if the file's already opened somewhere
*'g:ctrlp_switch_buffer'*
When opening a file with <cr> or <c-t>, if the files already opened somewhere
|CtrlP| will try to jump to it instead of opening a new instance: >
let g:ctrlp_jump_to_buffer = 2
let g:ctrlp_switch_buffer = 2
<
1 - only jump to the buffer if its opened in the current tab.
2 - jump tab as well if the buffer's opened in another tab.
2 - jump tab as well if the buffers opened in another tab.
0 - disable this feature.
*'g:ctrlp_reuse_window'*
When opening a file with <cr>, |CtrlP| avoids opening it in windows created by
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.
Example: >
let g:ctrlp_reuse_window = 'netrw\|help\|quickfix'
<
*'g:ctrlp_working_path_mode'*
When starting up, |CtrlP| sets its local working directory according to this
variable: >
let g:ctrlp_working_path_mode = 2
<
1 - the parent directory of the current file.
2 - the nearest ancestor that contains one of these directories/files:
.git/
.hg/
.bzr/
_darcs/
root.dir
2 - the nearest ancestor that contains one of these directories or files:
.git/ .hg/ .svn/ .bzr/ _darcs/
0 - dont manage working directory.
Note: you can use b:ctrlp_working_path_mode (a |b:var|) to set this option on a
per buffer basis.
*'g:ctrlp_root_markers'*
Use this to set your own root markers in addition to the default ones. Your
@@ -105,7 +116,7 @@ markers will take precedence: >
let g:ctrlp_root_markers = ['']
<
These markers (builtins and yours) will serve as identifiers for the '/' and
'\' special inputs (section 5.e).
'\' special inputs (|ctrlp-input-formats| (e)).
*'g:ctrlp_use_caching'*
Set this to 0 to disable per-session caching. When disabled, caching will still
@@ -165,11 +176,10 @@ only need to keep the lines that youve changed the values (inside []): >
<
Note: In some terminals, its not possible to remap <c-h> without also changing
<bs> (|key-codes|). So if pressing <bs> moves the cursor to the left instead of
deleting a char for you, add this to your |vimrc| to change the default <c-h>
deleting a char for you, add this to your |vimrc| to disable the default <c-h>
mapping: >
let g:ctrlp_prompt_mappings = {
\ 'PrtBS()': ['<bs>', '<c-]>', '<c-h>'],
\ 'PrtCurLeft()': ['<left>', '<c-^>'],
\ 'PrtCurLeft()': ['<left>', '<c-^>']
\ }
<
@@ -213,7 +223,7 @@ Set to 1 to sort the MRU file list to most-recently-entered-buffer order: >
<
*'g:ctrlp_dotfiles'*
Set this to 0 if you dont want |CtrlP| to search for dotfiles and dotdirs: >
Set this to 0 if you dont want |CtrlP| to scan for dotfiles and dotdirs: >
let g:ctrlp_dotfiles = 1
<
You can use |'wildignore'| to exclude anything from the search.
@@ -225,9 +235,9 @@ Examples: >
Note #1: the `*/` in front of each directory glob is required.
Note #2: |wildignore| influences the result of |expand()|, |globpath()| and
|glob()| which many plugins use to find stuff on the system (e.g. fugitive.vim
looks for .git/, some other plugins look for external .exe tools on Windows).
So be a little mindful of what you put in your |wildignore|.
|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|.
*'g:ctrlp_custom_ignore'*
In addition to |'wildignore'|, use this for files and directories you want only
@@ -243,12 +253,6 @@ Examples: >
\ }
<
*'g:ctrlp_highlight_match'*
Use this to enable/disable highlighting of the matched patterns and to specify
the highlight group thatll be used: >
let g:ctrlp_highlight_match = [1, 'Identifier']
<
*'g:ctrlp_max_files'*
The maximum number of files to scan, set to 0 for no limit: >
let g:ctrlp_max_files = 10000
@@ -317,20 +321,21 @@ pressing <c-y>:
let g:ctrlp_open_new_file = 'v'
<
*'g:ctrlp_open_multi'*
*'g:ctrlp_open_multiple_files'*
If non-zero, this will enable opening multiple files with <c-z> and <c-o>: >
let g:ctrlp_open_multi = '1v'
let g:ctrlp_open_multiple_files = 'v'
<
Example: >
let g:ctrlp_open_multiple_files = '2vr'
<
For the number:
- If bigger than 1, itll be used as the maximum number of windows or tabs to
create when opening the files (the rest will be hidden buffers).
- If is 1, <c-o> will open all files, each in a new window or new tab.
- If no number is given, only the first file will be opened in a window,
either new window or reused, and the rest will be hidden buffers.
- If given, itll be used as the maximum number of windows or tabs to create
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:
t - each in a new tab
h - each in a new horizontal split
v - each in a new vertical split
t - each file in a new tab.
h - each file in a new horizontal split.
v - each file in a new vertical split.
Reuse the current window:
tr,
hr,
@@ -349,17 +354,7 @@ Pressing <c-o> or <c-y> will then prompt for a keypress. The key can be:
r - open in current window (for <c-y> only)
<esc>, <c-c> - cancel and go back to the prompt.
Any other key - use the behavior specified with |g:ctrlp_open_new_file| and
|g:ctrlp_open_multi|.
*'g:ctrlp_dont_split'*
When opening a file with <cr>, |CtrlP| avoids opening it in windows created by
plugins, help and quickfix. Use this to setup some exceptions: >
let g:ctrlp_dont_split = 'netrw'
<
Acceptable values are partial names or filetypes of the special buffers. Use
|regexp| to specify the pattern. Example: >
let g:ctrlp_dont_split = 'netrw\|help\|quickfix'
<
|g:ctrlp_open_multiple_files|.
*'g:ctrlp_follow_symlinks'*
Set this to 1 to follow symbolic links when listing files: >
@@ -394,7 +389,7 @@ Example: >
See https://gist.github.com/1610859 for a working example.
===============================================================================
3. Commands *ctrlp-commands*
COMMANDS *ctrlp-commands*
*:CtrlP*
:CtrlP [starting-directory]
@@ -412,19 +407,19 @@ See https://gist.github.com/1610859 for a working example.
:CtrlPMRU
Open |CtrlP| in find Most-Recently-Used file mode.
*:ClearCtrlPCache*
:ClearCtrlPCache
*:CtrlPClearCache*
:CtrlPClearCache
Flush the cache for the current working directory. The same as pressing <F5>
inside |CtrlP|.
You can also enable/disable caching with the option |g:ctrlp_use_caching|.
*:ClearAllCtrlPCaches*
:ClearAllCtrlPCaches
*:CtrlPClearAllCaches*
:CtrlPClearAllCaches
Delete all the cache files saved in |g:ctrlp_cache_dir|.
*:ResetCtrlP*
:ResetCtrlP
Reset all options and take in new values of the option variables.
*:CtrlPReload*
:CtrlPReload
Load new values for the option variables.
-------------------------------------------------------------------------------
The following commands ignore the current value of |g:ctrlp_working_path_mode|:
@@ -439,7 +434,7 @@ The following commands ignore the current value of |g:ctrlp_working_path_mode|:
This acts like |:CtrlP| with |path_mode| = 2
===============================================================================
4. Mappings *ctrlp-mappings*
MAPPINGS *ctrlp-mappings*
*'ctrlp-<c-p>'*
<c-p>
@@ -448,14 +443,14 @@ The following commands ignore the current value of |g:ctrlp_working_path_mode|:
Once inside the prompt:~
<c-r> *'ctrlp-fullregexp'*
Toggle between the string mode (section 5.a & b) and full |regexp| mode.
(note: in full |regexp| mode, the prompts base is 'r>>' instead of '>>>')
Toggle between the string mode and full |regexp| mode.
Note: in full |regexp| mode, the prompts base is 'r>>' instead of '>>>'
See also |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
<c-d>
Toggle between full-path search and filename only search.
(note: in filename mode, the prompts base is '>d>' instead of '>>>')
Note: in filename mode, the prompts base is '>d>' instead of '>>>'
<c-f>, 'forward'
<c-up>
@@ -543,7 +538,8 @@ Once inside the prompt:~
- Remove deleted files from MRU list.
<F7>
Clear MRU list.
- Wipe MRU list.
- Delete MRU entries marked by <c-z>.
<insert>
Insert the word under the cursor (in the active buffer) into the prompt.
@@ -552,7 +548,7 @@ Once inside the prompt:~
<c-c>,
<c-g>
Exit |CtrlP|.
<c-c> can also be used to stop the scan if its taking too long.
Note: <c-c> can also be used to stop the scan if its taking too long.
Choose your own mappings with |g:ctrlp_prompt_mappings|.
@@ -565,7 +561,7 @@ When inside the match window (press <s-tab> to switch):~
matches that key.
===============================================================================
5. Input Formats *ctrlp-input-formats*
INPUT FORMATS *ctrlp-input-formats*
Formats for inputting in the prompt:~
@@ -613,7 +609,7 @@ f) Type the name of a non-existent file and press <c-y> to create it. Mark a
g) Submit ? to open this help file.
===============================================================================
6. Extensions *g:ctrlp-extensions*
EXTENSIONS *g:ctrlp-extensions*
Extensions are optional. To enable an extension, add its name to the variable
g:ctrlp_extensions: >
@@ -720,6 +716,48 @@ Statuslines:~
For rebuilding the statuslines, see |g:ctrlp_status_func|.
===============================================================================
MISCELLANEOUS CONFIGS *ctrlp-miscellaneous-configs*
* Use |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 projects root, or
to the parent directory of the current file if a root cant be found:
>
function! s:setcwd()
let cph = expand('%:p:h', 1)
if match(cph, '\v^<.+>://') >= 0 | 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+)
===============================================================================
CREDITS *ctrlp-credits*
@@ -736,32 +774,37 @@ gibhub, bitbucket, and through email.
Special thanks:~
* Woojong Koh <github.com/wjkoh>
Forked and suggested the support for VCS listing commands.
* Yasuhiro Matsumoto <github.com/mattn>
Added option to use Migemo for Japanese filenames.
* Kyo Nagashima <github.com/hail2u>
Made some enhancements to file opening mappings.
* Piet Delport <github.com/pjdelport>
Changed the default cache directory to meet XDG spec.
* Kent Sibilev <github.com/datanoise>
Debugged and made various patches.
* Simon Ruderich
* Yasuhiro Matsumoto <github.com/mattn>
* Ken Earley <github.com/kenearley>
* Kyo Nagashima <github.com/hail2u>
* Zak Johnson <github.com/zakj>
* Diego Viola <github.com/diegoviola>
* Piet Delport <github.com/pjdelport>
* Thibault Duplessis <github.com/ornicar>
* Kent Sibilev <github.com/datanoise>
* Tacahiroy <github.com/tacahiroy>
Bugfixes/Corrections.
* Luca Pette <github.com/lucapette>
===============================================================================
CHANGELOG *ctrlp-changelog*
+ New option: |g:ctrlp_mruf_last_entered| change MRU to recently-entered.
+ Rename:
*ClearCtrlPCache* -> |CtrlPClearCache|
*ClearAllCtrlPCaches* -> |CtrlPClearAllCaches|
*ResetCtrlP* -> |CtrlPReload|
Before 2012/03/02~
+ Rename:
*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.
+ New option: |g:ctrlp_mruf_last_entered| change MRU to Recently-Entered.
Before 2012/01/15~
@@ -770,7 +813,7 @@ Before 2012/01/15~
+ 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.
+ Extend |g:ctrlp_open_multi| with new optional values: tr, hr, vr.
+ 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~
@@ -790,29 +833,29 @@ Before 2011/11/30~
Before 2011/11/13~
+ New special input: '/' and '\' find root (section 5.e)
+ New special input: '/' and '\' find root (|ctrlp-input-formats| (e))
+ Remove ctrlp#SetWorkingPath().
+ Remove |g:ctrlp_mru_files|, make MRU permanent.
+ Extend |g:ctrlp_open_multi|, add new ways to open files.
+ New option: |g:ctrlp_dont_split|,
+ 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~
+ New feature: Support for custom extensions.
<F5> also removes non-existent files from MRU list.
+ New option: |g:ctrlp_jump_to_buffer|
+ New option: g:ctrlp_jump_to_buffer
Before 2011/10/12~
+ New features: Open multiple files.
Pass Vims |++opt| and |+cmd| to the opening file
(section 5.c)
(|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.
+ New option: |g:ctrlp_open_multi|
+ Remove |g:ctrlp_persistent_input|, |g:ctrlp_live_update| and <c-^>.
+ New option: g:ctrlp_open_multi
+ Remove *g:ctrlp_persistent_input* *g:ctrlp_live_update* and <c-^>.
Before 2011/09/29~
@@ -824,22 +867,22 @@ Before 2011/09/29~
Before 2011/09/19~
+ New command: |ResetCtrlP|
+ New command: ResetCtrlP
+ New options: |g:ctrlp_max_files|,
|g:ctrlp_max_depth|,
|g:ctrlp_live_update|
g:ctrlp_live_update
+ New mapping: <c-^>
Before 2011/09/12~
+ Ability to cycle through matched lines in the match window.
+ Extend the behavior of |g:ctrlp_persistent_input|
+ Extend the behavior of g:ctrlp_persistent_input
+ Extend the behavior of |:CtrlP|
+ New options: |g:ctrlp_dotfiles|,
|g:ctrlp_clear_cache_on_exit|,
|g:ctrlp_highlight_match|,
g:ctrlp_highlight_match,
|g:ctrlp_user_command|
+ New special input: '..' (section 5.d)
+ New special input: '..' (|ctrlp-input-formats| (d))
+ New mapping: <F5>.
+ New commands: |:CtrlPCurWD|,
|:CtrlPCurFile|,
@@ -848,11 +891,11 @@ Before 2011/09/12~
+ New feature: Search in most recently used (MRU) files
+ New mapping: <c-b>.
+ Extended the behavior of <c-f>.
+ New options: |g:ctrlp_mru_files|,
+ New options: g:ctrlp_mru_files,
|g:ctrlp_mruf_max|,
|g:ctrlp_mruf_exclude|,
|g:ctrlp_mruf_include|
+ New command: |:CtrlPMRUFiles|
+ New command: |:CtrlPMRU|
First public release: 2011/09/06~