<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotvim/bundle/diff-corrections/autoload, branch master</title>
<subtitle>My vim configuration</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/'/>
<entry>
<title>diff_corrections: Set 'wrap'</title>
<updated>2019-06-03T20:18:36+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2019-06-03T20:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=0254acfd71877910ce19ec3404cd8e25c1b13e6b'/>
<id>0254acfd71877910ce19ec3404cd8e25c1b13e6b</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_corrections: Add `cx` mapping to close tab</title>
<updated>2019-06-03T19:58:21+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2019-06-03T19:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=cea8855836335942886b4e2a3fea4a3d7d549b3c'/>
<id>cea8855836335942886b4e2a3fea4a3d7d549b3c</id>
<content type='text'>
Add a mapping to quickly close a tab. Makes it easier to close files
that I've finished reviewing.

Thanks to user9433424
(https://vi.stackexchange.com/users/6960/user9433424) on the Vi Stack
Exchange for the very detailed explanation of how to restore a mapping:
https://vi.stackexchange.com/questions/7734/how-to-save-and-restore-a-mapping/7735#7735

Using user9433424's mapping restore code, and ignoring the case where a
mapping is defined both globally and local to a buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a mapping to quickly close a tab. Makes it easier to close files
that I've finished reviewing.

Thanks to user9433424
(https://vi.stackexchange.com/users/6960/user9433424) on the Vi Stack
Exchange for the very detailed explanation of how to restore a mapping:
https://vi.stackexchange.com/questions/7734/how-to-save-and-restore-a-mapping/7735#7735

Using user9433424's mapping restore code, and ignoring the case where a
mapping is defined both globally and local to a buffer.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff-corrections: Restore old 'cursorline' and Comment highlight</title>
<updated>2019-05-17T20:48:07+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2019-05-17T20:48:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=d389fdd35788385415dc972dd5c4ef7dcb3448c0'/>
<id>d389fdd35788385415dc972dd5c4ef7dcb3448c0</id>
<content type='text'>
When diff mode is deactivated, the old values for 'cursorline' and the
Comment highlight colour should be restored.

Thanks to Tony Mechelynck
(http://vim.1045645.n5.nabble.com/template/NamlServlet.jtp?macro=user_nodes&amp;user=28373)
for the tip on how to save and restore highlight colours:

&gt; The following is untested. It requires Vim version 7.
&gt;
&gt; function SaveCursorColor()
&gt;         redir =&gt; highlight
&gt;         silent hi Cursor
&gt;         redir END
&gt;         if highlight =~ 'links to '
&gt;                 let s:hl-link = matchstr(highlight, 'links to \zs\S*')
&gt;         elseif highlight =~ '\&lt;cleared\&gt;'
&gt;                 let s:hl-link = 'NONE'
&gt;         else
&gt;                 let s:hl-link = ''
&gt;                 for substr in ['term', 'cterm', 'ctermfg', 'ctermbg',
&gt;                         \ 'gui', 'guifg', 'guibg', 'guisp']
&gt;                         if highlight =~ substr . '='
&gt;                                 let s:hl-{substr} = matchstr(highlight,
&gt;                                         \ substr . '=\S*')
&gt;                         else
&gt;                                 let s:hl-{substr} = ''
&gt;                         endif
&gt;                 endfor
&gt;         endif
&gt; endfunction
&gt; function RestoreCursorColor()
&gt;         if !exists('s:hl-link')
&gt;                 echoerr 'Cursor not saved, cannot restore'
&gt;                 return
&gt;         endif
&gt;         hi clear Cursor
&gt;         if s:hl-link == ''
&gt;                 exe 'hi Cursor' s:hl-term s:hl-cterm s:hl-ctermfg
&gt;                         \ s:hl-ctermbg s:hl-gui s:hl-guifg s:hl-guibg
&gt;                         \ s:hl-guisp
&gt;         elseif hl-link != 'NONE'
&gt;                 exe 'hi link Cursor' s:hl-link
&gt;         endif
&gt; endfunction
&gt;
&gt;
&gt; Best regards,
&gt; Tony.
http://vim.1045645.n5.nabble.com/How-to-save-restore-the-hightlight-for-cursor-td1182624.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When diff mode is deactivated, the old values for 'cursorline' and the
Comment highlight colour should be restored.

Thanks to Tony Mechelynck
(http://vim.1045645.n5.nabble.com/template/NamlServlet.jtp?macro=user_nodes&amp;user=28373)
for the tip on how to save and restore highlight colours:

&gt; The following is untested. It requires Vim version 7.
&gt;
&gt; function SaveCursorColor()
&gt;         redir =&gt; highlight
&gt;         silent hi Cursor
&gt;         redir END
&gt;         if highlight =~ 'links to '
&gt;                 let s:hl-link = matchstr(highlight, 'links to \zs\S*')
&gt;         elseif highlight =~ '\&lt;cleared\&gt;'
&gt;                 let s:hl-link = 'NONE'
&gt;         else
&gt;                 let s:hl-link = ''
&gt;                 for substr in ['term', 'cterm', 'ctermfg', 'ctermbg',
&gt;                         \ 'gui', 'guifg', 'guibg', 'guisp']
&gt;                         if highlight =~ substr . '='
&gt;                                 let s:hl-{substr} = matchstr(highlight,
&gt;                                         \ substr . '=\S*')
&gt;                         else
&gt;                                 let s:hl-{substr} = ''
&gt;                         endif
&gt;                 endfor
&gt;         endif
&gt; endfunction
&gt; function RestoreCursorColor()
&gt;         if !exists('s:hl-link')
&gt;                 echoerr 'Cursor not saved, cannot restore'
&gt;                 return
&gt;         endif
&gt;         hi clear Cursor
&gt;         if s:hl-link == ''
&gt;                 exe 'hi Cursor' s:hl-term s:hl-cterm s:hl-ctermfg
&gt;                         \ s:hl-ctermbg s:hl-gui s:hl-guifg s:hl-guibg
&gt;                         \ s:hl-guisp
&gt;         elseif hl-link != 'NONE'
&gt;                 exe 'hi link Cursor' s:hl-link
&gt;         endif
&gt; endfunction
&gt;
&gt;
&gt; Best regards,
&gt; Tony.
http://vim.1045645.n5.nabble.com/How-to-save-restore-the-hightlight-for-cursor-td1182624.html
</pre>
</div>
</content>
</entry>
<entry>
<title>diff-corrections: Move corrections to `autoload`</title>
<updated>2019-05-10T22:02:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2019-05-10T22:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=4f2dc2a1692568deb65b677188d38d666cbd469d'/>
<id>4f2dc2a1692568deb65b677188d38d666cbd469d</id>
<content type='text'>
Makes the code a little nicer and more extensible without the line
continuations.

Only change the highlight colour for the 'twilight256' colour scheme.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Makes the code a little nicer and more extensible without the line
continuations.

Only change the highlight colour for the 'twilight256' colour scheme.
</pre>
</div>
</content>
</entry>
</feed>
