diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-04-02 14:52:03 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-04-02 14:52:03 +1300 |
commit | 670a985f009f23f67e6f08ebbd4f1eb38468d5bf (patch) | |
tree | 94b0ba71b8a905c4f26941e48947059d0752e6e2 /vim | |
parent | Complete cf function with dir names (diff) | |
download | dotfiles-670a985f009f23f67e6f08ebbd4f1eb38468d5bf.tar.gz dotfiles-670a985f009f23f67e6f08ebbd4f1eb38468d5bf.zip |
Binding for copypaste convenience
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -522,6 +522,21 @@ nnoremap k gk if has('linebreak') set linebreak set showbreak=... + + " Bind \b to turn off linebreak and toggle the showbreak characters on and + " off for convenience of copypasting multiple lines from terminal emulators. + if has('eval') + function! ToggleBreak() + if &linebreak + set nolinebreak showbreak= + set showbreak= + else + set linebreak + set showbreak=... + endif + endfunction + nnoremap <silent> <leader>b :<C-U>call ToggleBreak()<CR> + endif endif " I really like ZZ and ZQ, so I wrote a couple more mappings; ZW forces a |