From c21e0a997c367c4f6514acfd2431c32807dd8e05 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 17 Jul 2020 00:34:11 +0200 Subject: Replaced max-splash with vim-recently-used plugin --- .gitmodules | 3 +++ pack/coderonline/start/vim-recently-used | 1 + plugin/max-splash.vim | 36 -------------------------------- 3 files changed, 4 insertions(+), 36 deletions(-) create mode 160000 pack/coderonline/start/vim-recently-used delete mode 100644 plugin/max-splash.vim diff --git a/.gitmodules b/.gitmodules index badd05d..5839c1c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -62,3 +62,6 @@ [submodule "pack/_all/start/vim-mediawiki-editor"] path = pack/_all/start/vim-mediawiki-editor url = https://github.com/aquach/vim-mediawiki-editor +[submodule "pack/coderonline/start/vim-recently-used"] + path = pack/coderonline/start/vim-recently-used + url = https://git.entwicklerseite.de/vim-recently-used diff --git a/pack/coderonline/start/vim-recently-used b/pack/coderonline/start/vim-recently-used new file mode 160000 index 0000000..5a8cc26 --- /dev/null +++ b/pack/coderonline/start/vim-recently-used @@ -0,0 +1 @@ +Subproject commit 5a8cc26fb5084dc032153d867f8fffe00a477e48 diff --git a/plugin/max-splash.vim b/plugin/max-splash.vim deleted file mode 100644 index 3a23e60..0000000 --- a/plugin/max-splash.vim +++ /dev/null @@ -1,36 +0,0 @@ -"======================================================================================================================= -" MAX_SPLASH: -" Shows recently used files from the current directory in a location list -"======================================================================================================================= - -" autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val})) -" from the list of recent files: make absolute paths, filter out files not -" contained in cwd and finally filter out directories and non-files... -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if !exists("s:std_in") && empty(argv()) - \ | call setloclist(0, []) - \ | :lopen - \ | setlocal nospell - \ | setlocal signcolumn=yes - \ | setfiletype qf - \ | call setloclist(0, [], 'r', { - \ 'title':'Recently used files in directory: '.getcwd(), - \ 'items':sort(map(filter(filter(map(copy(v:oldfiles[:100]), - \ {_, p->expand(p)}), - \ 'v:val =~ "'.getcwd().'/"'), - \ 'filereadable(v:val)'), - \ {_, p->{'filename': p, - \ 'module': printf("%s | %-*s ", - \ strftime("%F %H:%M", - \ getftime(p)), - \ winwidth(0) - wincol() - 20, - \ fnamemodify(p, ':.') - \ )}}), - \ {a1, a2 -> a1.module < a2.module}) - \ }) | wincmd w - -" http://vimdoc.sourceforge.net/htmldoc/quickfix.html#:caddexpr -" for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(0,9) | let p = getpos("'".nr2char(c)) | if (p[1] > 0) | exec "sign define mark_".nr2char(c)." text=".nr2char(c)." linehl=linenr" | exec "sign place ".c." name=mark_".nr2char(c)." line=".p[1] | endif | endfor -" for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(0,9) | let p = line("'".nr2char(c)) | if (p > 0) | exec "sign define mark_".nr2char(c)." text=".nr2char(c)." linehl=linenr" | exec "sign place ".c." name=mark_".nr2char(c)." line=".p | endif | endfor -" call sign_unplace('marks') | for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(0,9) | let p = line("'".nr2char(c)) | if (p > 0) | call sign_define("mark_".nr2char(c), { "text" : nr2char(c), "linehl": "linenr"}) | call sign_place(c, 'marks', "mark_".nr2char(c), '', {'lnum': p}) | endif | endfor -" call sign_unplace('marks') | for c in range(char2nr('a'), char2nr('z')) + range(char2nr('A'), char2nr('Z')) + range(char2nr('0'), char2nr('9')) | let p = line("'".nr2char(c)) | if (p > 0) | call sign_define("mark_".nr2char(c), { "text" : nr2char(c), "texthl": "linenr"}) | call sign_place(c, 'marks', "mark_".nr2char(c), '', {'lnum': p}) | endif | endfor -- cgit v1.2.3