Skip to content

Commit a085452

Browse files
authored
Merge branch 'ctrlpvim:master' into master
2 parents 40b41ae + ed04d2e commit a085452

4 files changed

Lines changed: 46 additions & 9 deletions

File tree

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: ctrlpvim # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

autoload/ctrlp.vim

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ endf
428428
if has('patch-8.2-0995')
429429
fu! s:GlobPath(dirs, depth)
430430
let entries = []
431-
for e in split(a:dirs, ',')
431+
let dirs = substitute(a:dirs, '\\\([%# ]\)', '\1', 'g')
432+
for e in split(dirs, ',')
432433
sil let files = readdir(e, '1', {'sort': 'none'})
433434
if !s:showhidden | cal filter(files, 'v:val[0] != "."') | en
434435
let entries += map(files, 'e.s:lash.v:val')
@@ -1386,6 +1387,7 @@ fu! s:MarkToOpen()
13861387
en
13871388
en
13881389
sil! cal ctrlp#statusline()
1390+
redr
13891391
endf
13901392

13911393
fu! s:OpenMulti(...)
@@ -2712,6 +2714,15 @@ fu! ctrlp#nosy()
27122714
retu !( has('syntax') && exists('g:syntax_on') )
27132715
endf
27142716

2717+
fu! s:hiupdate()
2718+
for [ke, va] in items(s:hlgrps)
2719+
let ke = 'CtrlP' . ke
2720+
if hlexists(ke)
2721+
exe 'hi link' ke va
2722+
en
2723+
endfo
2724+
endf
2725+
27152726
fu! ctrlp#hicheck(grp, defgrp)
27162727
if !hlexists(a:grp)
27172728
exe 'hi link' a:grp a:defgrp
@@ -2845,6 +2856,7 @@ if has('autocmd')
28452856
au BufEnter ControlP cal s:checkbuf()
28462857
au BufLeave ControlP noa cal s:Close()
28472858
au VimLeavePre * cal s:leavepre()
2859+
au ColorScheme * cal s:hiupdate()
28482860
aug END
28492861
en
28502862

autoload/ctrlp/buffertag.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,14 @@ endf
203203

204204
fu! s:parseline(line)
205205
let vals = matchlist(a:line,
206-
\ '\v^([^\t]+)\t(.+)\t[?/]\^?(.{-1,})\$?[?/]\;\"\t(.+)\tline(no)?\:(\d+)')
206+
\ '\v^([^\t]+)\t(.+)\t[?/]\^?(.{-1,})\$?[?/]\;\"\t(.+)\tline(no)?\:(\d+)\t?([^\t]*)')
207207
if vals == [] | retu '' | en
208208
let [bufnr, bufname] = [bufnr('^'.vals[2].'$'), fnamemodify(vals[2], ':p:t')]
209-
retu vals[1].' '.vals[4].'|'.bufnr.':'.bufname.'|'.vals[6].'| '.vals[3]
209+
if len(vals) > 7 && vals[7] != ''
210+
retu vals[1].' '.vals[4].'|'.bufnr.':'.bufname.'|'.vals[6].'|'.vals[7].'| '.vals[3]
211+
else
212+
retu vals[1].' '.vals[4].'|'.bufnr.':'.bufname.'|'.vals[6].'| '.vals[3]
213+
en
210214
endf
211215

212216
fu! s:syntax()
@@ -249,7 +253,7 @@ endf
249253

250254
fu! ctrlp#buffertag#accept(mode, str)
251255
let vals = matchlist(a:str,
252-
\ '\v^[^\t]+\t+[^\t|]+\|(\d+)\:[^\t|]+\|(\d+)\|\s(.+)$')
256+
\ '\v^[^\t]+\t+[^\t|]+\|(\d+)\:[^\t|]+\|(\d+)%(\|[^\t|]+)?\|\s(.+)$')
253257
let bufnr = str2nr(get(vals, 1))
254258
if bufnr
255259
cal ctrlp#acceptfile(a:mode, bufnr)

readme.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ Full path fuzzy __file__, __buffer__, __mru__, __tag__, __...__ finder for Vim.
1111

1212
![ctrlp][1]
1313

14+
## Install
15+
16+
vim 8+ manages packages all on its own. Installing `ctrlp` is this simple:
17+
18+
```bash
19+
mkdir -p ~/.vim/pack/plugins/start
20+
git clone --depth=1 https://github.com/ctrlpvim/ctrlp.vim.git ~/.vim/pack/plugins/start/ctrlp
21+
```
22+
23+
Of course you can use your favorite plugin manager or check the [quick installation guide][3] for a primitive installation method.
24+
1425
## Basic Usage
1526
* Run `:CtrlP` or `:CtrlP [starting-directory]` to invoke CtrlP in find file mode.
1627
* Run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in find buffer or find MRU file mode.
@@ -97,13 +108,10 @@ Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 fi
97108
98109
Check `:help ctrlp-options` for other options.
99110
100-
## Installation
101-
Use your favorite method or check the homepage for a [quick installation guide][3].
102-
103111
## License
104112
CtrlP is distributed under Vim's [license][4].
105113
106-
[1]: http://i.imgur.com/aOcwHwt.png
114+
[1]: https://i.imgur.com/aOcwHwt.png
107115
[2]: https://github.com/ctrlpvim/ctrlp.vim/tree/extensions
108-
[3]: http://ctrlpvim.github.io/ctrlp.vim#installation
116+
[3]: https://ctrlpvim.github.io/ctrlp.vim#installation
109117
[4]: http://vimdoc.sourceforge.net/htmldoc/uganda.html

0 commit comments

Comments
 (0)