aboutsummaryrefslogtreecommitdiff
path: root/plugin/max-splash.vim
diff options
context:
space:
mode:
authorMax Christian Pohle2018-10-22 00:02:58 +0200
committerMax Christian Pohle2018-10-22 20:42:25 +0200
commitf2e01d7e513067ddb57c75f6e38cdcf434946cf8 (patch)
tree4e8448506756d2144db173d01385798840507133 /plugin/max-splash.vim
parent31f80d9c334e38e486545407ea5eb5f5cbb2f07d (diff)
downloadvim-f2e01d7e513067ddb57c75f6e38cdcf434946cf8.tar.bz2
vim-f2e01d7e513067ddb57c75f6e38cdcf434946cf8.zip
Major refactoring for version 2.0
vim-plug has been removed and replaced with Vims internal bundle mechanism. But I already noticed, that there is also GLVM now and started trying that as well.
Diffstat (limited to 'plugin/max-splash.vim')
-rw-r--r--plugin/max-splash.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugin/max-splash.vim b/plugin/max-splash.vim
new file mode 100644
index 0000000..5282679
--- /dev/null
+++ b/plugin/max-splash.vim
@@ -0,0 +1,23 @@
1"=======================================================================================================================
2" MAX_SPLASH:
3" Shows recently used files from the current directory in a location list
4"=======================================================================================================================
5
6" moved after VimEnter of statusline, so that it does not get overwritten any
7" more
8if empty(argv())
9
10 " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val}))
11
12 " from the list of recent files: make absolute paths, filter out files not
13 " contained in cwd and finally filter out directories and non-files...
14 autocmd StdinReadPre * let s:std_in=1
15 autocmd VimEnter * if !exists("s:std_in") | call setloclist(0, [], 'r',
16 \ {
17 \ 'title':'Recently used files in directory: '.getcwd(),
18 \ 'items':map(filter(filter(
19 \ map(copy(v:oldfiles),
20 \ {_, p->expand(p)}), 'v:val =~ "'.getcwd().'/"'), 'filereadable(v:val)'),
21 \ {_, p->{'filename': fnamemodify(p, ':.')}})
22 \ }) | lopen | only | setfiletype qf
23endif
..