1
0
Fork 0
vdotfiles/pack/general/start/mousetoggle/plugin/mousetoggle.vim
2018-06-22 20:05:04 +03:00

15 lines
378 B
VimL

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>