Rename g:ctrlp_dotfiles and change its default value
This commit is contained in:
parent
32ac8d27cb
commit
f66f4e8503
@ -57,7 +57,7 @@ let [s:pref, s:opts, s:new_opts] = ['g:ctrlp_', {
|
||||
\ 'custom_ignore': ['s:usrign', s:ignore()],
|
||||
\ 'default_input': ['s:deftxt', 0],
|
||||
\ 'dont_split': ['s:nosplit', 'netrw'],
|
||||
\ 'dotfiles': ['s:dotfiles', 1],
|
||||
\ 'dotfiles': ['s:showhidden', 0],
|
||||
\ 'extensions': ['s:extensions', []],
|
||||
\ 'follow_symlinks': ['s:folsym', 0],
|
||||
\ 'highlight_match': ['s:mathi', [1, 'CtrlPMatch']],
|
||||
@ -88,6 +88,7 @@ let [s:pref, s:opts, s:new_opts] = ['g:ctrlp_', {
|
||||
\ 'open_multiple_files': 's:opmul',
|
||||
\ 'regexp': 's:regexp',
|
||||
\ 'reuse_window': 's:nosplit',
|
||||
\ 'show_hidden': 's:showhidden',
|
||||
\ 'switch_buffer': 's:jmptobuf',
|
||||
\ }]
|
||||
|
||||
@ -194,7 +195,7 @@ fu! s:opts() "{{{2
|
||||
if !exists('g:ctrlp_newcache') | let g:ctrlp_newcache = 0 | en
|
||||
let s:maxdepth = min([s:maxdepth, 100])
|
||||
let s:mxheight = max([s:mxheight, 1])
|
||||
let s:glob = s:dotfiles ? '.*\|*' : '*'
|
||||
let s:glob = s:showhidden ? '.*\|*' : '*'
|
||||
let s:igntype = empty(s:usrign) ? -1 : type(s:usrign)
|
||||
if s:lazy
|
||||
cal extend(s:glbs, { 'ut': ( s:lazy > 1 ? s:lazy : 250 ) })
|
||||
@ -1300,7 +1301,7 @@ fu! ctrlp#dirnfile(entries)
|
||||
let etype = getftype(each)
|
||||
if s:igntype >= 0 && s:usrign(each, etype) | con | en
|
||||
if etype == 'dir'
|
||||
if s:dotfiles | if each !~ '[\/]\.\{1,2}$'
|
||||
if s:showhidden | if each !~ '[\/]\.\{1,2}$'
|
||||
cal add(items[0], each)
|
||||
en | el
|
||||
cal add(items[0], each)
|
||||
|
@ -51,7 +51,7 @@ Overview:~
|
||||
|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_show_hidden|...........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.
|
||||
@ -209,9 +209,9 @@ Set the directory to store the cache files: >
|
||||
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp'
|
||||
<
|
||||
|
||||
*'g:ctrlp_dotfiles'*
|
||||
Set this to 0 if you don't want CtrlP to scan for dotfiles and dotdirs: >
|
||||
let g:ctrlp_dotfiles = 1
|
||||
*'g:ctrlp_show_hidden'*
|
||||
Set this to 1 if you want CtrlP to scan for dotfiles and dotdirs: >
|
||||
let g:ctrlp_show_hidden = 0
|
||||
<
|
||||
Note: does not apply when a command defined with |g:ctrlp_user_command| is
|
||||
being used.
|
||||
@ -1178,6 +1178,8 @@ Special thanks:~
|
||||
===============================================================================
|
||||
CHANGELOG *ctrlp-changelog*
|
||||
|
||||
+ Rename:
|
||||
*g:ctrlp_dotfiles* -> |g:ctrlp_show_hidden|.
|
||||
+ Change |g:ctrlp_switch_buffer|'s and |g:ctrlp_working_path_mode|'s type
|
||||
(old values still work).
|
||||
+ New key for |g:ctrlp_user_command| when it's a Dictionary: 'ignore'.
|
||||
|
Loading…
x
Reference in New Issue
Block a user