1
0
Fork 0
vdotfiles/pack/general/start/mousetoggle/plugin/mousetoggle.vim

16 lines
378 B
VimL
Raw Normal View History

2018-06-22 20:05:04 +03:00
fun! s:ToggleMouse()
if !exists("s:old_mouse")
let s:old_mouse = "a"
set ttymouse=sgr
endif
if &mouse == ""
let &mouse = s:old_mouse
echo "mouse enabled (" . &mouse . ")"
else
let s:old_mouse = &mouse
let &mouse=""
echo "mouse disabled"
endif
endfunction
noremap <Leader>m :call <SID>ToggleMouse()<CR>