aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-11-16 13:33:27 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-11-16 13:33:27 +1300
commit3c6c3020fbf750bfeddb8eaa627cb2e76738587b (patch)
treee88b00b7a5328cc1120b9f5c7094d89000c5718f /vim/vimrc
parentRemove resolved issue (diff)
downloaddotfiles-3c6c3020fbf750bfeddb8eaa627cb2e76738587b.tar.gz
dotfiles-3c6c3020fbf750bfeddb8eaa627cb2e76738587b.zip
Make Vim 'breakindent' subject to \b toggle
It impedes accurate copypasting from terminal emulators otherwise, which is the main reason I implemented \b
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc14
1 files changed, 9 insertions, 5 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 45751577..a454246e 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -117,11 +117,6 @@ endif
" do clever things with indenting will often assume this is set
set autoindent
-" Indent broken lines
-if v:version > 704 || v:version == 704 && has('patch338')
- set breakindent
-endif
-
" Use spaces instead of tabs
set expandtab
@@ -511,6 +506,9 @@ nnoremap k gk
if has('linebreak')
set linebreak
set showbreak=...
+ if v:version > 704 || v:version == 704 && has('patch338')
+ set breakindent
+ endif
" Bind \b to turn off linebreak and toggle the showbreak characters on and
" off for convenience of copypasting multiple lines from terminal emulators.
@@ -519,9 +517,15 @@ if has('linebreak')
if &linebreak
set nolinebreak
set showbreak=
+ if v:version > 704 || v:version == 704 && has('patch338')
+ set nobreakindent
+ endif
else
set linebreak
set showbreak=...
+ if v:version > 704 || v:version == 704 && has('patch338')
+ set breakindent
+ endif
endif
endfunction
nnoremap <silent> <leader>b :<C-U>call ToggleBreak()<CR>