diff options
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/max-splash.vim | 36 |
1 files changed, 0 insertions, 36 deletions
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 @@ | |||
1 | "======================================================================================================================= | ||
2 | " MAX_SPLASH: | ||
3 | " Shows recently used files from the current directory in a location list | ||
4 | "======================================================================================================================= | ||
5 | |||
6 | " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val})) | ||
7 | " from the list of recent files: make absolute paths, filter out files not | ||
8 | " contained in cwd and finally filter out directories and non-files... | ||
9 | autocmd StdinReadPre * let s:std_in=1 | ||
10 | autocmd VimEnter * if !exists("s:std_in") && empty(argv()) | ||
11 | \ | call setloclist(0, []) | ||
12 | \ | :lopen | ||
13 | \ | setlocal nospell | ||
14 | \ | setlocal signcolumn=yes | ||
15 | \ | setfiletype qf | ||
16 | \ | call setloclist(0, [], 'r', { | ||
17 | \ 'title':'Recently used files in directory: '.getcwd(), | ||
18 | \ 'items':sort(map(filter(filter(map(copy(v:oldfiles[:100]), | ||
19 | \ {_, p->expand(p)}), | ||
20 | \ 'v:val =~ "'.getcwd().'/"'), | ||
21 | \ 'filereadable(v:val)'), | ||
22 | \ {_, p->{'filename': p, | ||
23 | \ 'module': printf("%s | %-*s ", | ||
24 | \ strftime("%F %H:%M", | ||
25 | \ getftime(p)), | ||
26 | \ winwidth(0) - wincol() - 20, | ||
27 | \ fnamemodify(p, ':.') | ||
28 | \ )}}), | ||
29 | \ {a1, a2 -> a1.module < a2.module}) | ||
30 | \ }) | wincmd w | ||
31 | |||
32 | " http://vimdoc.sourceforge.net/htmldoc/quickfix.html#:caddexpr | ||
33 | " 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 | ||
34 | " 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 | ||
35 | " 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 | ||
36 | " 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 | ||