aboutsummaryrefslogtreecommitdiff
path: root/plugin/copy_linebreak.vim
blob: 76d9228f12ba18159ec93bb057eb54a78fe3c0b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"
" copy_linebreak.vim: Bind user-defined key sequences to toggle a group of
" options that make text wrapped with 'wrap' copy-paste friendly.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_copy_linebreak') || &compatible || v:version < 700
  finish
endif
let loaded_copy_linebreak = 1

" Provide mappings to the functions just defined
nnoremap <silent> <unique>
      \ <Plug>(CopyLinebreakEnable)
      \ :<C-U>call copy_linebreak#Enable()<CR>
nnoremap <silent> <unique>
      \ <Plug>(CopyLinebreakDisable)
      \ :<C-U>call copy_linebreak#Disable()<CR>
nnoremap <silent> <unique>
      \ <Plug>(CopyLinebreakToggle)
      \ :<C-U>call copy_linebreak#Toggle()<CR>