From 0254acfd71877910ce19ec3404cd8e25c1b13e6b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 3 Jun 2019 22:18:36 +0200 Subject: diff_corrections: Set 'wrap' Soft wrap in diffs. Recently encountered diffs with super long lines and thought it would be nice to be able to see everything on one page without having to scroll horizontally. --- bundle/diff-corrections/autoload/diff_corrections.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bundle/diff-corrections') diff --git a/bundle/diff-corrections/autoload/diff_corrections.vim b/bundle/diff-corrections/autoload/diff_corrections.vim index c3003e9..bdb28b3 100644 --- a/bundle/diff-corrections/autoload/diff_corrections.vim +++ b/bundle/diff-corrections/autoload/diff_corrections.vim @@ -1,4 +1,5 @@ let s:old_cursorline = &cursorline +let s:old_wrap = &wrap let s:restore_cx_mapping = '' @@ -9,6 +10,7 @@ function! diff_corrections#Run() endif set nocursorline + set wrap nnoremap cx :tabclose else @@ -17,6 +19,7 @@ function! diff_corrections#Run() endif let &cursorline = s:old_cursorline + let &wrap = s:old_wrap if strlen(s:restore_cx_mapping) > 0 execute s:restore_cx_mapping -- cgit v1.2.3