diff options
author | Max Christian Pohle | 2018-04-05 21:48:28 +0200 |
---|---|---|
committer | Max Christian Pohle | 2018-04-05 21:48:28 +0200 |
commit | 2986836b9c08f3eafafbddcf2640f4914d5740ef (patch) | |
tree | d5f800766ddbe950828c11f114534a93d57df286 | |
parent | 9984b7153060006f1b746808d5a4f5c83028c5e9 (diff) | |
download | vim-karlmarks-2986836b9c08f3eafafbddcf2640f4914d5740ef.tar.bz2 vim-karlmarks-2986836b9c08f3eafafbddcf2640f4914d5740ef.zip |
Fixed vim in a pipe behaviour with 'recent files'
-rw-r--r-- | vimrc-full | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -811,7 +811,7 @@ let g:lightline = { | |||
811 | \ 'right': [] | 811 | \ 'right': [] |
812 | \ }, | 812 | \ }, |
813 | \ 'active': { | 813 | \ 'active': { |
814 | \ 'left': [ [ 'mode', 'paste' ], ['readonly', 'filetype'], [ 'absolutepath' ]], | 814 | \ 'left': [ [ 'register', 'mode', 'paste' ], ['readonly', 'filetype'], [ 'absolutepath' ]], |
815 | \ 'right': [ [ 'lineinfo', 'percent' ], [ 'spell', 'fileencoding', 'fileformat' ] , ['tagbar'] ] | 815 | \ 'right': [ [ 'lineinfo', 'percent' ], [ 'spell', 'fileencoding', 'fileformat' ] , ['tagbar'] ] |
816 | \ }, | 816 | \ }, |
817 | \ 'component': { | 817 | \ 'component': { |
@@ -823,7 +823,8 @@ let g:lightline = { | |||
823 | \ 'sessionname': '%{v:this_session}', | 823 | \ 'sessionname': '%{v:this_session}', |
824 | \ 'gitbranch': ' %{fugitive#head()}', | 824 | \ 'gitbranch': ' %{fugitive#head()}', |
825 | \ 'tabnumber': " %{tabpagenr()}/%{tabpagenr('$')}", | 825 | \ 'tabnumber': " %{tabpagenr()}/%{tabpagenr('$')}", |
826 | \ 'readonly': '%{&readonly ? "" : ""}' | 826 | \ 'readonly': '%{&readonly ? "" : ""}', |
827 | \ 'register': '%{v:register}' | ||
827 | \ }, | 828 | \ }, |
828 | \ 'component_expand': { | 829 | \ 'component_expand': { |
829 | \ 'buffercurrent': 'lightline#buffer#buffercurrent2', | 830 | \ 'buffercurrent': 'lightline#buffer#buffercurrent2', |
@@ -1056,7 +1057,7 @@ function! ExtendColorTheme() | |||
1056 | autocmd InsertLeave * set nolist | 1057 | autocmd InsertLeave * set nolist |
1057 | 1058 | ||
1058 | " autocmd InsertLeave * call matchadd('Conceal', ' \+$', -1, 101, { 'conceal': '⟶' }) | 1059 | " autocmd InsertLeave * call matchadd('Conceal', ' \+$', -1, 101, { 'conceal': '⟶' }) |
1059 | autocmd InsertEnter * call matchdelete(101) | 1060 | autocmd InsertEnter * silent! call matchdelete(101) |
1060 | autocmd InsertLeave * call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' }) | 1061 | autocmd InsertLeave * call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' }) |
1061 | 1062 | ||
1062 | " Show trailing whitepace and spaces before a tab as part of the syntax highlighting | 1063 | " Show trailing whitepace and spaces before a tab as part of the syntax highlighting |
@@ -1115,12 +1116,13 @@ autocmd VimEnter,WinEnter * exec ':set scrolljump='.winheight(0)/2 | |||
1115 | " display highlight group under the cursor | 1116 | " display highlight group under the cursor |
1116 | map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> | 1117 | map <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> |
1117 | 1118 | ||
1118 | if argc() == 0 | 1119 | if empty(argv()) |
1119 | " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val})) | 1120 | " autocmd VimEnter * call setloclist(0, filter(map(copy(v:oldfiles), {_, p->{'filename': expand(get(split(p, "'"), 0))}}), { val -> echo val})) |
1120 | 1121 | ||
1121 | " from the list of recent files: make absolute paths, filter out files not | 1122 | " from the list of recent files: make absolute paths, filter out files not |
1122 | " contained in cwd and finally filter out directories and non-files... | 1123 | " contained in cwd and finally filter out directories and non-files... |
1123 | autocmd VimEnter * call setqflist(map(filter(filter( | 1124 | autocmd StdinReadPre * let s:std_in=1 |
1125 | autocmd VimEnter * if !exists("s:std_in") | call setqflist(map(filter(filter( | ||
1124 | \ map(copy(v:oldfiles), {_, p->expand(p)}), 'v:val =~ "'.getcwd().'"'), | 1126 | \ map(copy(v:oldfiles), {_, p->expand(p)}), 'v:val =~ "'.getcwd().'"'), |
1125 | \ 'filereadable(v:val)'), {_, p->{'filename': fnamemodify(p, ':.')}})) | copen | only | 1127 | \ 'filereadable(v:val)'), {_, p->{'filename': fnamemodify(p, ':.')}})) | copen | only |
1126 | endif | 1128 | endif |