update submodules

This commit is contained in:
Jakobus Schürz 2020-11-13 14:56:46 +01:00
parent 2ee0ebdb60
commit f8f0931c17
6 changed files with 78 additions and 4 deletions

@ -1 +1 @@
Subproject commit 3866ae170a342fb40d83e1538c37c81c7977b821
Subproject commit 971c4d41880b72dbbf1620b3ad91418a6a6f6b9c

@ -1 +1 @@
Subproject commit 722d66e85abde02518214edd1ab186d321c0170c
Subproject commit 75b8cca3b3d0663ea4102f08c763cf2b0b999f88

@ -1 +1 @@
Subproject commit 61c4b6d1ed30287edcbfd3dbaed4e43b5c251c93
Subproject commit 53b3aea0da5e3581e224c958dbc13558cbe5daee

@ -1 +1 @@
Subproject commit 01b84c63b9ba48628285779fbdfd046dd2bc2970
Subproject commit 9e33a3fe8aa90f5ece2439f3b1b3a98fe7e35f85

View file

@ -0,0 +1,19 @@
## Toggle Background Function
Solarized comes with a Toggle Background plugin that by default will map to if that mapping is available. If it is not available you will need to either map the function manually or change your current mapping to something else.
To set your own mapping in your .vimrc file, simply add the following line to support normal, insert and visual mode usage, changing the "" value to the key or key combination you wish to use:
```
call togglebg#map("<F5>")
```
Note that you'll want to use a single function key or equivalent if you want the plugin to work in all modes (normal, insert, visual).
## Note
This script has been developed by Ethan Schoonover for his Solarized color scheme.
Original work can be found here: [Original Script]
[Original Script]:https://github.com/altercation/vim-colors-solarized

View file

@ -0,0 +1,55 @@
" Toggle Background
" Modified: 2011 Apr 29
" Maintainer: Ethan Schoonover
" License: OSI approved MIT license
if exists("g:loaded_togglebg")
finish
endif
let g:loaded_togglebg = 1
" noremap is a bit misleading here if you are unused to vim mapping.
" in fact, there is remapping, but only of script locally defined remaps, in
" this case <SID>TogBG. The <script> argument modifies the noremap scope in
" this regard (and the noremenu below).
nnoremap <unique> <script> <Plug>ToggleBackground <SID>TogBG
inoremap <unique> <script> <Plug>ToggleBackground <ESC><SID>TogBG<ESC>a
vnoremap <unique> <script> <Plug>ToggleBackground <ESC><SID>TogBG<ESC>gv
nnoremenu <script> Window.Toggle\ Background <SID>TogBG
inoremenu <script> Window.Toggle\ Background <ESC><SID>TogBG<ESC>a
vnoremenu <script> Window.Toggle\ Background <ESC><SID>TogBG<ESC>gv
tmenu Window.Toggle\ Background Toggle light and dark background modes
nnoremenu <script> ToolBar.togglebg <SID>TogBG
inoremenu <script> ToolBar.togglebg <ESC><SID>TogBG<ESC>a
vnoremenu <script> ToolBar.togglebg <ESC><SID>TogBG<ESC>gv
tmenu ToolBar.togglebg Toggle light and dark background modes
noremap <SID>TogBG :call <SID>TogBG()<CR>
function! s:TogBG()
let &background = ( &background == "dark"? "light" : "dark" )
if exists("g:colors_name")
exe "colorscheme " . g:colors_name
endif
endfunction
if !exists(":ToggleBG")
command ToggleBG :call s:TogBG()
endif
function! ToggleBackground()
echo "Please update your ToggleBackground mapping. ':help togglebg' for information."
endfunction
function! togglebg#map(mapActivation)
try
exe "silent! nmap <unique> ".a:mapActivation." <Plug>ToggleBackground"
exe "silent! imap <unique> ".a:mapActivation." <Plug>ToggleBackground"
exe "silent! vmap <unique> ".a:mapActivation." <Plug>ToggleBackground"
finally
return 0
endtry
endfunction
if !exists("no_plugin_maps") && !hasmapto('<Plug>ToggleBackground')
call togglebg#map("<F5>")
endif