Skip to content

Commit

Permalink
Merge pull request #6 from utyf/master
Browse files Browse the repository at this point in the history
allow using VimPipe() with range (by default acts exactly the same)
  • Loading branch information
krisajenkins committed Jun 16, 2015
2 parents d744694 + f20a4ec commit fd3af75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/vim-pipe.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ call s:SetGlobalOptDefault('vimpipe_invoke_map', '<LocalLeader>r')
call s:SetGlobalOptDefault('vimpipe_close_map', '<LocalLeader>p')
call s:SetGlobalOptDefault('vimpipe_silent', 0)

function! VimPipe() "{{{1
function! VimPipe() range "{{{1
" Save local settings.
let saved_unnamed_register = @@
let switchbuf_before = &switchbuf
Expand Down Expand Up @@ -80,7 +80,7 @@ function! VimPipe() "{{{1
if empty(l:vimpipe_command)
silent call append(0, ["", "# See :help vim-pipe for setup advice."])
else
let l:parent_contents = getbufline(l:parent_buffer, 0, "$")
let l:parent_contents = getbufline(l:parent_buffer, a:firstline, a:lastline)
call append(line('0'), l:parent_contents)

let l:start = reltime()
Expand Down Expand Up @@ -108,6 +108,6 @@ function! VimPipe() "{{{1
endfunction

" Define Mappings {{{1
execute "nnoremap <silent> " . g:vimpipe_invoke_map . " :call VimPipe()<CR>"
execute "nnoremap <silent> " . g:vimpipe_invoke_map . " :%call VimPipe()<CR>"
" Modeline {{{1
" vim: set foldlevel=1 foldmethod=marker:

0 comments on commit fd3af75

Please sign in to comment.