diff options
Diffstat (limited to 'vim')
| -rw-r--r-- | vim/init/keymaps.vim | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim index d61e6a9..aefb337 100644 --- a/vim/init/keymaps.vim +++ b/vim/init/keymaps.vim | |||
| @@ -505,11 +505,6 @@ nnoremap <leader>cw :cw 10<CR> | |||
| 505 | " :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window | 505 | " :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window |
| 506 | " | 506 | " |
| 507 | function! Redir(cmd) | 507 | function! Redir(cmd) |
| 508 | " for win in range(1, winnr('$')) | ||
| 509 | " if getwinvar(win, 'scratch') | ||
| 510 | " execute win . 'windo close' | ||
| 511 | " endif | ||
| 512 | " endfor | ||
| 513 | if a:cmd =~ '^!' | 508 | if a:cmd =~ '^!' |
| 514 | let output = system(matchstr(a:cmd, '^!\zs.*')) | 509 | let output = system(matchstr(a:cmd, '^!\zs.*')) |
| 515 | else | 510 | else |
| @@ -519,12 +514,12 @@ function! Redir(cmd) | |||
| 519 | endif | 514 | endif |
| 520 | enew | 515 | enew |
| 521 | let w:scratch = 1 | 516 | let w:scratch = 1 |
| 522 | " setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile | ||
| 523 | setlocal buftype=nofile noswapfile | 517 | setlocal buftype=nofile noswapfile |
| 524 | call setline(1, split(output, "\n")) | 518 | call setline(1, split(output, "\n")) |
| 525 | endfunction | 519 | endfunction |
| 526 | 520 | ||
| 527 | command! -nargs=1 -complete=command Redir silent call Redir(<q-args>) | 521 | command! -nargs=1 -complete=command Redir silent call Redir(<q-args>) |
| 522 | command! -nargs=1 -complete=command R silent call Redir(<q-args>) | ||
| 528 | nnoremap <leader>rr :Redir<space> | 523 | nnoremap <leader>rr :Redir<space> |
| 529 | " }}} | 524 | " }}} |
| 530 | " QUICK_SUBSTITUTE ----------------{{{ | 525 | " QUICK_SUBSTITUTE ----------------{{{ |