I'm trying to do the following:
let b:toggleThisAlso = 1
let b:toggleThis = 1
function! Toggle(Toggle)
if !exists('Toggle')
let Toggle=1
endif
if Toggle == 1
let Toggle = 0
return Toggle
else
let Toggle = 1
return Toggle
endif
endfunction
function! ToggleOne()
call Toggle(b:toggleThis)
endfunction
function! ToggleTwo()
call Toggle(b:toggleThisAlso)
endfunction
and it's not working. Of course, there's some more stuff happening, but that's not what's affecting the functionality. I'm just executing a different norm (either norm xppi or norm xpa) command based on the value of, in this case, b:toggleThis or b:toggleThisAlso. What's going on here?
call Toggle('b:toggleThis')andif !exists(Toggle).