aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/quote.vim
blob: 92de5035212b506ce1bab47583c87e44e50506b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
" Quote lines in mail and mail-based formats: Markdown, Git commits, etc
function! quote#Quote() abort
  set operatorfunc=quote#QuoteOpfunc
  return 'g@'
endfunction
function! quote#QuoteOpfunc(type) abort
  for l:li in range(line('''['), line(''']'))
    let l:line = getline(l:li)
    call setline(l:li, '>'.l:line)
  endfor
endfunction